Commit 60bbc654 authored by Alyssa Rosenzweig's avatar Alyssa Rosenzweig 💜

Identify depth_factor and depth_units fields

parent 0ff442b9
......@@ -89,9 +89,13 @@ struct mali_shader_meta {
unsigned uniform_count : 5;
unsigned unknown2 : 6;
/* TODO: Is this a different data structure I don't yet know about? */
u32 unknown2_0;
u32 unknown2_1;
/* Depth factor is exactly as passed to glDepthOffset. Depth units is
* equal to the value passed to glDeptOhffset + 1.0f (use
* MALI_NEGATIVE) */
float depth_units;
float depth_factor;
u32 unknown2_2;
u32 unknown2_3;
u32 unknown2_4;
......@@ -227,6 +231,10 @@ struct mali_payload_vertex_tiler {
#define MALI_POSITIVE(dim) (dim - 1)
/* Opposite of MALI_POSITIVE, found in the depth_units field */
#define MALI_NEGATIVE(dim) (dim + 1)
struct mali_texture_descriptor {
uint16_t width;
uint16_t height;
......
......@@ -354,13 +354,14 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
varying_count = s->varying_count;
uniform_count = s->uniform_count;
/* WTF? All zero for vertex shaders, block of undigested hex
* for fragment shaders. Let's figure it out, girls :) */
panwrap_prop("unknown2_0 = 0x%" PRIx32, s->unknown2_0);
panwrap_prop("unknown2_1 = 0x%" PRIx32, s->unknown2_1);
panwrap_prop("unknown2_2 = 0x%" PRIx32, s->unknown2_2);
/* WTF? All zero for vertex shaders; block of assorted, largely
* unknown fields for fragment shaders. Let's figure it out,
* girls :) */
if (s->depth_units || s->depth_factor) {
panwrap_prop("depth_units = MALI_NEGATIVE(%f)", s->depth_units - 1.0f);
panwrap_prop("depth_factor = %f", s->depth_factor);
}
panwrap_log(".unknown2_3 = ");
panwrap_log_decoded_flags(u3_flag_info, s->unknown2_3);
......
......@@ -192,8 +192,6 @@ void main(void) {
.work_count = 12,
.unknown1 = 0x1,
.unknown2 = 0x8,
.unknown2_0 = 0x0,
.unknown2_1 = 0x0,
.unknown2_2 = 0x0,
.unknown2_3 = 0x0,
.unknown2_4 = 0x0,
......@@ -310,8 +308,6 @@ void main(void) {
.work_count = 4,
.unknown1 = 0x600,
.unknown2 = 0x8,
.unknown2_0 = 0x0,
.unknown2_1 = 0x0,
.unknown2_2 = 0x0,
.unknown2_3 = MALI_HAS_MSAA | 0x3710ffff,
.unknown2_4 = /*MALI_NO_MSAA | */0x6f0ffff,
......
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