aubinator: Drop decode_structure() helper.

It made more sense when decode_group() took a bunch of extra options,
but now that there's only one...we may as well pass 0 and call it a day.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Kenneth Graunke 2017-03-19 21:47:25 -07:00
parent a8d4184b00
commit e6f7357cab
1 changed files with 9 additions and 16 deletions

View File

@ -161,13 +161,6 @@ decode_group(struct gen_spec *spec, struct gen_group *strct,
}
}
static void
decode_structure(struct gen_spec *spec, struct gen_group *strct,
const uint32_t *p)
{
decode_group(spec, strct, p, 0);
}
static void
dump_binding_table(struct gen_spec *spec, uint32_t offset)
{
@ -195,7 +188,7 @@ dump_binding_table(struct gen_spec *spec, uint32_t offset)
fprintf(outfile, "pointer %u: %08x\n", i, pointers[i]);
}
decode_structure(spec, surface_state, gtt + start);
decode_group(spec, surface_state, gtt + start, 0);
}
}
@ -307,7 +300,7 @@ dump_samplers(struct gen_spec *spec, uint32_t offset)
start = dynamic_state_base + offset;
for (i = 0; i < 4; i++) {
fprintf(outfile, "sampler state %d\n", i);
decode_structure(spec, sampler_state, gtt + start + i * 16);
decode_group(spec, sampler_state, gtt + start + i * 16, 0);
}
}
@ -331,7 +324,7 @@ handle_media_interface_descriptor_load(struct gen_spec *spec, uint32_t *p)
descriptors = gtt + start;
for (i = 0; i < length; i++, descriptors += 8) {
fprintf(outfile, "descriptor %u: %08x\n", i, *descriptors);
decode_structure(spec, descriptor_structure, descriptors);
decode_group(spec, descriptor_structure, descriptors, 0);
start = instruction_base + descriptors[0];
if (!valid_offset(start)) {
@ -599,7 +592,7 @@ handle_3dstate_viewport_state_pointers_cc(struct gen_spec *spec, uint32_t *p)
start = dynamic_state_base + (p[1] & ~0x1fu);
for (uint32_t i = 0; i < 4; i++) {
fprintf(outfile, "viewport %d\n", i);
decode_structure(spec, cc_viewport, gtt + start + i * 8);
decode_group(spec, cc_viewport, gtt + start + i * 8, 0);
}
}
@ -615,7 +608,7 @@ handle_3dstate_viewport_state_pointers_sf_clip(struct gen_spec *spec,
start = dynamic_state_base + (p[1] & ~0x3fu);
for (uint32_t i = 0; i < 4; i++) {
fprintf(outfile, "viewport %d\n", i);
decode_structure(spec, sf_clip_viewport, gtt + start + i * 64);
decode_group(spec, sf_clip_viewport, gtt + start + i * 64, 0);
}
}
@ -628,7 +621,7 @@ handle_3dstate_blend_state_pointers(struct gen_spec *spec, uint32_t *p)
blend_state = gen_spec_find_struct(spec, "BLEND_STATE");
start = dynamic_state_base + (p[1] & ~0x3fu);
decode_structure(spec, blend_state, gtt + start);
decode_group(spec, blend_state, gtt + start, 0);
}
static void
@ -640,7 +633,7 @@ handle_3dstate_cc_state_pointers(struct gen_spec *spec, uint32_t *p)
cc_state = gen_spec_find_struct(spec, "COLOR_CALC_STATE");
start = dynamic_state_base + (p[1] & ~0x3fu);
decode_structure(spec, cc_state, gtt + start);
decode_group(spec, cc_state, gtt + start, 0);
}
static void
@ -652,7 +645,7 @@ handle_3dstate_scissor_state_pointers(struct gen_spec *spec, uint32_t *p)
scissor_rect = gen_spec_find_struct(spec, "SCISSOR_RECT");
start = dynamic_state_base + (p[1] & ~0x1fu);
decode_structure(spec, scissor_rect, gtt + start);
decode_group(spec, scissor_rect, gtt + start, 0);
}
static void
@ -663,7 +656,7 @@ handle_load_register_imm(struct gen_spec *spec, uint32_t *p)
if (reg != NULL) {
fprintf(outfile, "register %s (0x%x): 0x%x\n",
reg->name, reg->register_offset, p[2]);
decode_structure(spec, reg, &p[2]);
decode_group(spec, reg, &p[2], 0);
}
}