Hacked in shader disassembler.

Checking this in before I break it. Has tons of issues.
Turns out the 360 GPU uses an Adreno (rAdeon)-like r2xx shader format.
VC++'s handling of bitfields is absolutely terrible.
This commit is contained in:
Ben Vanik
2013-10-09 19:35:54 -07:00
parent 17be429244
commit 7b97d475c2
6 changed files with 1235 additions and 5629 deletions

View File

@@ -11,6 +11,7 @@
#include <xenia/gpu/gpu-private.h>
#include <xenia/gpu/ucode/ucode_disassembler.h>
#include <xenia/gpu/ucode/ucode_ops.h>
using namespace xe;
@@ -53,13 +54,13 @@ void NopGraphicsDriver::SetShader(
uint8_t* p = xe_memory_addr(memory_, address);
uint32_t dw0 = XEGETUINT32BE(p + 0);
uint32_t* dws = (uint32_t*)xe_malloc(length);
for (int n = 0; n < length; n += 4) {
uint32_t dws[512] = {0};
for (uint32_t n = 0; n < length; n += 4) {
dws[n / 4] = XEGETUINT32BE(p + n);
}
UcodeDisassembler disasm;
//
disasm.Disassemble(dws, length / 4, type == XE_GPU_SHADER_TYPE_PIXEL);
}
void NopGraphicsDriver::DrawIndexed(