From: Jose Maria Casanova Crespo Date: Wed, 17 Jun 2020 00:30:23 +0000 (+0200) Subject: nir: only uniforms with dynamically_uniform offset are dynamically_uniform X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba15bb383f0756703e05bf202edc4771a1c54560;p=mesa.git nir: only uniforms with dynamically_uniform offset are dynamically_uniform Previously all nir_intrinsic_load_uniform that were used as sources were considered to be dynamically_uniform but when offsets of load_uniform are indirect it can not be determined. This fixes artefacts in Google Maps 3D view in V3D. Fixes: 886d46b08971 ("nir: Add a function to determine if a source is dynamically uniform") Reviewed-by: Neil Roberts Part-of: --- diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 8d2e1098301..2567be6efa0 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -1349,8 +1349,8 @@ nir_src_is_dynamically_uniform(nir_src src) /* As are uniform variables */ if (src.ssa->parent_instr->type == nir_instr_type_intrinsic) { nir_intrinsic_instr *intr = nir_instr_as_intrinsic(src.ssa->parent_instr); - - if (intr->intrinsic == nir_intrinsic_load_uniform) + if (intr->intrinsic == nir_intrinsic_load_uniform && + nir_src_is_dynamically_uniform(intr->src[0])) return true; }