aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-09-06 13:33:56 -0700
committerEric Anholt <[email protected]>2019-11-07 19:43:41 +0000
commit6b1c250245e4e29ea42e853ee094a8d6e9d1b665 (patch)
tree7cb479b7a1bc042df2e60b228d46d258e23f2df7
parent80a8021d6ce02be599b3befd2dae6506a91f174a (diff)
mesa/st: Test round-tripping of all compressed formats.
We checked round-tripping of formats without fallbacks, but weren't setting the compression support flags in the mock context and thus needed to skip testing those. Just set all the flags and assert that no fallbacks are triggered, so we get full test coverage. Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/state_tracker/tests/st_format.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/tests/st_format.c b/src/mesa/state_tracker/tests/st_format.c
index e42a1873d5e..69191015b11 100644
--- a/src/mesa/state_tracker/tests/st_format.c
+++ b/src/mesa/state_tracker/tests/st_format.c
@@ -56,6 +56,9 @@ int main(int argc, char **argv)
};
struct st_context local_st = {
.pipe = &pctx,
+ .has_etc1 = true,
+ .has_etc2 = true,
+ .has_astc_2d_ldr = true,
};
struct st_context *st = &local_st;
@@ -65,8 +68,7 @@ int main(int argc, char **argv)
for (i = 1; i < MESA_FORMAT_COUNT; i++) {
enum pipe_format pf;
- if (st_compressed_format_fallback(st, i))
- continue;
+ assert(!st_compressed_format_fallback(st, i));
pf = st_mesa_format_to_pipe_format(st, i);
if (pf != PIPE_FORMAT_NONE) {