Skip to content
Permalink
Browse files
Initial work on preshader support.
Parses and outputs in testparse. Some gaps in the reverse engineering still,
 and probably some bugs still, too. Doesn't actually USE the preshaders yet,
 but now the data is available to us.
  • Loading branch information
icculus committed May 30, 2011
1 parent 3adc83a commit 8ad755d3bf71148e77efc3ac471b98d5d8655097

File 3 of 4 in 8ad755d

@@ -155,6 +155,8 @@ typedef uint64_t uint64;
# define SWAP32(x) (x)
#endif

#define SWAPDBL(x) (x) // !!! FIXME

static inline int Min(const int a, const int b)
{
return ((a < b) ? a : b);
@@ -245,6 +247,12 @@ ssize_t buffer_find(Buffer *buffer, const size_t start,
#define CTYPEINFO_SIZE 16 // sizeof (D3DXSHADER_TYPEINFO).
#define CMEMBERINFO_SIZE 8 // sizeof (D3DXSHADER_STRUCTMEMBERINFO)

// Preshader magic values...
#define PRES_ID 0x53455250 // 0x53455250 == 'PRES'
#define PRSI_ID 0x49535250 // 0x49535250 == 'PRSI'
#define CLIT_ID 0x54494C43 // 0x54494C43 == 'CLIT'
#define FXLC_ID 0x434C5846 // 0x434C5846 == 'FXLC'

// we need to reference these by explicit value occasionally...
#define OPCODE_RET 28
#define OPCODE_IF 40

0 comments on commit 8ad755d

Please sign in to comment.