Preliminary work for adding handling of different pipes to gen_decoder. Each instruction needs to have a definition describing which engine it is meant for. If left undefined, by default, the instruction is defined for all engines. --- src/intel/common/gen_decoder.c | 9 +++++++++ src/intel/common/gen_decoder.h | 1 + 2 files changed, 10 insertions(+)
diff --git a/src/intel/common/gen_decoder.c b/src/intel/common/gen_decoder.c index 8148b2f1489..f4f8af3c5ae 100644 --- a/src/intel/common/gen_decoder.c +++ b/src/intel/common/gen_decoder.c @@ -165,6 +165,7 @@ create_group(struct parser_context *ctx, group->fixed_length = fixed_length; group->dword_length_field = NULL; group->dw_length = 0; + group->engine = GEN_ENGINE_RENDER | GEN_ENGINE_VIDEO | GEN_ENGINE_BLITTER; group->bias = 1; for (int i = 0; atts[i]; i += 2) { @@ -173,6 +174,14 @@ create_group(struct parser_context *ctx, group->dw_length = strtoul(atts[i + 1], &p, 0); } else if (strcmp(atts[i], "bias") == 0) { group->bias = strtoul(atts[i + 1], &p, 0); + } else if (strcmp(atts[i], "engine") == 0) { + if (strcmp(atts[i + 1], "render") == 0) { + group->engine = GEN_ENGINE_RENDER; + } else if (strcmp(atts[i + 1], "video") == 0) { + group->engine = GEN_ENGINE_VIDEO; + } else if (strcmp(atts[i + 1], "blitter") == 0) { + group->engine = GEN_ENGINE_BLITTER; + } } } diff --git a/src/intel/common/gen_decoder.h b/src/intel/common/gen_decoder.h index c2666d07e07..b179ae8f380 100644 --- a/src/intel/common/gen_decoder.h +++ b/src/intel/common/gen_decoder.h @@ -108,6 +108,7 @@ struct gen_group { struct gen_field *dword_length_field; /* <instruction> specific */ uint32_t dw_length; + uint32_t engine; /* <instruction> specific */ uint32_t bias; /* <instruction> specific */ uint32_t group_offset, group_count; uint32_t group_size; -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev