summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv30
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2009-12-12 22:31:53 +0100
committerPatrice Mandin <[email protected]>2009-12-12 22:31:53 +0100
commitec7844537ecdb0b598447e37bf0b7120acd029f3 (patch)
tree3af373da024fc9d63f58ae309203f617a84acea7 /src/gallium/drivers/nv30
parentd80778218d512f51e1b52e2fe652021ecefd724a (diff)
nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r--src/gallium/drivers/nv30/nv30_miptree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c
index 920fe64c32f..fd7c65f6b37 100644
--- a/src/gallium/drivers/nv30/nv30_miptree.c
+++ b/src/gallium/drivers/nv30/nv30_miptree.c
@@ -72,6 +72,9 @@ nv30_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *pt)
mt->base.screen = pscreen;
/* Swizzled textures must be POT */
+ if ((pt->width0 == 1) || (pt->height0 == 1)) {
+ mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;
+ } else
if (pt->width0 & (pt->width0 - 1) ||
pt->height0 & (pt->height0 - 1))
mt->base.tex_usage |= NOUVEAU_TEXTURE_USAGE_LINEAR;