Module: Mesa Branch: main Commit: 1542ab70eb415c028542c0ce93a6dd7463220eba URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1542ab70eb415c028542c0ce93a6dd7463220eba
Author: Marcin Ĺšlusarz <[email protected]> Date: Tue Apr 12 15:07:20 2022 +0200 anv: handle primitive shading rate for mesh Reviewed-by: Caio Oliveira <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16030> --- src/intel/vulkan/genX_pipeline.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index f8d3c1628c8..0fa95ed86b6 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -530,11 +530,13 @@ emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline) sbe_mesh.PerPrimitiveURBEntryOutputReadOffset = mue->per_primitive_header_size_dw / 8; sbe_mesh.PerPrimitiveURBEntryOutputReadLength = DIV_ROUND_UP(mue->per_primitive_data_size_dw, 8); - /* Just like with clip distances, if Viewport Index or Layer is read - * back in the FS, adjust the offset and length to cover the Primitive - * Header, where Viewport Index & Layer are stored. + /* Just like with clip distances, if Primitive Shading Rate, + * Viewport Index or Layer is read back in the FS, adjust + * the offset and length to cover the Primitive Header, where + * PSR, Viewport Index & Layer are stored. */ if (wm_prog_data->urb_setup[VARYING_SLOT_VIEWPORT] >= 0 || + wm_prog_data->urb_setup[VARYING_SLOT_PRIMITIVE_SHADING_RATE] >= 0 || wm_prog_data->urb_setup[VARYING_SLOT_LAYER] >= 0) { assert(sbe_mesh.PerPrimitiveURBEntryOutputReadOffset > 0); sbe_mesh.PerPrimitiveURBEntryOutputReadOffset -= 1;
