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

@@ -63,6 +63,24 @@ using std::tr1::shared_ptr;
#define XENOINLINE
#endif // MSVC
#if XE_COMPILER(MSVC)
#define XEPACKEDSTRUCT(name, value) \
__pragma(pack(push, 1)) struct name##_s value __pragma(pack(pop)); \
typedef struct name##_s name;
#define XEPACKEDSTRUCTANONYMOUS(value) \
__pragma(pack(push, 1)) struct value __pragma(pack(pop));
#define XEPACKEDUNION(name, value) \
__pragma(pack(push, 1)) union name##_s value __pragma(pack(pop)); \
typedef union name##_s name;
#elif XE_COMPILER(GNUC)
#define XEPACKEDSTRUCT(name, value) \
struct __attribute__((packed)) name
#define XEPACKEDSTRUCTANONYMOUS(value) \
struct __attribute__((packed))
#define XEPACKEDUNION(name, value) \
union __attribute__((packed)) name
#endif // MSVC
#if XE_COMPILER(MSVC)
// http://msdn.microsoft.com/en-us/library/83ythb65.aspx
#define XECACHEALIGN __declspec(align(XE_ALIGNMENT))