summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b87fd9)
raw | patch | inline | side by side (parent: 9b87fd9)
author | Eric Anholt <eric@anholt.net> | |
Fri, 2 Mar 2012 18:27:55 +0000 (10:27 -0800) | ||
committer | Eric Anholt <eric@anholt.net> | |
Sat, 10 Mar 2012 17:23:07 +0000 (09:23 -0800) |
intel/intel_decode.c | patch | blob | history | |
intel/tests/gen7-3d.batch-ref.txt | patch | blob | history |
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index af621d4fa188dee7bd53775cf7501bb05ebb3d9b..df9b704c8ee6b15dec88eefae852d9c8ce510237 100644 (file)
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
}
}
-static const char *get_965_prim_type(uint32_t data)
+static const char *get_965_prim_type(uint32_t primtype)
{
- uint32_t primtype = (data >> 10) & 0x1f;
-
switch (primtype) {
case 0x01:
return "point list";
{
instr_out(ctx, 0,
"3DPRIMITIVE: %s %s\n",
- get_965_prim_type(ctx->data[0]),
+ get_965_prim_type((ctx->data[0] >> 10) & 0x1f),
(ctx->data[0] & (1 << 15)) ? "random" : "sequential");
instr_out(ctx, 1, "vertex count\n");
instr_out(ctx, 2, "start vertex\n");
return 6;
}
+static int
+gen7_3DPRIMITIVE(struct drm_intel_decode *ctx)
+{
+ bool indirect = !!(ctx->data[0] & (1 << 10));
+
+ instr_out(ctx, 0,
+ "3DPRIMITIVE: %s%s\n",
+ indirect ? " indirect" : "",
+ (ctx->data[0] & (1 << 8)) ? " predicated" : "");
+ instr_out(ctx, 1, "%s %s\n",
+ get_965_prim_type(ctx->data[1] & 0x3f),
+ (ctx->data[1] & (1 << 8)) ? "random" : "sequential");
+ instr_out(ctx, 2, indirect ? "ignored" : "vertex count\n");
+ instr_out(ctx, 3, indirect ? "ignored" : "start vertex\n");
+ instr_out(ctx, 4, indirect ? "ignored" : "instance count\n");
+ instr_out(ctx, 5, indirect ? "ignored" : "start instance\n");
+ instr_out(ctx, 6, indirect ? "ignored" : "index bias\n");
+
+ return 7;
+}
+
static int
decode_3d_965(struct drm_intel_decode *ctx)
{
{ 0x7917, 0x00ff, 2, 2+128*2, "3DSTATE_SO_DECL_LIST" },
{ 0x7918, 0x00ff, 4, 4, "3DSTATE_SO_BUFFER" },
{ 0x7a00, 0x00ff, 4, 6, "PIPE_CONTROL" },
- { 0x7b00, 0x00ff, 7, 7, "3DPRIMITIVE", 7 },
+ { 0x7b00, 0x00ff, 7, 7, NULL, 7, gen7_3DPRIMITIVE },
{ 0x7b00, 0x00ff, 6, 6, NULL, 0, gen4_3DPRIMITIVE },
}, *opcode_3d = NULL;
index 1488ca5a903d4c3b1e17a8bacfe5ffee7fc4f327..be3c85e6ffd90d4ca5a2bd68923e79b22cc47825 100644 (file)
0x12300324: 0x11230000: (X, Y, 0.0, 1.0), dst offset 0x00 bytes
0x12300328: 0x02400008: buffer 0: invalid, type 0x0040, src offset 0x0008 bytes
0x1230032c: 0x11130000: (X, Y, Z, 1.0), dst offset 0x00 bytes
-0x12300330: 0x7b000005: 3DPRIMITIVE
-0x12300334: 0x00000007: dword 1
-0x12300338: 0x00000004: dword 2
-0x1230033c: 0x00000000: dword 3
-0x12300340: 0x00000001: dword 4
-0x12300344: 0x00000000: dword 5
-0x12300348: 0x00000000: dword 6
+0x12300330: 0x7b000005: 3DPRIMITIVE:
+0x12300334: 0x00000007: quad list sequential
+0x12300338: 0x00000004: vertex count
+0x1230033c: 0x00000000: start vertex
+0x12300340: 0x00000001: instance count
+0x12300344: 0x00000000: start instance
+0x12300348: 0x00000000: index bias
0x1230034c: 0x05000000: MI_BATCH_BUFFER_END