nir: Add a way to identify per-primitive variables
Per-primitive is similar to per-vertex attributes, but applies to all fragments of the primitive without any interpolation involved. Because they are regular input and outputs, keep track in shader_info of which I/O is per-primitive so we can distinguish them after deref lowering. These fields can be used combined with the regular `inputs_read`, `outputs_written` and `outputs_read`. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10600>
This commit is contained in:

committed by
Marge Bot

parent
927584fa67
commit
f95daad3a2
@@ -154,6 +154,12 @@ typedef struct shader_info {
|
||||
/* Which system values are actually read */
|
||||
BITSET_DECLARE(system_values_read, SYSTEM_VALUE_MAX);
|
||||
|
||||
/* Which I/O is per-primitive, for read/written information combine with
|
||||
* the fields above.
|
||||
*/
|
||||
uint64_t per_primitive_inputs;
|
||||
uint64_t per_primitive_outputs;
|
||||
|
||||
/* Which 16-bit inputs and outputs are used corresponding to
|
||||
* VARYING_SLOT_VARn_16BIT.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user