mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 05:48:07 +02:00
nir_lower_io: propagate the "invariant" flag to outputs
Ultimately this is consumed by nir-to-tgsi and needed by virglrenderer to correctly declare output variables. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14423>
This commit is contained in:
parent
5bfe292708
commit
6f348d9c99
2 changed files with 3 additions and 1 deletions
|
|
@ -1765,7 +1765,8 @@ typedef struct nir_io_semantics {
|
|||
unsigned medium_precision:1; /* GLSL mediump qualifier */
|
||||
unsigned per_view:1;
|
||||
unsigned high_16bits:1; /* whether accessing low or high half of the slot */
|
||||
unsigned _pad:6;
|
||||
unsigned invariant:1; /* The variable has the invariant flag set */
|
||||
unsigned _pad:5;
|
||||
} nir_io_semantics;
|
||||
|
||||
#define NIR_INTRINSIC_MAX_INPUTS 11
|
||||
|
|
|
|||
|
|
@ -450,6 +450,7 @@ emit_store(struct lower_io_state *state, nir_ssa_def *data,
|
|||
var->data.precision == GLSL_PRECISION_MEDIUM ||
|
||||
var->data.precision == GLSL_PRECISION_LOW;
|
||||
semantics.per_view = var->data.per_view;
|
||||
semantics.invariant = var->data.invariant;
|
||||
|
||||
/* NV_mesh_shader: prevent assigning several slots to primitive indices. */
|
||||
if (b->shader->info.stage == MESA_SHADER_MESH &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue