浏览代码

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: 625dcbbc45 ("amd/common: pass address components individually to ac_build_image_intrinsic")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
tags/19.0-branchpoint
Timothy Arceri 6 年前
父节点
当前提交
5d66f7103f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/amd/common/ac_nir_to_llvm.c

+ 1
- 1
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 */

正在加载...
取消
保存