Mesa (master): nouveau: nv30: Disable swizzled surface usage if any dimension is 1 ( Warsow creates a 1x1 front buffer)

Patrice Mandin pmandin at kemper.freedesktop.org
Sat Dec 12 13:32:33 PST 2009


Module: Mesa
Branch: master
Commit: ec7844537ecdb0b598447e37bf0b7120acd029f3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec7844537ecdb0b598447e37bf0b7120acd029f3

Author: Patrice Mandin <patmandin at gmail.com>
Date:   Sat Dec 12 22:31:53 2009 +0100

nouveau: nv30: Disable swizzled surface usage if any dimension is 1 (Warsow creates a 1x1 front buffer)

---

 src/gallium/drivers/nv30/nv30_miptree.c |    3 +++
 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 920fe64..fd7c65f 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;



More information about the mesa-commit mailing list