mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
anv: include Primitive Header in mesh shader per-primitive output
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15303>
This commit is contained in:
parent
f410c1142f
commit
823cffbe1c
1 changed files with 11 additions and 0 deletions
|
|
@ -528,6 +528,17 @@ emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline)
|
|||
assert(mue->per_primitive_header_size_dw % 8 == 0);
|
||||
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.
|
||||
*/
|
||||
if (wm_prog_data->urb_setup[VARYING_SLOT_VIEWPORT] >= 0 ||
|
||||
wm_prog_data->urb_setup[VARYING_SLOT_LAYER] >= 0) {
|
||||
assert(sbe_mesh.PerPrimitiveURBEntryOutputReadOffset > 0);
|
||||
sbe_mesh.PerPrimitiveURBEntryOutputReadOffset -= 1;
|
||||
sbe_mesh.PerPrimitiveURBEntryOutputReadLength += 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue