summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-07-31 11:15:30 -0600
committerBrian <brian@i915.localnet.net>2007-07-31 11:15:30 -0600
commit6490c7d4aadac7d240d62e2d5c02d8973d69b71f (patch)
tree1012090d469eddad9db3a53260d8542aef3748a8 /src
parentda2b82059f56d37893a318d0f7a7f2479db99c59 (diff)
fix stencil addressing bug
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_surface.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_surface.c b/src/mesa/drivers/dri/i915tex/intel_surface.c
index 6b34d23ac9..3e86835de2 100644
--- a/src/mesa/drivers/dri/i915tex/intel_surface.c
+++ b/src/mesa/drivers/dri/i915tex/intel_surface.c
@@ -95,8 +95,9 @@ read_quad_z24(struct softpipe_surface *sps,
/* extract lower three bytes */
zzzz[0] = src[0] & mask;
zzzz[1] = src[1] & mask;
- zzzz[2] = src[-sps->surface.stride] & mask;
- zzzz[3] = src[-sps->surface.stride + 1] & mask;
+ src -= sps->surface.stride;
+ zzzz[2] = src[0] & mask;
+ zzzz[3] = src[1] & mask;
}
static void
@@ -133,8 +134,9 @@ read_quad_stencil(struct softpipe_surface *sps,
/* extract high byte */
ssss[0] = src[0] >> 24;
ssss[1] = src[1] >> 24;
- ssss[2] = src[-sps->surface.width] >> 24;
- ssss[3] = src[-sps->surface.width + 1] >> 24;
+ src -= sps->surface.stride;
+ ssss[2] = src[0] >> 24;
+ ssss[3] = src[1] >> 24;
}
static void