Mesa (mesa_7_7_branch): svga: Clamp max cube texture levels to supported max 2d levels.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Feb 12 23:46:19 UTC 2010
Module: Mesa
Branch: mesa_7_7_branch
Commit: 3a4068474c25d91b52c6f3eb160cf8e6640df6d8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a4068474c25d91b52c6f3eb160cf8e6640df6d8
Author: José Fonseca <jfonseca at vmware.com>
Date: Fri Feb 12 21:30:33 2010 +0000
svga: Clamp max cube texture levels to supported max 2d levels.
---
src/gallium/drivers/svga/svga_screen.c | 7 ++++++-
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 3593d9a..0bd28d3 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -154,7 +154,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;
More information about the mesa-commit
mailing list