From: Marek Olšák Date: Tue, 6 Oct 2020 02:15:36 +0000 (-0400) Subject: gallium: move pipe_draw_info::start/count to the beginning and pad empty space X-Git-Tag: upstream/21.0.0~3168 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9c12c60723b0b2a8f18928beef4284e5136f09d;p=platform%2Fupstream%2Fmesa.git 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 Part-of: --- diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 1d907bd..06f9565 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -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 */ diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 676db28..996d985 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -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;