mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 21:08:11 +02:00
brw: Add VUE header varyings to io_component()
This is needed for VS/TES/GS outputs. Mesh takes a different path because those are per-primitive. Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39666>
This commit is contained in:
parent
54def4020c
commit
1f0773e951
1 changed files with 11 additions and 4 deletions
|
|
@ -92,10 +92,17 @@ io_component(nir_intrinsic_instr *io,
|
|||
const int offset = cb_data->per_primitive_byte_offsets[sem.location];
|
||||
assert(offset != -1);
|
||||
c += (offset % 16) / 4;
|
||||
} else if (nir_intrinsic_has_io_semantics(io) &&
|
||||
nir_intrinsic_io_semantics(io).location == VARYING_SLOT_PSIZ) {
|
||||
/* Point Size lives in component .w of the VUE header */
|
||||
c += 3;
|
||||
} else if (nir_intrinsic_has_io_semantics(io)) {
|
||||
const nir_io_semantics sem = nir_intrinsic_io_semantics(io);
|
||||
/* The VUE header stores Primitive Shading Rate (.x), Layer (.y),
|
||||
* Viewport (.z), and Point Size (.w) in a single vec4.
|
||||
*/
|
||||
if (sem.location == VARYING_SLOT_LAYER)
|
||||
c += 1;
|
||||
else if (sem.location == VARYING_SLOT_VIEWPORT)
|
||||
c += 2;
|
||||
else if (sem.location == VARYING_SLOT_PSIZ)
|
||||
c += 3;
|
||||
}
|
||||
|
||||
return c;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue