diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-12-27 12:56:03 -0500 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-12-27 12:58:00 -0500 |
commit | de077c20788e9cccd0efe5765bbafe2cf881eb5c (patch) | |
tree | 1a1bfbecbf59960cfe646c934c4a74b35815e403 /src/panfrost/pandecode | |
parent | bc1fc29e2119bfceeacaa303a5f79f9bb99d1af7 (diff) |
panfrost: Remove mali_alt_func
There's only one way to encode comparison functions in the command
stream, not two. It's just that the semantics for texture comparisons
are flipped from the semantics of stencil comparison. We can factor out
that flip to common Panfrost code, rather than tying it to a second
Gallium routine.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/pandecode')
-rw-r--r-- | src/panfrost/pandecode/decode.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index d88158a9312..126065c2b21 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -375,28 +375,6 @@ pandecode_func(enum mali_func mode) } #undef DEFINE_CASE -/* Why is this duplicated? Who knows... */ -#define DEFINE_CASE(name) case MALI_ALT_FUNC_ ## name: return "MALI_ALT_FUNC_" #name -static char * -pandecode_alt_func(enum mali_alt_func mode) -{ - switch (mode) { - DEFINE_CASE(NEVER); - DEFINE_CASE(LESS); - DEFINE_CASE(EQUAL); - DEFINE_CASE(LEQUAL); - DEFINE_CASE(GREATER); - DEFINE_CASE(NOTEQUAL); - DEFINE_CASE(GEQUAL); - DEFINE_CASE(ALWAYS); - - default: - pandecode_msg("XXX: invalid alt func %X\n", mode); - return ""; - } -} -#undef DEFINE_CASE - #define DEFINE_CASE(name) case MALI_STENCIL_ ## name: return "MALI_STENCIL_" #name static char * pandecode_stencil_op(enum mali_stencil_op op) @@ -2468,7 +2446,7 @@ pandecode_vertex_tiler_postfix_pre( pandecode_prop("wrap_t = %s", pandecode_wrap_mode(s->wrap_t)); pandecode_prop("wrap_r = %s", pandecode_wrap_mode(s->wrap_r)); - pandecode_prop("compare_func = %s", pandecode_alt_func(s->compare_func)); + pandecode_prop("compare_func = %s", pandecode_func(s->compare_func)); if (s->zero || s->zero2) { pandecode_msg("XXX: sampler zero tripped\n"); |