diff options
author | Samuel Pitoiset <[email protected]> | 2020-01-27 11:34:00 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-29 09:49:50 +0000 |
commit | cf6cae832c9e7c95e2df88b4e86886d1310c505a (patch) | |
tree | 267f03c277e660f667a5ee7a67700ee96814d597 /src/compiler/nir/nir_divergence_analysis.c | |
parent | d29f10a7ca063b63a4e29062cf3ed0151e8ebd68 (diff) |
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 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3578>
Diffstat (limited to 'src/compiler/nir/nir_divergence_analysis.c')
-rw-r--r-- | src/compiler/nir/nir_divergence_analysis.c | 6 |
1 files changed, 6 insertions, 0 deletions
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: |