Mesa (7.9): r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only
Marek Olšák
mareko at kemper.freedesktop.org
Thu Dec 2 00:58:20 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 7d280a3bbe47b02e96f762e3b94f2922de585d38
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d280a3bbe47b02e96f762e3b94f2922de585d38
Author: Marek Olšák <maraeo at gmail.com>
Date: Wed Dec 1 22:49:02 2010 +0100
r300g: disable ARB_texture_swizzle if S3TC is enabled on r3xx-only
r3xx cannot swizzle compressed textures. r4xx+ is unaffected.
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit fcf6b353bfd860aa7bcc708858bef313c6fd7031)
---
src/gallium/drivers/r300/r300_screen.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 7f41ff0..c349e7f 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -114,8 +114,9 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
case PIPE_CAP_TEXTURE_MIRROR_REPEAT:
case PIPE_CAP_BLEND_EQUATION_SEPARATE:
- case PIPE_CAP_TEXTURE_SWIZZLE:
return 1;
+ case PIPE_CAP_TEXTURE_SWIZZLE:
+ return util_format_s3tc_enabled ? r300screen->caps.dxtc_swizzle : 1;
/* Unsupported features (boolean caps). */
case PIPE_CAP_TIMER_QUERY:
More information about the mesa-commit
mailing list