nir: Add per_view to IO semantics
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6514>
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user