diff options
author | Chia-I Wu <[email protected]> | 2014-11-05 13:10:25 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-11-06 10:43:53 +0800 |
commit | 58099ed0a163f5d360e5429b085533d1bdea538c (patch) | |
tree | 8003892859adada659fc26bbdf34c1e57e1a5a15 /src/gallium | |
parent | bfaed536dd98c2977412eff071e9e35d389ed6b8 (diff) |
ilo: disassemble TS messages
Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_compiler_disasm.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/shader/toy_compiler_disasm.c b/src/gallium/drivers/ilo/shader/toy_compiler_disasm.c index 94321afdf38..c3ad09138a9 100644 --- a/src/gallium/drivers/ilo/shader/toy_compiler_disasm.c +++ b/src/gallium/drivers/ilo/shader/toy_compiler_disasm.c @@ -1219,6 +1219,38 @@ disasm_printer_add_mdesc_urb(struct disasm_printer *printer, } static void +disasm_printer_add_mdesc_spawner(struct disasm_printer *printer, + const struct disasm_inst *inst, + uint32_t mdesc) +{ + const char *from; + + switch (mdesc & GEN6_MSG_TS_REQUESTER_TYPE__MASK) { + case GEN6_MSG_TS_REQUESTER_TYPE_ROOT: from = "root"; break; + case GEN6_MSG_TS_REQUESTER_TYPE_CHILD: from = "child"; break; + default: from = "BAD"; break; + } + + disasm_printer_add(printer, "(%s thread ", from); + + switch (mdesc & GEN6_MSG_TS_OPCODE__MASK) { + case GEN6_MSG_TS_OPCODE_DEREF: + disasm_printer_add(printer, "%sderef", + (mdesc & GEN6_MSG_TS_RESOURCE_SELECT_NO_DEREF) ? "no " : ""); + break; + case GEN6_MSG_TS_OPCODE_SPAWN: + disasm_printer_add(printer, "spawn %s)", + (mdesc & GEN6_MSG_TS_RESOURCE_SELECT_ROOT) ? "root" : "child"); + break; + default: + disasm_printer_add(printer, "BAD"); + break; + } + + disasm_printer_add(printer, ")"); +} + +static void disasm_printer_add_mdesc_dp_sampler(struct disasm_printer *printer, const struct disasm_inst *inst, uint32_t mdesc) @@ -1338,6 +1370,9 @@ disasm_printer_add_mdesc(struct disasm_printer *printer, case GEN6_SFID_URB: disasm_printer_add_mdesc_urb(printer, inst, mdesc); break; + case GEN6_SFID_SPAWNER: + disasm_printer_add_mdesc_spawner(printer, inst, mdesc); + break; case GEN6_SFID_DP_CC: case GEN7_SFID_DP_DC0: case GEN7_SFID_PI: |