gallium: move pipe_draw_info::start/count to the beginning and pad empty space

for memcmp and merging draw calls

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056>
This commit is contained in:
Marek Olšák
2020-10-05 22:15:36 -04:00
committed by Marge Bot
parent 8943c80c9b
commit d9c12c6072
2 changed files with 8 additions and 6 deletions
+7 -6
View File
@@ -726,12 +726,6 @@ struct pipe_draw_indirect_info
*/
struct pipe_draw_info
{
ubyte index_size; /**< if 0, the draw is not indexed. */
enum pipe_prim_type mode:8; /**< the mode of the primitive */
unsigned primitive_restart:1;
unsigned has_user_indices:1; /**< if true, use index.user_buffer */
ubyte vertices_per_patch; /**< the number of vertices per patch */
/**
* Direct draws: start is the index of the first vertex
* Non-indexed indirect draws: not used
@@ -740,6 +734,13 @@ struct pipe_draw_info
unsigned start;
unsigned count; /**< number of vertices */
enum pipe_prim_type mode:8; /**< the mode of the primitive */
ubyte vertices_per_patch; /**< the number of vertices per patch */
ubyte index_size; /**< if 0, the draw is not indexed. */
bool primitive_restart:1;
bool has_user_indices:1; /**< if true, use index.user_buffer */
char _pad:6; /**< padding for memcmp */
unsigned start_instance; /**< first instance id */
unsigned instance_count; /**< number of instances */
+1
View File
@@ -183,6 +183,7 @@ st_draw_vbo(struct gl_context *ctx,
info.restart_index = 0;
info.start_instance = base_instance;
info.instance_count = num_instances;
info._pad = 0;
if (ib) {
struct gl_buffer_object *bufobj = ib->obj;