anv: handle primitive shading rate for mesh
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16030>
This commit is contained in:

committed by
Marge Bot

parent
9acb30c8c4
commit
1542ab70eb
@@ -530,11 +530,13 @@ emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline)
|
|||||||
sbe_mesh.PerPrimitiveURBEntryOutputReadOffset = mue->per_primitive_header_size_dw / 8;
|
sbe_mesh.PerPrimitiveURBEntryOutputReadOffset = mue->per_primitive_header_size_dw / 8;
|
||||||
sbe_mesh.PerPrimitiveURBEntryOutputReadLength = DIV_ROUND_UP(mue->per_primitive_data_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
|
/* Just like with clip distances, if Primitive Shading Rate,
|
||||||
* back in the FS, adjust the offset and length to cover the Primitive
|
* Viewport Index or Layer is read back in the FS, adjust
|
||||||
* Header, where Viewport Index & Layer are stored.
|
* 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 ||
|
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) {
|
wm_prog_data->urb_setup[VARYING_SLOT_LAYER] >= 0) {
|
||||||
assert(sbe_mesh.PerPrimitiveURBEntryOutputReadOffset > 0);
|
assert(sbe_mesh.PerPrimitiveURBEntryOutputReadOffset > 0);
|
||||||
sbe_mesh.PerPrimitiveURBEntryOutputReadOffset -= 1;
|
sbe_mesh.PerPrimitiveURBEntryOutputReadOffset -= 1;
|
||||||
|
Reference in New Issue
Block a user