mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 06:40:22 +01:00
r300g: advertise S3TC only when it's available in Gallium
This commit is contained in:
parent
677a604556
commit
88512e837e
1 changed files with 5 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue