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

This commit is contained in:
Patrice Mandin
2009-12-12 22:31:53 +01:00
parent d80778218d
commit ec7844537e
+3
View File
@@ -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;