return offset < gtt_end;
}
-/**
- * Set group variable size for groups with count="0".
- *
- * By default the group size is fixed and not needed because the struct
- * describing a group knows the number of elements. However, for groups with
- * count="0" we have a variable number of elements, and the struct describing
- * the group only includes one of them. So we calculate the remaining size of
- * the group based on the size we get here, and the offset after the last
- * element added to the group.
- */
-static void
-group_set_size(struct gen_group *strct, uint32_t size)
-{
- if (strct->variable && strct->elem_size)
- strct->group_size = size - (strct->variable_offset / 32);
-}
-
static void
decode_group(struct gen_group *strct, const uint32_t *p, int starting_dword)
{
dump_samplers(spec, p[1]);
}
+static void
+handle_3dstate_sampler_state_pointers_gen6(struct gen_spec *spec, uint32_t *p)
+{
+ dump_samplers(spec, p[1]);
+ dump_samplers(spec, p[2]);
+ dump_samplers(spec, p[3]);
+}
+
static void
handle_3dstate_viewport_state_pointers_cc(struct gen_spec *spec, uint32_t *p)
{
#define _3DSTATE_SAMPLER_STATE_POINTERS_GS 0x782e0000
#define _3DSTATE_SAMPLER_STATE_POINTERS_PS 0x782f0000
+#define _3DSTATE_SAMPLER_STATE_POINTERS 0x78020000
+
#define _3DSTATE_VIEWPORT_STATE_POINTERS_CC 0x78230000
#define _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP 0x78210000
#define _3DSTATE_BLEND_STATE_POINTERS 0x78240000
{ _3DSTATE_SAMPLER_STATE_POINTERS_VS, handle_3dstate_sampler_state_pointers },
{ _3DSTATE_SAMPLER_STATE_POINTERS_GS, handle_3dstate_sampler_state_pointers },
{ _3DSTATE_SAMPLER_STATE_POINTERS_PS, handle_3dstate_sampler_state_pointers },
+ { _3DSTATE_SAMPLER_STATE_POINTERS, handle_3dstate_sampler_state_pointers_gen6 },
{ _3DSTATE_VIEWPORT_STATE_POINTERS_CC, handle_3dstate_viewport_state_pointers_cc },
{ _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP, handle_3dstate_viewport_state_pointers_sf_clip },
gen_group_get_name(inst), reset_color);
if (option_full_decode) {
- group_set_size(inst, length);
decode_group(inst, p, 0);
for (i = 0; i < ARRAY_LENGTH(custom_handlers); i++) {
exit(EXIT_FAILURE);
}
+ close(fd);
+
file->cursor = file->map;
file->end = file->map + sb.st_size / 4;
{ "bdw", MAKE_GEN(8, 0) },
{ "skl", MAKE_GEN(9, 0) },
{ "chv", MAKE_GEN(8, 0) },
- { "bxt", MAKE_GEN(9, 0) }
+ { "bxt", MAKE_GEN(9, 0) },
+ { "cnl", MAKE_GEN(10, 0) },
};
enum {
"Decode aub file contents from either FILE or the standard input.\n\n"
"A valid --gen option must be provided.\n\n"
" --help display this help and exit\n"
- " --gen=platform decode for given platform (ivb, byt, hsw, bdw, chv, skl, kbl or bxt)\n"
+ " --gen=platform decode for given platform (ivb, byt, hsw, bdw, chv, skl, kbl, bxt or cnl)\n"
" --headers decode only command headers\n"
" --color[=WHEN] colorize the output; WHEN can be 'auto' (default\n"
" if omitted), 'always', or 'never'\n"
{ "chv", 0x22B3 }, /* Intel(R) HD Graphics (Cherryview) */
{ "skl", 0x1912 }, /* Intel(R) HD Graphics 530 (Skylake GT2) */
{ "kbl", 0x591D }, /* Intel(R) Kabylake GT2 */
- { "bxt", 0x0A84 } /* Intel(R) HD Graphics (Broxton) */
+ { "bxt", 0x0A84 }, /* Intel(R) HD Graphics (Broxton) */
+ { "cnl", 0x5A52 }, /* Intel(R) HD Graphics (Cannonlake) */
};
const struct option aubinator_opts[] = {
{ "help", no_argument, (int *) &help, true },