summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2020-11-01 11:44:04 -0500
committerMarge Bot <eric+marge@anholt.net>2020-11-18 01:41:25 +0000
commit52ad436740670d24040ee70bb2e155a47f789f42 (patch)
treec993a7f9e7af3f4035a85cba3162ad915c786869 /src/gallium/include/pipe
parent1cd455b17b7ac9260fb1e943c5993e8cf747abb1 (diff)
gallium/u_threaded: store start/count in min/max_index for better packing
This increases the maximum number of draws per batch from 192 to 256. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7441>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_state.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 2f4678b0a7d..7fade64cc6c 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -768,15 +768,15 @@ struct pipe_draw_info
* For indexed drawing, these fields apply after index lookup.
*/
int index_bias; /**< a bias to be added to each index */
- unsigned min_index; /**< the min index */
- unsigned max_index; /**< the max index */
/**
* Primitive restart enable/index (only applies to indexed drawing)
*/
unsigned restart_index;
- /* Pointers must be at the end for an optimal structure layout on 64-bit. */
+ /* Pointers must be placed appropriately for optimal structure packing on
+ * 64-bit CPUs.
+ */
/**
* An index buffer. When an index buffer is bound, all indices to vertices
@@ -788,6 +788,10 @@ struct pipe_draw_info
struct pipe_resource *resource; /**< real buffer */
const void *user; /**< pointer to a user buffer */
} index;
+
+ /* These must be last for better packing in u_threaded_context. */
+ unsigned min_index; /**< the min index */
+ unsigned max_index; /**< the max index */
};