diff options
author | Rhys Perry <[email protected]> | 2019-07-19 15:20:44 +0100 |
---|---|---|
committer | Juan A. Suarez Romero <[email protected]> | 2019-07-30 08:27:47 +0000 |
commit | 7364cb04c546fd50fd72a436980c108627219d4e (patch) | |
tree | f6f95f87c488bc0167c82ef60fa5169973374aa1 /src | |
parent | 83d17d573080343abf77d9eb0baceb8a91464330 (diff) |
ac/nir: fix txf_ms with an offset
Seems to fix some hair artifacts in Max Payne 3:
https://github.com/daniel-schuermann/mesa/issues/76
Signed-off-by: Rhys Perry <[email protected]>
Fixes: f4e499ec791 ('radv: add initial non-conformant radv vulkan driver')
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
(cherry picked from commit a9f58af4549b522f64950152c0180228471b8520)
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 0dadcdb3959..bbc2a522cef 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -3747,7 +3747,7 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr) goto write_result; } - if (args.offset && instr->op != nir_texop_txf) { + if (args.offset && instr->op != nir_texop_txf && instr->op != nir_texop_txf_ms) { LLVMValueRef offset[3], pack; for (unsigned chan = 0; chan < 3; ++chan) offset[chan] = ctx->ac.i32_0; @@ -3881,7 +3881,7 @@ static void visit_tex(struct ac_nir_context *ctx, nir_tex_instr *instr) args.coords[sample_chan], fmask_ptr); } - if (args.offset && instr->op == nir_texop_txf) { + if (args.offset && (instr->op == nir_texop_txf || instr->op == nir_texop_txf_ms)) { int num_offsets = instr->src[offset_src].src.ssa->num_components; num_offsets = MIN2(num_offsets, instr->coord_components); for (unsigned i = 0; i < num_offsets; ++i) { |