Module: Mesa Branch: master Commit: d9c12c60723b0b2a8f18928beef4284e5136f09d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d9c12c60723b0b2a8f18928beef4284e5136f09d
Author: Marek Olšák <[email protected]> Date: Mon Oct 5 22:15:36 2020 -0400 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7056> --- src/gallium/include/pipe/p_state.h | 13 +++++++------ src/mesa/state_tracker/st_draw.c | 1 + 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 1d907bd228d..06f9565cfaf 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 676db28df96..996d985510c 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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
