diff options
author | Christian König <[email protected]> | 2012-08-01 15:20:07 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2012-08-02 11:22:52 +0200 |
commit | 92b96a883f5ed53d88ec148c8212c5a8348e97ab (patch) | |
tree | c4ed1ea133cad204da29fa4c88cbeec7895a82a5 /src/gallium/drivers/radeonsi/radeonsi_shader.c | |
parent | 9b7dc5e81cfebeb6a61f3fee704bfec3fa6d6e77 (diff) |
radeonsi: fix texture loads from sampler > 0
The backend is multiplying the offset by the numbers of
elements anyway, so doing it twice just makes everything
crash.
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_shader.c | 4 |
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 f90fd1dde30..81b44a772ab 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -529,14 +529,14 @@ static void tex_fetch_args( /* Resource */ ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V8I32, 4); offset = lp_build_const_int32(bld_base->base.gallivm, - 8 * emit_data->inst->Src[1].Register.Index); + emit_data->inst->Src[1].Register.Index); emit_data->args[2] = build_indexed_load(bld_base->base.gallivm, ptr, offset); /* Sampler */ ptr = use_sgpr(bld_base->base.gallivm, SGPR_CONST_PTR_V4I32, 2); offset = lp_build_const_int32(bld_base->base.gallivm, - 4 * emit_data->inst->Src[1].Register.Index); + emit_data->inst->Src[1].Register.Index); emit_data->args[3] = build_indexed_load(bld_base->base.gallivm, ptr, offset); |