[Mesa-dev] [PATCH] ac/nir: fix txf_ms with an offset
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Jul 22 07:38:32 UTC 2019
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 7/19/19 9:17 PM, Rhys Perry wrote:
> Seems to fix some hair artifacts in Max Payne 3:
> https://github.com/daniel-schuermann/mesa/issues/76
>
> Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
> Fixes: f4e499ec791 ('radv: add initial non-conformant radv vulkan driver')
> ---
> src/amd/common/ac_nir_to_llvm.c | 4 ++--
> 1 file 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 96bf89a8bf9..549a26ea243 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3784,7 +3784,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;
> @@ -3919,7 +3919,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) {
More information about the mesa-dev
mailing list