diff options
author | Eric Anholt <[email protected]> | 2018-06-28 12:33:43 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-06-29 13:36:28 -0700 |
commit | a77cb724da62920476073566728fbaf9db341dc4 (patch) | |
tree | 9dfa532d184485c730f80c8ab5f7bd061006540e /src/broadcom/clif/clif_dump.c | |
parent | c2901ff80fdd11375dfc67002f29f3965d5b988f (diff) |
v3d: Move GL shader state dumping out of per-version compilation.
It doesn't depend on V3D_VER, since it's just calling v3d_print_group.
Diffstat (limited to 'src/broadcom/clif/clif_dump.c')
-rw-r--r-- | src/broadcom/clif/clif_dump.c | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/broadcom/clif/clif_dump.c b/src/broadcom/clif/clif_dump.c index 1f57a6dbad5..ea9cee00e93 100644 --- a/src/broadcom/clif/clif_dump.c +++ b/src/broadcom/clif/clif_dump.c @@ -119,6 +119,29 @@ clif_dump_cl(struct clif_dump *clif, uint32_t start, uint32_t end) } static void +clif_dump_gl_shader_state_record(struct clif_dump *clif, + struct reloc_worklist_entry *reloc, + void *vaddr) +{ + struct v3d_group *state = v3d_spec_find_struct(clif->spec, + "GL Shader State Record"); + struct v3d_group *attr = v3d_spec_find_struct(clif->spec, + "GL Shader State Attribute Record"); + assert(state); + assert(attr); + + out(clif, "GL Shader State Record at 0x%08x\n", reloc->addr); + v3d_print_group(clif->out, state, 0, vaddr, ""); + vaddr += v3d_group_get_length(state); + + for (int i = 0; i < reloc->shader_state.num_attrs; i++) { + out(clif, " Attribute %d\n", i); + v3d_print_group(clif->out, attr, 0, vaddr, ""); + vaddr += v3d_group_get_length(attr); + } +} + +static void clif_process_worklist(struct clif_dump *clif) { while (!list_empty(&clif->worklist)) { @@ -136,15 +159,9 @@ clif_process_worklist(struct clif_dump *clif) switch (reloc->type) { case reloc_gl_shader_state: - if (clif->devinfo->ver >= 41) { - v3d41_clif_dump_gl_shader_state_record(clif, - reloc, - vaddr); - } else { - v3d33_clif_dump_gl_shader_state_record(clif, - reloc, - vaddr); - } + clif_dump_gl_shader_state_record(clif, + reloc, + vaddr); break; case reloc_generic_tile_list: clif_dump_cl(clif, reloc->addr, |