summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-01-23 14:58:40 +1100
committerTimothy Arceri <[email protected]>2019-01-26 12:03:24 +1100
commit5d66f7103f0df6b996951e65483fc5873d9b66df (patch)
tree0b763fe2008c6feec2da577b5491dc69c1627625
parent08f4a904b386f3535719dff4c224ea5cfccc92cd (diff)
ac/nir_to_llvm: fix clamp shadow reference for more hardware
Fixes the following piglit test on my VEGA and matches the behaviour in the tgsi backend. tests/spec/glsl-1.10/execution/samplers/glsl-fs-shadow2D-clamp-z.shader_test Fixes: 625dcbbc4566 ("amd/common: pass address components individually to ac_build_image_intrinsic") Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/amd/common/ac_nir_to_llvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index f509fc31dff..b60ef869864 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3586,7 +3586,7 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)
* It's unnecessary if the original texture format was
* Z32_FLOAT, but we don't know that here.
*/
- if (args.compare && ctx->ac.chip_class == VI && ctx->abi->clamp_shadow_reference)
+ if (args.compare && ctx->ac.chip_class >= VI && ctx->abi->clamp_shadow_reference)
args.compare = ac_build_clamp(&ctx->ac, ac_to_float(&ctx->ac, args.compare));
/* pack derivatives */