summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2012-04-19 10:35:31 +0200
committerMichel Dänzer <[email protected]>2012-04-19 19:59:54 +0200
commitde12c6cb5470eb51f71b5392efe012a10230d3d0 (patch)
tree065529e3466b2bb4e1dc835e8d6d40bc391341e9 /src/gallium/drivers
parent7103a18c1242af7d3ec36a947841fa52e7f86bed (diff)
radeonsi: Fix sampler offsets for shader intrinsic.
The sampler number is in TGSI source register 1, and the S_LOAD_DWORD* instructions take offsets in DWORDs, not bytes.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 50f2e39314f..33ba1cd7698 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -450,12 +450,12 @@ static void tex_fetch_args(
/* Resource */
emit_data->args[2] = use_sgpr(bld_base->base.gallivm, SGPR_I64, 2);
emit_data->args[3] = lp_build_const_int32(bld_base->base.gallivm,
- 32 * emit_data->inst->Src[2].Register.Index);
+ 8 * emit_data->inst->Src[1].Register.Index);
/* Sampler */
emit_data->args[4] = use_sgpr(bld_base->base.gallivm, SGPR_I64, 1);
emit_data->args[5] = lp_build_const_int32(bld_base->base.gallivm,
- 16 * emit_data->inst->Src[2].Register.Index);
+ 4 * emit_data->inst->Src[1].Register.Index);
/* Dimensions */
/* XXX: We might want to pass this information to the shader at some. */