gallium/swr: Fix crash when use GL_TDFX_texture_compression_FXT1 format.
authorKrzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Tue, 3 Dec 2019 13:43:57 +0000 (14:43 +0100)
committerKrzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Tue, 3 Dec 2019 16:51:24 +0000 (16:51 +0000)
Reject the new formats in swr to prevent crashes because it doesn't
know how to handle the new formats.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
src/gallium/drivers/swr/swr_screen.cpp

index 23bc3541ba43921d69e4e2210ae8eed7698a0987..ac53fc518f039b2ff3da1e42ecf928fc71031e64 100644 (file)
@@ -142,7 +142,9 @@ swr_is_format_supported(struct pipe_screen *_screen,
    }
 
    if (format_desc->layout == UTIL_FORMAT_LAYOUT_BPTC ||
-       format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC) {
+       format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
+       format_desc->layout == UTIL_FORMAT_LAYOUT_FXT1)
+   {
       return false;
    }