summaryrefslogtreecommitdiff
path: root/intel/intel_decode.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-01-04 12:23:42 -0800
committerEric Anholt <eric@anholt.net>2012-01-27 13:21:20 -0800
commit938df6be489cb66c2f90043a8ced9834765e4e8e (patch)
tree724e4f1d9cc0bf7ad32c4ef088787f7c60e53459 /intel/intel_decode.c
parent6a0b25e66b5515b3831db272211c337bcbdfb39a (diff)
intel: Add decode for gen7 state pointers.
Since CC_STATE_POINTERS for gen6 and 7 are quite different but use the same opcode, move gen6 out to a helper function too, so we can use a helper function for gen7.
Diffstat (limited to 'intel/intel_decode.c')
-rw-r--r--intel/intel_decode.c80
1 files changed, 71 insertions, 9 deletions
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 7b4ed42b..49242dcf 100644
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
@@ -2704,6 +2704,71 @@ state_max_out(struct drm_intel_decode *ctx, unsigned int index,
}
static int
+gen7_3DSTATE_VIEWPORT_STATE_POINTERS_CC(struct drm_intel_decode *ctx)
+{
+ instr_out(ctx, 0, "3DSTATE_VIEWPORT_STATE_POINTERS_CC\n");
+ instr_out(ctx, 1, "pointer to CC viewport\n");
+
+ return 2;
+}
+
+static int
+gen7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP(struct drm_intel_decode *ctx)
+{
+ instr_out(ctx, 0, "3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP\n");
+ instr_out(ctx, 1, "pointer to SF_CLIP viewport\n");
+
+ return 2;
+}
+
+static int
+gen7_3DSTATE_BLEND_STATE_POINTERS(struct drm_intel_decode *ctx)
+{
+ instr_out(ctx, 0, "3DSTATE_BLEND_STATE_POINTERS\n");
+ instr_out(ctx, 1, "pointer to BLEND_STATE at 0x%08x (%s)\n",
+ ctx->data[1] & ~1,
+ (ctx->data[1] & 1) ? "changed" : "unchanged");
+
+ return 2;
+}
+
+static int
+gen7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS(struct drm_intel_decode *ctx)
+{
+ instr_out(ctx, 0, "3DSTATE_DEPTH_STENCIL_STATE_POINTERS\n");
+ instr_out(ctx, 1,
+ "pointer to DEPTH_STENCIL_STATE at 0x%08x (%s)\n",
+ ctx->data[1] & ~1,
+ (ctx->data[1] & 1) ? "changed" : "unchanged");
+
+ return 2;
+}
+
+static int
+gen6_3DSTATE_CC_STATE_POINTERS(struct drm_intel_decode *ctx)
+{
+ instr_out(ctx, 0, "3DSTATE_CC_STATE_POINTERS\n");
+ instr_out(ctx, 1, "blend change %d\n", ctx->data[1] & 1);
+ instr_out(ctx, 2, "depth stencil change %d\n",
+ ctx->data[2] & 1);
+ instr_out(ctx, 3, "cc change %d\n", ctx->data[3] & 1);
+
+ return 4;
+}
+
+static int
+gen7_3DSTATE_CC_STATE_POINTERS(struct drm_intel_decode *ctx)
+{
+ instr_out(ctx, 0, "3DSTATE_CC_STATE_POINTERS\n");
+ instr_out(ctx, 1, "pointer to COLOR_CALC_STATE at 0x%08x "
+ "(%s)\n",
+ ctx->data[1] & ~1,
+ (ctx->data[1] & 1) ? "changed" : "unchanged");
+
+ return 2;
+}
+
+static int
gen7_3DSTATE_URB_unit(struct drm_intel_decode *ctx, const char *unit)
{
int start_kb = ((ctx->data[1] >> 25) & 0x3f) * 8;
@@ -2779,7 +2844,8 @@ decode_3d_965(struct drm_intel_decode *ctx)
{ 0x780a, 0x00ff, 3, 3, "3DSTATE_INDEX_BUFFER" },
{ 0x780b, 0xffff, 1, 1, "3DSTATE_VF_STATISTICS" },
{ 0x780d, 0x00ff, 4, 4, "3DSTATE_VIEWPORT_STATE_POINTERS" },
- { 0x780e, 0xffff, 4, 4, "3DSTATE_CC_STATE_POINTERS" },
+ { 0x780e, 0xffff, 4, 4, NULL, 6, gen6_3DSTATE_CC_STATE_POINTERS },
+ { 0x780e, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_CC_STATE_POINTERS },
{ 0x780f, 0x00ff, 2, 2, "3DSTATE_SCISSOR_POINTERS" },
{ 0x7810, 0x00ff, 6, 6, "3DSTATE_VS" },
{ 0x7811, 0x00ff, 7, 7, "3DSTATE_GS" },
@@ -2790,6 +2856,10 @@ decode_3d_965(struct drm_intel_decode *ctx)
{ 0x7816, 0x00ff, 5, 5, "3DSTATE_CONSTANT_GS_STATE" },
{ 0x7817, 0x00ff, 5, 5, "3DSTATE_CONSTANT_PS_STATE" },
{ 0x7818, 0xffff, 2, 2, "3DSTATE_SAMPLE_MASK" },
+ { 0x7821, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP },
+ { 0x7823, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_VIEWPORT_STATE_POINTERS_CC },
+ { 0x7824, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_BLEND_STATE_POINTERS },
+ { 0x7825, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS },
{ 0x7830, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_VS },
{ 0x7831, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_HS },
{ 0x7832, 0x00ff, 2, 2, NULL, 7, gen7_3DSTATE_URB_DS },
@@ -3006,14 +3076,6 @@ decode_3d_965(struct drm_intel_decode *ctx)
instr_out(ctx, 2, "ending buffer address\n");
return len;
- case 0x780e:
- instr_out(ctx, 0, "3DSTATE_CC_STATE_POINTERS\n");
- instr_out(ctx, 1, "blend change %d\n", data[1] & 1);
- instr_out(ctx, 2, "depth stencil change %d\n",
- data[2] & 1);
- instr_out(ctx, 3, "cc change %d\n", data[3] & 1);
- return len;
-
case 0x780f:
instr_out(ctx, 0, "3DSTATE_SCISSOR_POINTERS\n");
instr_out(ctx, 1, "scissor rect offset\n");