diff options
author | Tim Rowley <[email protected]> | 2016-05-12 11:27:57 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-05-12 14:12:18 -0500 |
commit | 2785f2f2d7b1397b265f1f1ef7158dc728ae42f5 (patch) | |
tree | 3cd51a032ba211275514d94bc16bbe9806dfd96e /src/gallium/drivers | |
parent | 5186545d668e0edb8e0a5276de5de18188b8fdc5 (diff) |
swr: properly expose compressed format support
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/swr/swr_screen.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_screen.cpp b/src/gallium/drivers/swr/swr_screen.cpp index daee05abce3..3d280e34a63 100644 --- a/src/gallium/drivers/swr/swr_screen.cpp +++ b/src/gallium/drivers/swr/swr_screen.cpp @@ -27,6 +27,7 @@ #include "util/u_format.h" #include "util/u_inlines.h" #include "util/u_cpu_detect.h" +#include "util/u_format_s3tc.h" #include "state_tracker/sw_winsys.h" @@ -128,6 +129,20 @@ swr_is_format_supported(struct pipe_screen *screen, return FALSE; } + if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC || + format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) { + return FALSE; + } + + if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC && + format != PIPE_FORMAT_ETC1_RGB8) { + return FALSE; + } + + if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { + return util_format_s3tc_enabled; + } + return TRUE; } @@ -735,6 +750,8 @@ swr_create_screen(struct sw_winsys *winsys) swr_fence_init(&screen->base); + util_format_s3tc_init(); + return &screen->base; } |