aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-09-18 19:41:18 -0400
committerMarek Olšák <[email protected]>2019-09-23 15:34:54 -0400
commit05d32850ffcdd036d5ec340bf75c133e120d5edc (patch)
tree03bdab29045db1035ab862e6aa9d533ee9031f04 /src
parent500181b2ba0290473763115dfded4f4551b20eca (diff)
ac/nir: force unnormalized coordinates for RECT
This fixes VAAPI. Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index b4b4e423a8d..074584227c1 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4266,8 +4266,10 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr)
args.dmask = 1 << instr->component;
}
- if (instr->sampler_dim != GLSL_SAMPLER_DIM_BUF)
+ if (instr->sampler_dim != GLSL_SAMPLER_DIM_BUF) {
args.dim = get_ac_sampler_dim(&ctx->ac, instr->sampler_dim, instr->is_array);
+ args.unorm = instr->sampler_dim == GLSL_SAMPLER_DIM_RECT;
+ }
result = build_tex_intrinsic(ctx, instr, &args);
if (instr->op == nir_texop_query_levels)