Commit 14c571c7 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Identify stencil mask

parent 5eb15670
......@@ -92,6 +92,15 @@ enum mali_func {
#define MALI_NO_MSAA (1 << 30)
#define MALI_STENCIL_TEST (1 << 16)
/* glStencilMask state plonked onto unknown2_4, a bit like glDepthFunc plonked
* onto unknown2_3 */
#define MALI_STENCIL_MASK_FRONT(f) (f << 0)
#define MALI_STENCIL_MASK_BACK(f) (f << 8)
#define MALI_GET_STENCIL_MASK_FRONT(f) (f & 0xFF)
#define MALI_GET_STENCIL_MASK_BACK(f) ((f >> 8) & 0xFF)
#define MALI_STENCIL_MASK_MASK 0xFFFF
/* Stencil test state is all encoded in a single u32, just with a lot of
* enums... */
......
......@@ -459,6 +459,7 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
panwrap_log(".unknown2_3 = ");
int unknown2_3 = s->unknown2_3;
int unknown2_4 = s->unknown2_4;
/* We're not quite sure what these flags mean without the depth test, if anything */
......@@ -474,7 +475,16 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
panwrap_log_cont(",\n");
panwrap_log(".unknown2_4 = ");
panwrap_log_decoded_flags(u4_flag_info, s->unknown2_4);
/* TODO: Make less ugly */
panwrap_log_cont("MALI_STENCIL_MASK_FRONT(0x%02X) | MALI_STENCIL_MASK_BACK(0x%02X) | ",
MALI_GET_STENCIL_MASK_FRONT(unknown2_4),
MALI_GET_STENCIL_MASK_BACK(unknown2_4));
unknown2_4 &= ~MALI_STENCIL_MASK_MASK;
panwrap_log_decoded_flags(u4_flag_info, unknown2_4);
panwrap_log_cont(",\n");
panwrap_replay_stencil("front", &s->stencil_front);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment