aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2020-03-11 10:35:13 +0000
committerMarge Bot <[email protected]>2020-04-01 23:36:28 +0000
commit67c7cabd7fa9e6babb423080d53a045980e295ef (patch)
treee5c1605b27a9450faa03c241ae4d21096f193412 /src/intel
parent1ac9f362e0f848ef5bdc6ede12d0389bb7407ff6 (diff)
anv: use urb_setup_attribs in SBE
Avoid looping over all VARYING_SLOT_MAX urb_setup arrray entries. Cc: [email protected] Signed-off-by: Juan A. Suarez Romero <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Ivan Briano <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2010>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/genX_pipeline.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index b02b9e96db5..59c66267be7 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -358,11 +358,11 @@ emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline)
/* Skip the VUE header and position slots by default */
unsigned urb_entry_read_offset = 1;
int max_source_attr = 0;
- for (int attr = 0; attr < VARYING_SLOT_MAX; attr++) {
+ for (uint8_t idx = 0; idx < wm_prog_data->urb_setup_attribs_count; idx++) {
+ uint8_t attr = wm_prog_data->urb_setup_attribs[idx];
int input_index = wm_prog_data->urb_setup[attr];
- if (input_index < 0)
- continue;
+ assert(0 <= input_index);
/* gl_Viewport and gl_Layer are stored in the VUE header */
if (attr == VARYING_SLOT_VIEWPORT || attr == VARYING_SLOT_LAYER) {