Mesa (master): softpipe: Offset is not to be applied to the layer parameter of array texture fetches .
Brian Paul
brianp at kemper.freedesktop.org
Tue Jun 19 22:08:32 UTC 2012
Module: Mesa
Branch: master
Commit: cfc5b3094163bc5c945594903d90f21873bb5d66
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cfc5b3094163bc5c945594903d90f21873bb5d66
Author: Olivier Galibert <galibert at pobox.com>
Date: Tue Jun 19 20:51:18 2012 +0200
softpipe: Offset is not to be applied to the layer parameter of array texture fetches.
Signed-off-by: Olivier Galibert <galibert at pobox.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/drivers/softpipe/sp_tex_sample.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index d4c0175..f29a6c7 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -2693,7 +2693,7 @@ sample_get_texels(struct tgsi_sampler *tgsi_sampler,
case PIPE_TEXTURE_1D_ARRAY:
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
int x = CLAMP(v_i[j] + offset[0], 0, width - 1);
- int y = CLAMP(v_j[j] + offset[1], 0, layers - 1);
+ int y = CLAMP(v_j[j], 0, layers - 1);
tx = get_texel_1d_array(samp, addr, x, y);
for (c = 0; c < 4; c++) {
rgba[c][j] = tx[c];
@@ -2715,7 +2715,7 @@ sample_get_texels(struct tgsi_sampler *tgsi_sampler,
for (j = 0; j < TGSI_QUAD_SIZE; j++) {
int x = CLAMP(v_i[j] + offset[0], 0, width - 1);
int y = CLAMP(v_j[j] + offset[1], 0, height - 1);
- int layer = CLAMP(v_k[j] + offset[2], 0, layers - 1);
+ int layer = CLAMP(v_k[j], 0, layers - 1);
tx = get_texel_2d_array(samp, addr, x, y, layer);
for (c = 0; c < 4; c++) {
rgba[c][j] = tx[c];
More information about the mesa-commit
mailing list