aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-07-02 16:39:02 -0700
committerMarge Bot <[email protected]>2020-07-07 18:19:23 +0000
commitabd9aa2c772feebe4756d47162eabb93eae6cc84 (patch)
treec998f00f9db7b59f43ef120368f28a2bcd641bfb /src
parent2da4badfe346d948fef5ed749a611eb599eb9d9f (diff)
llvmpipe: Generalize "could llvmpipe fetch this format" check in unit testing.
This set of checks matched the "access" list in u_format_table.py that controls initializing this this function pointer, so just use the function pointer. Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5728>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_format.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_format.c b/src/gallium/drivers/llvmpipe/lp_test_format.c
index f18db724bb9..a5a1528c667 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_format.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_format.c
@@ -384,18 +384,14 @@ test_all(unsigned verbose, FILE *fp)
if (util_format_is_pure_integer(format))
continue;
- /* only have util fetch func for etc1 */
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_ETC &&
- format != PIPE_FORMAT_ETC1_RGB8) {
- continue;
- }
-
- /* missing fetch funcs */
- if (format_desc->layout == UTIL_FORMAT_LAYOUT_ASTC ||
- format_desc->layout == UTIL_FORMAT_LAYOUT_ATC ||
- format_desc->layout == UTIL_FORMAT_LAYOUT_FXT1) {
+ /* The codegen sometimes falls back to calling the precompiled fetch
+ * func, so if we don't have one of those (some compressed formats,
+ * some ), we can't reliably test it. We'll surely have a
+ * precompiled fetch func for any format before we write LLVM code to
+ * fetch from it.
+ */
+ if (!format_desc->fetch_rgba_float)
continue;
- }
/* only test twice with formats which can use cache */
if (format_desc->layout != UTIL_FORMAT_LAYOUT_S3TC && use_cache) {