fprintf(pandecode_dump_stream, "%s\n", title); \
struct MALI_ ## T temp; \
MALI_ ## T ## _unpack((const uint8_t *) cl, &temp); \
- MALI_ ## T ## _print(pandecode_dump_stream, &temp, 0); \
+ MALI_ ## T ## _print(pandecode_dump_stream, &temp, indent * 2); \
}
#define DUMP_ADDR(title, T, addr, indent) {\
};
#undef FLAG_INFO
-#define FLAG_INFO(flag) { MALI_SAMP_##flag, "MALI_SAMP_" #flag }
-static const struct pandecode_flag_info sampler_flag_info [] = {
- FLAG_INFO(MAG_NEAREST),
- FLAG_INFO(MIN_NEAREST),
- FLAG_INFO(MIP_LINEAR_1),
- FLAG_INFO(MIP_LINEAR_2),
- FLAG_INFO(NORM_COORDS),
- {}
-};
-#undef FLAG_INFO
-
#define FLAG_INFO(flag) { MALI_SFBD_FORMAT_##flag, "MALI_SFBD_FORMAT_" #flag }
static const struct pandecode_flag_info sfbd_unk1_info [] = {
FLAG_INFO(MSAA_8),
#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)
-{
- switch (mode) {
- DEFINE_CASE(SINGLE);
- DEFINE_CASE(AVERAGE);
- DEFINE_CASE(MULTIPLE);
- DEFINE_CASE(LAYERED);
- default:
- unreachable("Impossible");
- return "";
- }
-}
-#undef DEFINE_CASE
-
static char *pandecode_attr_mode_short(enum mali_attr_mode mode)
{
switch(mode) {
}
}
-#define DEFINE_CASE(name) case MALI_WRAP_## name: return "MALI_WRAP_" #name
-static char *
-pandecode_wrap_mode(enum mali_wrap_mode op)
-{
- switch (op) {
- DEFINE_CASE(REPEAT);
- DEFINE_CASE(CLAMP_TO_EDGE);
- DEFINE_CASE(CLAMP);
- DEFINE_CASE(CLAMP_TO_BORDER);
- DEFINE_CASE(MIRRORED_REPEAT);
- DEFINE_CASE(MIRRORED_CLAMP_TO_EDGE);
- DEFINE_CASE(MIRRORED_CLAMP);
- DEFINE_CASE(MIRRORED_CLAMP_TO_BORDER);
-
- default:
- pandecode_msg("XXX: invalid wrap mode %X\n", op);
- return "";
- }
-}
-#undef DEFINE_CASE
-
-#define DEFINE_CASE(name) case MALI_BLOCK_## name: return "MALI_BLOCK_" #name
-static char *
-pandecode_block_format(enum mali_block_format fmt)
-{
- switch (fmt) {
- DEFINE_CASE(TILED);
- DEFINE_CASE(UNKNOWN);
- DEFINE_CASE(LINEAR);
- DEFINE_CASE(AFBC);
-
- default:
- unreachable("Invalid case");
- }
-}
-#undef DEFINE_CASE
-
#define DEFINE_CASE(name) case MALI_EXCEPTION_ACCESS_## name: return ""#name
static char *
pandecode_exception_access(unsigned access)
pandecode_log_decoded_flags(sfbd_unk2_info, format.unk2);
pandecode_log_cont(",\n");
- pandecode_prop("block = %s", pandecode_block_format(format.block));
+ pandecode_prop("block = %s", mali_block_format_as_str(format.block));
pandecode_prop("unk3 = 0x%" PRIx32, format.unk3);
pandecode_prop("unk3 = 0x%" PRIx32, format.unk3);
pandecode_prop("unk4 = 0x%" PRIx32, format.unk4);
- pandecode_prop("block = %s", pandecode_block_format(format.block));
+ pandecode_prop("block = %s", mali_block_format_as_str(format.block));
/* TODO: Map formats so we can check swizzles and print nicely */
pandecode_log("swizzle");
pandecode_log_decoded_flags(mfbd_fmt_flag_info, format.flags);
pandecode_log_cont(",\n");
- pandecode_prop("msaa = %s", pandecode_msaa_mode(format.msaa));
+ pandecode_prop("msaa = %s", mali_msaa_as_str(format.msaa));
/* In theory, the no_preload bit can be cleared to enable MFBD preload,
* which is a faster hardware-based alternative to the wallpaper method
pandecode_rt_format(rt->format);
- if (rt->format.block == MALI_BLOCK_AFBC) {
+ if (rt->format.block == MALI_BLOCK_FORMAT_AFBC) {
pandecode_log(".afbc = {\n");
pandecode_indent++;
pandecode_log_decoded_flags(mfbd_extra_flag_lo_info, fbx->flags_lo);
pandecode_log_cont(",\n");
- pandecode_prop("zs_block = %s", pandecode_block_format(fbx->zs_block));
+ pandecode_prop("zs_block = %s", mali_block_format_as_str(fbx->zs_block));
pandecode_prop("zs_samples = MALI_POSITIVE(%u)", fbx->zs_samples + 1);
- if (fbx->zs_block == MALI_BLOCK_AFBC) {
+ if (fbx->zs_block == MALI_BLOCK_FORMAT_AFBC) {
pandecode_log(".ds_afbc = {\n");
pandecode_indent++;
return shader_ptr;
}
-static void
-pandecode_stencil(const char *name, const struct mali_stencil_test *stencil)
-{
- unsigned any_nonzero =
- stencil->ref | stencil->mask | stencil->func |
- stencil->sfail | stencil->dpfail | stencil->dppass;
-
- if (any_nonzero == 0)
- return;
-
- const char *func = mali_func_as_str(stencil->func);
- const char *sfail = mali_stencil_op_as_str(stencil->sfail);
- const char *dpfail = mali_stencil_op_as_str(stencil->dpfail);
- const char *dppass = mali_stencil_op_as_str(stencil->dppass);
-
- if (stencil->zero)
- pandecode_msg("XXX: stencil zero tripped: %X\n", stencil->zero);
-
- pandecode_log(".stencil_%s = {\n", name);
- pandecode_indent++;
- pandecode_prop("ref = %d", stencil->ref);
- pandecode_prop("mask = 0x%02X", stencil->mask);
- pandecode_prop("func = %s", func);
- pandecode_prop("sfail = %s", sfail);
- pandecode_prop("dpfail = %s", dpfail);
- pandecode_prop("dppass = %s", dppass);
- pandecode_indent--;
- pandecode_log("},\n");
-}
-
static void
pandecode_blend_equation(const struct mali_blend_equation *blend)
{
static void
pandecode_texture_payload(mali_ptr payload,
- enum mali_texture_type type,
+ enum mali_texture_dimension dim,
enum mali_texture_layout layout,
bool manual_stride,
uint8_t levels,
int bitmap_count = levels + 1;
/* Miptree for each face */
- if (type == MALI_TEX_CUBE)
+ if (dim == MALI_TEXTURE_DIMENSION_CUBE)
bitmap_count *= 6;
/* Array of layers */
- bitmap_count *= (depth + 1);
+ bitmap_count *= depth;
/* Array of textures */
- bitmap_count *= (array_size + 1);
+ bitmap_count *= array_size;
/* Stride for each element */
if (manual_stride)
struct pandecode_mapped_memory *tmem,
unsigned job_no, unsigned tex)
{
- struct mali_texture_descriptor *PANDECODE_PTR_VAR(t, tmem, u);
+ struct pandecode_mapped_memory *mapped_mem = pandecode_find_mapped_gpu_mem_containing(u);
+ const uint8_t *cl = pandecode_fetch_gpu_mem(mapped_mem, u, MALI_MIDGARD_TEXTURE_LENGTH);
- pandecode_log("struct mali_texture_descriptor texture_descriptor_%"PRIx64"_%d_%d = {\n", u, job_no, tex);
- pandecode_indent++;
+ struct MALI_MIDGARD_TEXTURE temp;
+ MALI_MIDGARD_TEXTURE_unpack(cl, &temp);
+ MALI_MIDGARD_TEXTURE_print(pandecode_dump_stream, &temp, 2);
- pandecode_prop("width = %" PRId32, t->width);
- pandecode_prop("height = %" PRId32, t->height);
- pandecode_prop("depth = %" PRId32, t->depth);
- pandecode_prop("array_size = %" PRId32, t->array_size);
-
- pandecode_log("\n");
- pandecode_prop("f.swizzle = 0x%" PRIx32, t->format.swizzle);
- pandecode_prop("f.format = 0x%" PRIx32, t->format.format);
- pandecode_prop("f.srgb = 0x%" PRIx32, t->format.srgb);
- pandecode_prop("f.unknown1 = 0x%" PRIx32, t->format.unknown1);
- pandecode_prop("f.type = %" PRId32, t->format.type);
- pandecode_prop("f.layout = %" PRId32, t->format.layout);
- pandecode_prop("f.unknown2 = 0x%" PRIx32, t->format.unknown2);
- pandecode_prop("f.manual_stride = %" PRId32, t->format.manual_stride);
- pandecode_prop("f.zero = 0x%" PRIx32, t->format.zero);
- pandecode_log("\n");
-
- pandecode_prop("unknown3 = 0x%" PRIx32, t->unknown3);
- pandecode_prop("unknown3A = 0x%" PRIx32, t->unknown3A);
- pandecode_prop("levels = %" PRId32, t->levels);
- pandecode_prop("swizzle = 0x%" PRIx32, t->swizzle);
- pandecode_prop("swizzle_zero = 0x%" PRIx32, t->swizzle_zero);
-
- pandecode_prop("unknown5 = 0x%" PRIx32, t->unknown5);
- pandecode_prop("unknown6 = 0x%" PRIx32, t->unknown6);
- pandecode_prop("unknown7 = 0x%" PRIx32, t->unknown7);
- pandecode_log("\n");
-
- struct mali_texture_format f = t->format;
-
- /* See the definiton of enum mali_texture_type */
-
- bool is_cube = f.type == MALI_TEX_CUBE;
- unsigned dimension = is_cube ? 2 : f.type;
-
- pandecode_make_indent();
-
- /* Print the layout. Default is linear; a modifier can denote AFBC or
- * u-interleaved/tiled modes */
-
- if (f.layout == MALI_TEXTURE_AFBC)
- pandecode_log_cont("afbc");
- else if (f.layout == MALI_TEXTURE_TILED)
- pandecode_log_cont("tiled");
- else if (f.layout == MALI_TEXTURE_LINEAR)
- pandecode_log_cont("linear");
- else
- pandecode_msg("XXX: invalid texture layout 0x%X\n", f.layout);
-
- pandecode_swizzle(t->swizzle, f.format);
- pandecode_log_cont(" ");
-
- /* Distinguish cube/2D with modifier */
-
- if (is_cube)
- pandecode_log_cont("cube ");
-
- pandecode_format_short(f.format, f.srgb);
- pandecode_swizzle(f.swizzle, f.format);
-
- /* All four width/height/depth/array_size dimensions are present
- * regardless of the type of texture, but it is an error to have
- * non-zero dimensions for unused dimensions. Verify this. array_size
- * can always be set, as can width. Depth used for MSAA. */
-
- if (t->height && dimension < 2)
- pandecode_msg("XXX: nonzero height for <2D texture\n");
-
- /* Print only the dimensions that are actually there */
-
- pandecode_log_cont(": %d", t->width + 1);
-
- if (t->height || t->depth)
- pandecode_log_cont("x%u", t->height + 1);
-
- if (t->depth)
- pandecode_log_cont("x%u", t->depth + 1);
-
- if (t->array_size)
- pandecode_log_cont("[%u]", t->array_size + 1);
-
- if (t->levels)
- pandecode_log_cont(" mip %u", t->levels);
-
- pandecode_log_cont("\n");
-
- if (f.unknown1 | f.zero) {
- pandecode_msg("XXX: texture format zero tripped\n");
- pandecode_prop("unknown1 = %" PRId32, f.unknown1);
- pandecode_prop("zero = %" PRId32, f.zero);
- }
-
- if (!f.unknown2) {
- pandecode_msg("XXX: expected unknown texture bit set\n");
- pandecode_prop("unknown2 = %" PRId32, f.unknown2);
- }
-
- if (t->swizzle_zero) {
- pandecode_msg("XXX: swizzle zero tripped\n");
- pandecode_prop("swizzle_zero = %d", t->swizzle_zero);
- }
-
- if (t->unknown3 | t->unknown3A | t->unknown5 | t->unknown6 | t->unknown7) {
- pandecode_msg("XXX: texture zero tripped\n");
- pandecode_prop("unknown3 = %" PRId16, t->unknown3);
- pandecode_prop("unknown3A = %" PRId8, t->unknown3A);
- pandecode_prop("unknown5 = 0x%" PRIx32, t->unknown5);
- pandecode_prop("unknown6 = 0x%" PRIx32, t->unknown6);
- pandecode_prop("unknown7 = 0x%" PRIx32, t->unknown7);
- }
-
- pandecode_texture_payload(u + sizeof(*t), f.type, f.layout, f.manual_stride, t->levels, t->depth, t->array_size, tmem);
-
- pandecode_indent--;
- pandecode_log("};\n");
+ pandecode_texture_payload(u + MALI_MIDGARD_TEXTURE_LENGTH,
+ temp.dimension, temp.texel_ordering, temp.manual_stride,
+ temp.levels, temp.depth, temp.array_size, mapped_mem);
}
static void
pandecode_bifrost_texture(
- const struct bifrost_texture_descriptor *t,
+ const void *cl,
unsigned job_no,
unsigned tex)
{
- pandecode_log("struct bifrost_texture_descriptor texture_descriptor_%d_%d = {\n", job_no, tex);
- pandecode_indent++;
-
- pandecode_prop("format_unk = 0x%" PRIx32, t->format_unk);
- pandecode_prop("type = %" PRId32, t->type);
-
- if (t->zero) {
- pandecode_msg("XXX: zero tripped\n");
- pandecode_prop("zero = 0x%" PRIx32, t->zero);
- }
-
- pandecode_prop("format_swizzle = 0x%" PRIx32, t->format_swizzle);
- pandecode_prop("format = 0x%" PRIx32, t->format);
- pandecode_prop("srgb = 0x%" PRIx32, t->srgb);
- pandecode_prop("format_unk3 = 0x%" PRIx32, t->format_unk3);
- pandecode_prop("width = %" PRId32, t->width);
- pandecode_prop("height = %" PRId32, t->height);
- pandecode_prop("swizzle = 0x%" PRIx32, t->swizzle);
- pandecode_prop("levels = %" PRId32, t->levels);
- pandecode_prop("unk1 = 0x%" PRIx32, t->unk1);
- pandecode_prop("levels_unk = %" PRId32, t->levels_unk);
- pandecode_prop("level_2 = %" PRId32, t->level_2);
- pandecode_prop("payload = 0x%" PRIx64, t->payload);
- pandecode_prop("array_size = %" PRId32, t->array_size);
- pandecode_prop("unk4 = 0x%" PRIx32, t->unk4);
- pandecode_prop("depth = %" PRId32, t->depth);
- pandecode_prop("unk5 = 0x%" PRIx32, t->unk5);
- pandecode_log("\n");
+ struct MALI_BIFROST_TEXTURE temp;
+ MALI_BIFROST_TEXTURE_unpack(cl, &temp);
+ MALI_BIFROST_TEXTURE_print(pandecode_dump_stream, &temp, 2);
- /* See the definiton of enum mali_texture_type */
-
- bool is_cube = t->type == MALI_TEX_CUBE;
- unsigned dimension = is_cube ? 2 : t->type;
-
- /* Print the layout. Default is linear; a modifier can denote AFBC or
- * u-interleaved/tiled modes */
-
- if (t->layout == MALI_TEXTURE_AFBC)
- pandecode_log_cont("afbc");
- else if (t->layout == MALI_TEXTURE_TILED)
- pandecode_log_cont("tiled");
- else if (t->layout == MALI_TEXTURE_LINEAR)
- pandecode_log_cont("linear");
- else
- pandecode_msg("XXX: invalid texture layout 0x%X\n", t->layout);
-
- pandecode_swizzle(t->swizzle, t->format);
- pandecode_log_cont(" ");
-
- /* Distinguish cube/2D with modifier */
-
- if (is_cube)
- pandecode_log_cont("cube ");
-
- pandecode_format_short(t->format, t->srgb);
-
- /* All four width/height/depth/array_size dimensions are present
- * regardless of the type of texture, but it is an error to have
- * non-zero dimensions for unused dimensions. Verify this. array_size
- * can always be set, as can width. */
-
- if (t->height && dimension < 2)
- pandecode_msg("XXX: nonzero height for <2D texture\n");
-
- if (t->depth && dimension < 3)
- pandecode_msg("XXX: nonzero depth for <2D texture\n");
-
- /* Print only the dimensions that are actually there */
-
- pandecode_log_cont(": %d", t->width + 1);
-
- if (dimension >= 2)
- pandecode_log_cont("x%u", t->height + 1);
-
- if (dimension >= 3)
- pandecode_log_cont("x%u", t->depth + 1);
-
- if (t->array_size)
- pandecode_log_cont("[%u]", t->array_size + 1);
-
- if (t->levels)
- pandecode_log_cont(" mip %u", t->levels);
-
- pandecode_log_cont("\n");
-
- struct pandecode_mapped_memory *tmem = pandecode_find_mapped_gpu_mem_containing(t->payload);
- if (t->payload) {
- pandecode_texture_payload(t->payload, t->type, t->layout,
- true, t->levels, t->depth,
- t->array_size, tmem);
- }
-
- pandecode_indent--;
- pandecode_log("};\n");
+ struct pandecode_mapped_memory *tmem = pandecode_find_mapped_gpu_mem_containing(temp.surfaces);
+ pandecode_texture_payload(temp.surfaces, temp.dimension, temp.texel_ordering,
+ true, temp.levels, 1, 1, tmem);
}
/* For shader properties like texture_count, we have a claimed property in the shader_meta, and the actual Truth from static analysis (this may just be an upper limit). We validate accordingly */
if (!mmem)
return;
- if (is_bifrost) {
- const struct bifrost_texture_descriptor *PANDECODE_PTR_VAR(t, mmem, textures);
-
- pandecode_log("uint64_t textures_%"PRIx64"_%d[] = {\n", textures, job_no);
- pandecode_indent++;
+ pandecode_log("Textures (%"PRIx64"):\n", textures);
- for (unsigned tex = 0; tex < texture_count; ++tex)
- pandecode_bifrost_texture(&t[tex], job_no, tex);
+ if (is_bifrost) {
+ const void *cl = pandecode_fetch_gpu_mem(mmem,
+ textures, MALI_BIFROST_TEXTURE_LENGTH *
+ texture_count);
- pandecode_indent--;
- pandecode_log("};\n");
+ for (unsigned tex = 0; tex < texture_count; ++tex) {
+ pandecode_bifrost_texture(cl +
+ MALI_BIFROST_TEXTURE_LENGTH * tex,
+ job_no, tex);
+ }
} else {
mali_ptr *PANDECODE_PTR_VAR(u, mmem, textures);
- pandecode_log("uint64_t textures_%"PRIx64"_%d[] = {\n", textures, job_no);
- pandecode_indent++;
-
for (int tex = 0; tex < texture_count; ++tex) {
mali_ptr *PANDECODE_PTR_VAR(u, mmem, textures + tex * sizeof(mali_ptr));
char *a = pointer_as_memory_reference(*u);
free(a);
}
- pandecode_indent--;
- pandecode_log("};\n");
-
/* Now, finally, descend down into the texture descriptor */
for (unsigned tex = 0; tex < texture_count; ++tex) {
mali_ptr *PANDECODE_PTR_VAR(u, mmem, textures + tex * sizeof(mali_ptr));
static void
pandecode_samplers(mali_ptr samplers, unsigned sampler_count, int job_no, bool is_bifrost)
{
- struct pandecode_mapped_memory *smem = pandecode_find_mapped_gpu_mem_containing(samplers);
-
- if (!smem)
- return;
-
- if (is_bifrost) {
- struct bifrost_sampler_descriptor *s;
-
- for (int i = 0; i < sampler_count; ++i) {
- s = pandecode_fetch_gpu_mem(smem, samplers + sizeof(*s) * i, sizeof(*s));
-
- pandecode_log("struct bifrost_sampler_descriptor sampler_descriptor_%"PRIx64"_%d_%d = {\n", samplers + sizeof(*s) * i, job_no, i);
- pandecode_indent++;
-
- if (s->unk1 != 1) {
- pandecode_msg("XXX: unk1 tripped\n");
- pandecode_prop("unk1 = 0x%x", s->unk1);
- }
-
- pandecode_prop("wrap_s = %s", pandecode_wrap_mode(s->wrap_s));
- pandecode_prop("wrap_t = %s", pandecode_wrap_mode(s->wrap_t));
- pandecode_prop("wrap_r = %s", pandecode_wrap_mode(s->wrap_r));
-
- if (s->unk8 != 0x8) {
- pandecode_msg("XXX: unk8 tripped\n");
- pandecode_prop("unk8 = 0x%x", s->unk8);
- }
-
- pandecode_prop("unk2 = 0x%x", s->unk2);
- pandecode_prop("unk3 = 0x%x", s->unk3);
- pandecode_prop("min_filter = %s", s->min_filter ? "nearest" : "linear");
- pandecode_prop("norm_coords = 0x%x", s->norm_coords & 0x1);
- pandecode_prop("zero1 = 0x%x", s->zero1 & 0x1);
- pandecode_prop("mip_filter = %s", s->mip_filter ? "linear" : "nearest");
- pandecode_prop("mag_filter = %s", s->mag_filter ? "linear" : "nearest");
-
- pandecode_prop("min_lod = FIXED_16(%f)", DECODE_FIXED_16(s->min_lod));
- pandecode_prop("max_lod = FIXED_16(%f)", DECODE_FIXED_16(s->max_lod));
-
- if (s->zero1 || s->zero2 || s->zero3 || s->zero4) {
- pandecode_msg("XXX: sampler zero tripped\n");
- pandecode_prop("zero = 0x%" PRIx8 ", 0x%" PRIx64 ", 0x%" PRIx64 ", 0x%" PRIx64 "\n", s->zero1, s->zero2, s->zero3, s->zero4);
- }
-
- pandecode_indent--;
- pandecode_log("};\n");
- }
- } else {
- struct mali_sampler_descriptor *s;
-
- for (int i = 0; i < sampler_count; ++i) {
- s = pandecode_fetch_gpu_mem(smem, samplers + sizeof(*s) * i, sizeof(*s));
-
- pandecode_log("struct mali_sampler_descriptor sampler_descriptor_%"PRIx64"_%d_%d = {\n", samplers + sizeof(*s) * i, job_no, i);
- pandecode_indent++;
-
- pandecode_log(".filter_mode = ");
- pandecode_log_decoded_flags(sampler_flag_info, s->filter_mode);
- pandecode_log_cont(",\n");
-
- pandecode_prop("min_lod = FIXED_16(%f)", DECODE_FIXED_16(s->min_lod));
- pandecode_prop("max_lod = FIXED_16(%f)", DECODE_FIXED_16(s->max_lod));
-
- if (s->lod_bias)
- pandecode_prop("lod_bias = FIXED_16(%f)", DECODE_FIXED_16(s->lod_bias));
-
- pandecode_prop("wrap_s = %s", pandecode_wrap_mode(s->wrap_s));
- 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", mali_func_as_str(s->compare_func));
-
- if (s->zero || s->zero2) {
- pandecode_msg("XXX: sampler zero tripped\n");
- pandecode_prop("zero = 0x%X, 0x%X\n", s->zero, s->zero2);
- }
-
- pandecode_prop("seamless_cube_map = %d", s->seamless_cube_map);
-
- pandecode_prop("border_color = { %f, %f, %f, %f }",
- s->border_color[0],
- s->border_color[1],
- s->border_color[2],
- s->border_color[3]);
-
- pandecode_indent--;
- pandecode_log("};\n");
+ for (int i = 0; i < sampler_count; ++i) {
+ if (is_bifrost) {
+ DUMP_ADDR("Sampler", BIFROST_SAMPLER, samplers + (MALI_BIFROST_SAMPLER_LENGTH * i), 1);
+ } else {
+ DUMP_ADDR("Sampler", MIDGARD_SAMPLER, samplers + (MALI_MIDGARD_SAMPLER_LENGTH * i), 1);
}
}
}
pandecode_prop("stencil_mask_back = 0x%02X", s->stencil_mask_back);
}
- pandecode_stencil("front", &s->stencil_front);
- pandecode_stencil("back", &s->stencil_back);
+ DUMP_CL("Stencil front", STENCIL, &s->stencil_front, 1);
+ DUMP_CL("Stencil back", STENCIL, &s->stencil_back, 1);
if (is_bifrost) {
pandecode_log(".bifrost2 = {\n");
} else
pandecode_msg("XXX: missing shader descriptor\n");
- if (p->viewport) {
- struct pandecode_mapped_memory *fmem = pandecode_find_mapped_gpu_mem_containing(p->viewport);
- struct mali_viewport *PANDECODE_PTR_VAR(f, fmem, p->viewport);
-
- pandecode_log("struct mali_viewport viewport_%"PRIx64"_%d%s = {\n", p->viewport, job_no, suffix);
- pandecode_indent++;
-
- pandecode_prop("clip_minx = %f", f->clip_minx);
- pandecode_prop("clip_miny = %f", f->clip_miny);
- pandecode_prop("clip_minz = %f", f->clip_minz);
- pandecode_prop("clip_maxx = %f", f->clip_maxx);
- pandecode_prop("clip_maxy = %f", f->clip_maxy);
- pandecode_prop("clip_maxz = %f", f->clip_maxz);
-
- /* Only the higher coordinates are MALI_POSITIVE scaled */
-
- pandecode_prop("viewport0 = { %d, %d }",
- f->viewport0[0], f->viewport0[1]);
-
- pandecode_prop("viewport1 = { MALI_POSITIVE(%d), MALI_POSITIVE(%d) }",
- f->viewport1[0] + 1, f->viewport1[1] + 1);
-
- pandecode_indent--;
- pandecode_log("};\n");
- }
+ if (p->viewport)
+ DUMP_ADDR("Viewport", VIEWPORT, p->viewport, 1);
unsigned max_attr_index = 0;