From: Ilia Mirkin Date: Sat, 19 Sep 2015 20:19:26 +0000 (-0400) Subject: radeonsi: load fmask ptr relative to the resources array X-Git-Tag: upstream/17.1.0~15995 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7d5162bdc0850c80f4b9427a2aac6b42c7dcceaa;p=platform%2Fupstream%2Fmesa.git radeonsi: load fmask ptr relative to the resources array 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 Reviewed-by: Marek Olšák Cc: "11.0" --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b108664..e92a3d2 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2350,7 +2350,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];