Module: Mesa Branch: master Commit: 67c7cabd7fa9e6babb423080d53a045980e295ef URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=67c7cabd7fa9e6babb423080d53a045980e295ef
Author: Juan A. Suarez Romero <[email protected]> Date: Wed Mar 11 10:35:13 2020 +0000 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> --- src/intel/vulkan/genX_pipeline.c | 6 +++--- 1 file 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) { _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
