summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-26 16:39:13 +1000
committerDave Airlie <airlied@redhat.com>2009-09-26 16:39:13 +1000
commit07183b73ebafe2d1083f1c572978317768725b99 (patch)
treebb376d3321b12d7a3f8e383eb715618cd3e32f61 /src/gallium/drivers
parent8130375e775bd5ba6a47412b0ea8ec9f23dc5972 (diff)
downloadexternal_mesa3d-07183b73ebafe2d1083f1c572978317768725b99.zip
external_mesa3d-07183b73ebafe2d1083f1c572978317768725b99.tar.gz
external_mesa3d-07183b73ebafe2d1083f1c572978317768725b99.tar.bz2
r300g: fix texture pitch to correct value.
pitch is pixels - 1, not bytes.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 7c041d1..e8078ea 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -37,7 +37,7 @@ static void r300_setup_texture_state(struct r300_texture* tex,
/* XXX */
state->format1 = r300_translate_texformat(tex->tex.format);
- state->format2 = r300_texture_get_stride(tex, 0);
+ state->format2 = (r300_texture_get_stride(tex, 0) / tex->tex.block.size) - 1;
/* Assume (somewhat foolishly) that oversized textures will
* not be permitted by the state tracker. */