From cf6cae832c9e7c95e2df88b4e86886d1310c505a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 27 Jan 2020 11:34:00 +0100 Subject: nir: lower interp_deref_at_vertex to load_input_vertex This introduces a new NIR intrinsic for loading inputs at a specific vertex index. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/compiler/nir/nir_divergence_analysis.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/compiler/nir/nir_divergence_analysis.c') diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index f0c8bfad7b2..bfa12d1a57d 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -125,6 +125,11 @@ visit_intrinsic(bool *divergent, nir_intrinsic_instr *instr, else is_divergent = true; break; + case nir_intrinsic_load_input_vertex: + is_divergent = divergent[instr->src[1].ssa->index]; + assert(stage == MESA_SHADER_FRAGMENT); + is_divergent |= !(options & nir_divergence_single_prim_per_subgroup); + break; case nir_intrinsic_load_output: assert(stage == MESA_SHADER_TESS_CTRL || stage == MESA_SHADER_FRAGMENT); is_divergent = divergent[instr->src[0].ssa->index]; @@ -264,6 +269,7 @@ visit_intrinsic(bool *divergent, nir_intrinsic_instr *instr, case nir_intrinsic_load_barycentric_pixel: case nir_intrinsic_load_barycentric_centroid: case nir_intrinsic_load_barycentric_sample: + case nir_intrinsic_load_barycentric_model: case nir_intrinsic_load_barycentric_at_sample: case nir_intrinsic_load_barycentric_at_offset: case nir_intrinsic_interp_deref_at_offset: -- cgit v1.2.3