diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 054edf5dae3..2f9409c857d 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1785,7 +1785,8 @@ typedef struct { unsigned fb_fetch_output:1; /* for GL_KHR_blend_equation_advanced */ unsigned gs_streams:8; /* xxyyzzww: 2-bit stream index for each component */ unsigned medium_precision:1; /* GLSL mediump qualifier */ - unsigned _pad:8; + unsigned per_view:1; + unsigned _pad:7; } nir_io_semantics; #define NIR_INTRINSIC_MAX_INPUTS 5 diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 29d03f98a76..16020c2ae62 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -437,6 +437,7 @@ emit_store(struct lower_io_state *state, nir_ssa_def *data, semantics.medium_precision = var->data.precision == GLSL_PRECISION_MEDIUM || var->data.precision == GLSL_PRECISION_LOW; + semantics.per_view = var->data.per_view; nir_intrinsic_set_io_semantics(store, semantics); nir_builder_instr_insert(b, &store->instr); diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index bfc35d9399d..fa1b7044160 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -972,6 +972,10 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state) nir_intrinsic_io_semantics(instr).fb_fetch_output) { fprintf(fp, " fbfetch=1"); } + if (instr->intrinsic == nir_intrinsic_store_output && + nir_intrinsic_io_semantics(instr).per_view) { + fprintf(fp, " perview=1"); + } if (state->shader->info.stage == MESA_SHADER_GEOMETRY && instr->intrinsic == nir_intrinsic_store_output) { unsigned gs_streams = nir_intrinsic_io_semantics(instr).gs_streams;