projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
677a604
)
r300g: advertise S3TC only when it's available in Gallium
author
Marek Olšák
<maraeo@gmail.com>
Tue, 4 May 2010 18:09:53 +0000
(20:09 +0200)
committer
Marek Olšák
<maraeo@gmail.com>
Tue, 4 May 2010 18:09:53 +0000
(20:09 +0200)
src/gallium/drivers/r300/r300_texture.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/r300/r300_texture.c
b/src/gallium/drivers/r300/r300_texture.c
index d6f629cf9c6fcbfa8677a7e59515cafc116cebbd..a6f65fce2161519d0ee84d717ae10e7f803d3ea1 100644
(file)
--- 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: