OSDN Git Service

radeonsi: load fmask ptr relative to the resources array
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 19 Sep 2015 20:19:26 +0000 (16:19 -0400)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 23 Sep 2015 20:06:29 +0000 (21:06 +0100)
res_ptr already contains the resource values. fmask_ptr needs to be
looked up relative to the start of the resource params.

Note that this only affects indirect loads of MS sampler arrays.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7d5162bdc0850c80f4b9427a2aac6b42c7dcceaa)

src/gallium/drivers/radeonsi/si_shader.c

index fa6c15a..d493329 100644 (file)
@@ -2300,7 +2300,7 @@ static void tex_fetch_args(
                                                 lp_build_const_int32(gallivm,
                                                                      SI_FMASK_TEX_OFFSET), "");
                        fmask_ptr = LLVMGetParam(si_shader_ctx->radeon_bld.main_fn, SI_PARAM_RESOURCE);
-                       fmask_ptr = build_indexed_load_const(si_shader_ctx, res_ptr, ind_index);
+                       fmask_ptr = build_indexed_load_const(si_shader_ctx, fmask_ptr, ind_index);
                }
        } else {
                res_ptr = si_shader_ctx->resources[sampler_index];