Mesa (master): ac/nir: force unnormalized coordinates for RECT

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 23 19:35:26 UTC 2019


Module: Mesa
Branch: master
Commit: 05d32850ffcdd036d5ec340bf75c133e120d5edc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=05d32850ffcdd036d5ec340bf75c133e120d5edc

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Wed Sep 18 19:41:18 2019 -0400

ac/nir: force unnormalized coordinates for RECT

This fixes VAAPI.

Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

---

 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)




More information about the mesa-commit mailing list