summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-03-22 10:03:52 +1000
committerMarge Bot <eric+marge@anholt.net>2021-05-05 07:28:34 +0000
commit922f71b819b06cd4acbf14dbb1d1b161bd6e3953 (patch)
tree1999919394a872f028df25f4d3fd66ccd00baf99
parentd91d3613ad403358722549d60f425998ca2159a7 (diff)
intel/decoder: add gen4/5 geometry state decode
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10642>
-rw-r--r--src/intel/common/intel_batch_decoder.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/intel/common/intel_batch_decoder.c b/src/intel/common/intel_batch_decoder.c
index a0eb229afef..f9655c7c474 100644
--- a/src/intel/common/intel_batch_decoder.c
+++ b/src/intel/common/intel_batch_decoder.c
@@ -979,6 +979,26 @@ decode_vs_state(struct intel_batch_decode_ctx *ctx, uint32_t offset)
ctx_print_group(ctx, strct, offset, bind_bo.map);
}
+static void
+decode_gs_state(struct intel_batch_decode_ctx *ctx, uint32_t offset)
+{
+ struct intel_group *strct =
+ intel_spec_find_struct(ctx->spec, "GS_STATE");
+ if (strct == NULL) {
+ fprintf(ctx->fp, "did not find GS_STATE info\n");
+ return;
+ }
+
+ struct intel_batch_decode_bo bind_bo =
+ ctx_get_bo(ctx, true, offset);
+
+ if (bind_bo.map == NULL) {
+ fprintf(ctx->fp, " gs state unavailable\n");
+ return;
+ }
+
+ ctx_print_group(ctx, strct, offset, bind_bo.map);
+}
static void
decode_clip_state(struct intel_batch_decode_ctx *ctx, uint32_t offset)
@@ -1114,6 +1134,10 @@ decode_pipelined_pointers(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
{
fprintf(ctx->fp, "VS State Table:\n");
decode_vs_state(ctx, p[1]);
+ if (p[2] & 1) {
+ fprintf(ctx->fp, "GS State Table:\n");
+ decode_gs_state(ctx, p[2] & ~1);
+ }
fprintf(ctx->fp, "Clip State Table:\n");
decode_clip_state(ctx, p[3] & ~1);
fprintf(ctx->fp, "SF State Table:\n");