#define MALI_CULL_FACE_FRONT (1 << 6)
#define MALI_CULL_FACE_BACK (1 << 7)
-/* Used in stencil and depth tests */
-
-enum mali_func {
- MALI_FUNC_NEVER = 0,
- MALI_FUNC_LESS = 1,
- MALI_FUNC_EQUAL = 2,
- MALI_FUNC_LEQUAL = 3,
- MALI_FUNC_GREATER = 4,
- MALI_FUNC_NOTEQUAL = 5,
- MALI_FUNC_GEQUAL = 6,
- MALI_FUNC_ALWAYS = 7
-};
-
/* Flags apply to unknown2_3? */
#define MALI_HAS_MSAA (1 << 0)
#undef DEFINE_CASE
-#define DEFINE_CASE(name) case MALI_FUNC_ ## name: return "MALI_FUNC_" #name
-static char *
-pandecode_func(enum mali_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 func %X\n", mode);
- return "";
- }
-}
-#undef DEFINE_CASE
-
#define DEFINE_CASE(name) case MALI_MSAA_ ## name: return "MALI_MSAA_" #name
static char *
pandecode_msaa_mode(enum mali_msaa_mode mode)
if (any_nonzero == 0)
return;
- const char *func = pandecode_func(stencil->func);
+ const char *func = mali_func_as_str(stencil->func);
const char *sfail = pandecode_stencil_op(stencil->sfail);
const char *dpfail = pandecode_stencil_op(stencil->dpfail);
const char *dppass = pandecode_stencil_op(stencil->dppass);
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_func(s->compare_func));
+ pandecode_prop("compare_func = %s", mali_func_as_str(s->compare_func));
if (s->zero || s->zero2) {
pandecode_msg("XXX: sampler zero tripped\n");
/* We're not quite sure what these flags mean without the depth test, if anything */
if (unknown2_3 & (MALI_DEPTH_WRITEMASK | MALI_DEPTH_FUNC_MASK)) {
- const char *func = pandecode_func(MALI_GET_DEPTH_FUNC(unknown2_3));
+ const char *func = mali_func_as_str(MALI_GET_DEPTH_FUNC(unknown2_3));
unknown2_3 &= ~MALI_DEPTH_FUNC_MASK;
pandecode_log_cont("MALI_DEPTH_FUNC(%s) | ", func);
<value name="Quad strip" value="15"/>
</enum>
+ <enum name="Func">
+ <value name="Never" value="0"/>
+ <value name="Less" value="1"/>
+ <value name="Equal" value="2"/>
+ <value name="Lequal" value="3"/>
+ <value name="Greater" value="4"/>
+ <value name="Not Equal" value="5"/>
+ <value name="Gequal" value="6"/>
+ <value name="Always" value="7"/>
+ </enum>
+
</panxml>