summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8fb66a7)
raw | patch | inline | side by side (parent: 8fb66a7)
author | Eric Anholt <eric@anholt.net> | |
Tue, 20 Dec 2011 23:05:29 +0000 (15:05 -0800) | ||
committer | Eric Anholt <eric@anholt.net> | |
Fri, 27 Jan 2012 21:21:19 +0000 (13:21 -0800) |
Nothing was consuming it. If something wants this in the future,
would be done using the decode context anyway.
would be done using the decode context anyway.
intel/intel_decode.c | patch | blob | history |
diff --git a/intel/intel_decode.c b/intel/intel_decode.c
index 61797e1c52020ac8353aa006d83bf137d2ff08eb..6345e87771996fcd8e3fd00417f34b403a12e463 100644 (file)
--- a/intel/intel_decode.c
+++ b/intel/intel_decode.c
#define BUFFER_FAIL(_count, _len, _name) do { \
fprintf(out, "Buffer size too small in %s (%d < %d)\n", \
(_name), (_count), (_len)); \
- (*failures)++; \
return count; \
} while (0)
}
static int
-decode_mi(uint32_t *data, uint32_t count, uint32_t hw_offset, int *failures)
+decode_mi(uint32_t *data, uint32_t count, uint32_t hw_offset)
{
unsigned int opcode, len = -1;
const char *post_sync_op = "";
}
instr_out(data, hw_offset, 0, "MI UNKNOWN\n");
- (*failures)++;
return 1;
}
}
static int
-decode_2d(uint32_t *data, uint32_t count, uint32_t hw_offset, int *failures)
+decode_2d(uint32_t *data, uint32_t count, uint32_t hw_offset)
{
unsigned int opcode, len;
}
instr_out(data, hw_offset, 0, "2D UNKNOWN\n");
- (*failures)++;
return 1;
}
static int
-decode_3d_1c(uint32_t *data, uint32_t count, uint32_t hw_offset, int *failures)
+decode_3d_1c(uint32_t *data, uint32_t count, uint32_t hw_offset)
{
uint32_t opcode;
instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_1c opcode = 0x%x\n",
opcode);
- (*failures)++;
return 1;
}
}
static int
-decode_3d_1d(uint32_t *data, uint32_t count,
- uint32_t hw_offset, uint32_t devid, int *failures)
+decode_3d_1d(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid)
{
unsigned int len, i, c, idx, word, map, sampler, instr;
const char *format, *zformat, *type;
}
if (len != i) {
fprintf(out, "Bad count in 3DSTATE_LOAD_INDIRECT\n");
- (*failures)++;
return len;
}
return len;
if (len != i) {
fprintf(out,
"Bad count in 3DSTATE_LOAD_STATE_IMMEDIATE_1\n");
- (*failures)++;
}
return len;
case 0x03:
if (len != i) {
fprintf(out,
"Bad count in 3DSTATE_LOAD_STATE_IMMEDIATE_2\n");
- (*failures)++;
}
return len;
case 0x00:
}
if (len != i) {
fprintf(out, "Bad count in 3DSTATE_MAP_STATE\n");
- (*failures)++;
return len;
}
return len;
if (len != i) {
fprintf(out,
"Bad count in 3DSTATE_PIXEL_SHADER_CONSTANTS\n");
- (*failures)++;
}
return len;
case 0x05:
if ((len - 1) % 3 != 0 || len > 370) {
fprintf(out,
"Bad count in 3DSTATE_PIXEL_SHADER_PROGRAM\n");
- (*failures)++;
}
i = 1;
for (instr = 0; instr < (len - 1) / 3; instr++) {
}
if (len != i) {
fprintf(out, "Bad count in 3DSTATE_SAMPLER_STATE\n");
- (*failures)++;
}
return len;
case 0x85:
len > opcode_3d_1d->max_len) {
fprintf(out, "Bad count in %s\n",
opcode_3d_1d->name);
- (*failures)++;
}
}
instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_1d opcode = 0x%x\n",
opcode);
- (*failures)++;
return 1;
}
static int
-decode_3d_primitive(uint32_t *data, uint32_t count, uint32_t hw_offset,
- int *failures)
+decode_3d_primitive(uint32_t *data, uint32_t count, uint32_t hw_offset)
{
char immediate = (data[0] & (1 << 23)) == 0;
unsigned int len, i, j, ret;
}
fprintf(out,
"3DPRIMITIVE: no terminator found in index buffer\n");
- (*failures)++;
ret = count;
goto out;
} else {
}
static int
-decode_3d(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid,
- int *failures)
+decode_3d(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid)
{
uint32_t opcode;
unsigned int idx;
@@ -2541,11 +2524,11 @@ decode_3d(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid,
switch (opcode) {
case 0x1f:
- return decode_3d_primitive(data, count, hw_offset, failures);
+ return decode_3d_primitive(data, count, hw_offset);
case 0x1d:
- return decode_3d_1d(data, count, hw_offset, devid, failures);
+ return decode_3d_1d(data, count, hw_offset, devid);
case 0x1c:
- return decode_3d_1c(data, count, hw_offset, failures);
+ return decode_3d_1c(data, count, hw_offset);
}
for (idx = 0; idx < ARRAY_SIZE(opcodes_3d); idx++) {
}
instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d opcode = 0x%x\n", opcode);
- (*failures)++;
return 1;
}
}
static int
-i965_decode_urb_fence(uint32_t *data, uint32_t hw_offset, int len, uint32_t count,
- int *failures)
+i965_decode_urb_fence(uint32_t *data, uint32_t hw_offset, int len,
+ uint32_t count)
{
uint32_t vs_fence, clip_fence, gs_fence, sf_fence, vfe_fence, cs_fence;
}
static int
-decode_3d_965(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid,
- int *failures)
+decode_3d_965(uint32_t *data, uint32_t count, uint32_t hw_offset,
+ uint32_t devid)
{
uint32_t opcode;
unsigned int idx, len;
@@ -2839,8 +2821,7 @@ decode_3d_965(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid
switch (opcode) {
case 0x6000:
len = (data[0] & 0x000000ff) + 2;
- return i965_decode_urb_fence(data, hw_offset, len, count,
- failures);
+ return i965_decode_urb_fence(data, hw_offset, len, count);
case 0x6001:
instr_out(data, hw_offset, 0, "CS_URB_STATE\n");
instr_out(data, hw_offset, 1,
@@ -3481,13 +3462,12 @@ decode_3d_965(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid
instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_965 opcode = 0x%x\n",
opcode);
- (*failures)++;
return 1;
}
static int
-decode_3d_i830(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devid,
- int *failures)
+decode_3d_i830(uint32_t *data, uint32_t count, uint32_t hw_offset,
+ uint32_t devid)
{
unsigned int idx;
uint32_t opcode;
@@ -3520,11 +3500,11 @@ decode_3d_i830(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devi
switch (opcode) {
case 0x1f:
- return decode_3d_primitive(data, count, hw_offset, failures);
+ return decode_3d_primitive(data, count, hw_offset);
case 0x1d:
- return decode_3d_1d(data, count, hw_offset, devid, failures);
+ return decode_3d_1d(data, count, hw_offset, devid);
case 0x1c:
- return decode_3d_1c(data, count, hw_offset, failures);
+ return decode_3d_1c(data, count, hw_offset);
}
for (idx = 0; idx < ARRAY_SIZE(opcodes_3d); idx++) {
@@ -3554,7 +3534,6 @@ decode_3d_i830(uint32_t *data, uint32_t count, uint32_t hw_offset, uint32_t devi
instr_out(data, hw_offset, 0, "3D UNKNOWN: 3d_i830 opcode = 0x%x\n",
opcode);
- (*failures)++;
return 1;
}
{
int ret;
unsigned int index = 0;
- int failures = 0;
uint32_t devid;
if (!ctx)
switch ((ctx->data[index] & 0xe0000000) >> 29) {
case 0x0:
ret = decode_mi(ctx->data, ctx->count,
- ctx->hw_offset, &failures);
+ ctx->hw_offset);
/* If MI_BATCHBUFFER_END happened, then dump
* the rest of the output in case we some day
break;
case 0x2:
index += decode_2d(ctx->data, ctx->count,
- ctx->hw_offset, &failures);
+ ctx->hw_offset);
break;
case 0x3:
if (IS_9XX(devid) && !IS_GEN3(devid)) {
index +=
decode_3d_965(ctx->data, ctx->count,
- ctx->hw_offset, devid,
- &failures);
+ ctx->hw_offset, devid);
} else if (IS_GEN3(devid)) {
index += decode_3d(ctx->data, ctx->count,
- ctx->hw_offset,
- devid, &failures);
+ ctx->hw_offset, devid);
} else {
index +=
decode_3d_i830(ctx->data, ctx->count,
- ctx->hw_offset, devid,
- &failures);
+ ctx->hw_offset, devid);
}
break;
default:
instr_out(ctx->data, ctx->hw_offset, index,
"UNKNOWN\n");
- failures++;
index++;
break;
}