From 05d32850ffcdd036d5ec340bf75c133e120d5edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 18 Sep 2019 19:41:18 -0400 Subject: [PATCH] ac/nir: force unnormalized coordinates for RECT This fixes VAAPI. Reviewed-by: Connor Abbott --- src/amd/common/ac_nir_to_llvm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)