summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-07-24 23:05:40 +0200
committerMarek Olšák <maraeo@gmail.com>2010-07-25 10:25:21 +0200
commit49330fc5ac13e25cb201e62995329cffaf5046f0 (patch)
treee5cf700875018050f378a75cacc8b79cb3ae6e3e /src/gallium/drivers/r300/r300_texture.c
parentc92d232061c1aef6f5f56cbd815625778db2fd8c (diff)
r300g: do not use TXPITCH_EN if the width is POT and the height is NPOT
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index e99a4630ee..f1118dfd7d 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -552,7 +552,8 @@ static void r300_texture_setup_immutable_state(struct r300_screen* screen,
f->format0 |= R300_TX_PITCH_EN;
f->format2 = (tex->desc.stride_in_pixels[0] - 1) & 0x1fff;
} else {
- /* power of two textures (3D, mipmaps, and no pitch) */
+ /* Power of two textures (3D, mipmaps, and no pitch),
+ * also NPOT textures with a width being POT. */
f->format0 |= R300_TX_DEPTH(util_logbase2(pt->depth0) & 0xf);
}