summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-05-04 20:09:53 +0200
committerMarek Olšák <maraeo@gmail.com>2010-05-04 20:09:53 +0200
commit88512e837e45b72c33a7d28ccf02f00580a4cf10 (patch)
tree0b52591a9fea1ace48e76a3b9a447b7e1c9db442 /src/gallium/drivers
parent677a60455673bd9aff4bebae8416a54cd326ca37 (diff)
r300g: advertise S3TC only when it's available in Gallium
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index d6f629cf9c..a6f65fce21 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -24,6 +24,7 @@
#include "pipe/p_screen.h"
#include "util/u_format.h"
+#include "util/u_format_s3tc.h"
#include "util/u_math.h"
#include "util/u_memory.h"
@@ -170,6 +171,10 @@ uint32_t r300_translate_texformat(enum pipe_format format,
/* S3TC formats. */
if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
+ if (!util_format_s3tc_enabled) {
+ return ~0; /* Unsupported. */
+ }
+
switch (format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA: