summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-02-12 21:30:33 +0000
committerJosé Fonseca <[email protected]>2010-02-12 23:46:58 +0000
commit6af833add2a695922400d3f641e3c7fa09c00a46 (patch)
tree6fc88321c1aab426d55f15e45ea1b94f5eea30e7 /src/gallium
parent2bb4d75f28d1b693ebef3b4fb9188db304f46234 (diff)
svga: Clamp max cube texture levels to supported max 2d levels.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/svga/svga_screen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index cad9b779ecb..414ac52e1f6 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -156,7 +156,12 @@ svga_get_paramf(struct pipe_screen *screen, int param)
return MIN2(util_logbase2(result.u) + 1, SVGA_MAX_TEXTURE_LEVELS);
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
- return 12 /* 2048x2048 */;
+ /*
+ * No mechanism to query the host, and at least limited to 2048x2048 on
+ * certain hardware.
+ */
+ return MIN2(screen->get_paramf(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS),
+ 12.0 /* 2048x2048 */);
case PIPE_CAP_TEXTURE_MIRROR_REPEAT: /* req. for GL 1.4 */
return 1;