summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2017-09-28 14:16:18 -0700
committerMatt Turner <mattst88@gmail.com>2017-10-02 19:41:22 -0700
commit3a8a5e77e8f992aaa3539e060885138c2fcddad1 (patch)
tree2eebf1d1150bee8d2d285a5f7dd761999f1700e2 /src/gallium/drivers
parentf6c56e07fc5a8e81fd90688c9fee239f18c3480e (diff)
gallium: Remove util_format_s3tc_enabled
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_format.c5
-rw-r--r--src/gallium/drivers/r300/r300_screen.c2
-rw-r--r--src/gallium/drivers/r300/r300_texture.c4
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c4
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c4
-rw-r--r--src/gallium/drivers/swr/swr_screen.cpp4
-rw-r--r--src/gallium/drivers/virgl/virgl_screen.c4
9 files changed, 2 insertions, 33 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 53171162a54..7b694b57551 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -532,10 +532,6 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen,
format != PIPE_FORMAT_ETC1_RGB8)
return FALSE;
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- return util_format_s3tc_enabled;
- }
-
/*
* Everything can be supported by u_format
* (those without fetch_rgba_float might be not but shouldn't hit that)
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c
index 9b16162131f..fd79087287e 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_format.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_format.c
@@ -383,11 +383,6 @@ test_all(unsigned verbose, FILE *fp)
if (util_format_is_pure_integer(format))
continue;
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC &&
- !util_format_s3tc_enabled) {
- continue;
- }
-
/* only have util fetch func for etc1 */
if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
format != PIPE_FORMAT_ETC1_RGB8) {
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 0c3e097535d..6d6b5fb74ab 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -127,7 +127,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
/* r300 cannot do swizzling of compressed textures. Supported otherwise. */
case PIPE_CAP_TEXTURE_SWIZZLE:
- return util_format_s3tc_enabled ? r300screen->caps.dxtc_swizzle : 1;
+ return r300screen->caps.dxtc_swizzle;
/* We don't support color clamping on r500, so that we can use color
* intepolators for generic varyings. */
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 8873c54ebce..0658205f879 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -250,10 +250,6 @@ 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:
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 7e2b34bf798..0e8c5d666ef 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -2405,10 +2405,6 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
}
if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- if (!util_format_s3tc_enabled) {
- goto out_unknown;
- }
-
switch (format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 4965a8374ff..67cd1746277 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1712,10 +1712,6 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen,
if (!enable_compressed_formats)
goto out_unknown;
- if (!util_format_s3tc_enabled) {
- goto out_unknown;
- }
-
switch (format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 7e9d9e6592f..50eefe65af7 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -460,10 +460,6 @@ softpipe_is_format_supported( struct pipe_screen *screen,
* All other operations (sampling, transfer, etc).
*/
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- return util_format_s3tc_enabled;
- }
-
/*
* Everything else should be supported by u_format.
*/
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp
index ee7782d648d..3ae56f52d5f 100644
--- a/src/gallium/drivers/swr/swr_screen.cpp
+++ b/src/gallium/drivers/swr/swr_screen.cpp
@@ -147,10 +147,6 @@ swr_is_format_supported(struct pipe_screen *_screen,
return FALSE;
}
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- return util_format_s3tc_enabled;
- }
-
return TRUE;
}
diff --git a/src/gallium/drivers/virgl/virgl_screen.c b/src/gallium/drivers/virgl/virgl_screen.c
index 935ce2f9b0a..f2636aac382 100644
--- a/src/gallium/drivers/virgl/virgl_screen.c
+++ b/src/gallium/drivers/virgl/virgl_screen.c
@@ -486,9 +486,7 @@ virgl_is_format_supported( struct pipe_screen *screen,
*/
if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
- if (util_format_s3tc_enabled)
- goto out_lookup;
- return FALSE;
+ goto out_lookup;
}
if (format_desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
goto out_lookup;