From: Connor Abbott Date: Wed, 2 Sep 2020 09:20:06 +0000 (+0200) Subject: nir: Add per_view to IO semantics X-Git-Tag: upstream/21.0.0~4910 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc8a5c0752238e31ac8173e5d73f6f3426697b2c;p=platform%2Fupstream%2Fmesa.git nir: Add per_view to IO semantics Reviewed-by: Caio Marcelo de Oliveira Filho Part-of: --- diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 054edf5..2f9409c 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 29d03f9..16020c2 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 bfc35d9..fa1b704 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;