DX11 wip.

This commit is contained in:
bkaradzic 2012-08-05 14:51:49 -07:00
parent 7adf1f6dc2
commit 45a85d438c
11 changed files with 6141 additions and 5916 deletions

View file

@ -1,37 +1,38 @@
static const uint8_t fs_clear_dx11[539] = static const uint8_t fs_clear_dx11[560] =
{ {
0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x44, 0x58, 0x42, 0x43, 0xda, 0x0f, 0xc3, 0x91, 0x70, 0x6f, // ......DXBC....po 0x02, 0x00, 0x0b, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x05, // ...SV_POSITION..
0xd4, 0x7b, 0xeb, 0xe0, 0x21, 0x07, 0x79, 0xd8, 0x54, 0xd4, 0x01, 0x00, 0x00, 0x00, 0x14, 0x02, // .{..!.y.T....... 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x00, 0x00, 0x00, 0x14, 0x02, 0x44, 0x58, 0x42, 0x43, 0xda, // COLOR......DXBC.
0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x01, // ......4......... 0x0f, 0xc3, 0x91, 0x70, 0x6f, 0xd4, 0x7b, 0xeb, 0xe0, 0x21, 0x07, 0x79, 0xd8, 0x54, 0xd4, 0x01, // ...po.{..!.y.T..
0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x70, 0x00, // ..4...x...RDEFp. 0x00, 0x00, 0x00, 0x14, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xac, // ...........4....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, // ..............<. 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x34, 0x01, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x52, // .......4...x...R
0x00, 0x00, 0x00, 0x05, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x52, 0x44, // ..........<...RD 0x44, 0x45, 0x46, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // DEFp............
0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, // 11<....... ...(. 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x3c, // ...<...........<
0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, // ..$...........Mi 0x00, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, // ...RD11<.......
0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, // ...(...$........
0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, // ...Microsoft (R)
0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, // 9.29.952.3111.. 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, // HLSL Shader Com
0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, // ..ISGNL......... 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, // piler 9.29.952.3
0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..8............. 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, // 111....ISGNL....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........D..... 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // .......8........
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, // ................ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, // ...............D
0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, // ................
0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, // LOR...OSGN,..... 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... ......... 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // ON.COLOR...OSGN,
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, // ..............SV 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... ....
0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0x3c, 0x00, // _TARGET...SHEX<. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................
0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x62, 0x10, // ..P.......j...b. 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, // ..........e.... 0x48, 0x45, 0x58, 0x3c, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x6a, // HEX<...P.......j
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, // ......6.... .... 0x08, 0x00, 0x01, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...b...........e
0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, // ..F.......>...ST 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, // .... ......6....
0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // AT.............. 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, // ......F.......>
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, // ...STAT.........
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...........
}; };

View file

@ -1,58 +1,61 @@
static const uint8_t fs_debugfont_dx11[879] = static const uint8_t fs_debugfont_dx11[917] =
{ {
0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x44, 0x58, 0x42, 0x43, 0x86, 0xad, 0xb6, 0x81, 0xa7, 0x03, // ....h.DXBC...... 0x04, 0x00, 0x0b, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x05, // ...SV_POSITION..
0x01, 0x3e, 0x2a, 0x57, 0xe1, 0x88, 0xd8, 0x74, 0xb7, 0x81, 0x01, 0x00, 0x00, 0x00, 0x68, 0x03, // .>*W...t......h. 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x01, 0x05, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x08, 0x54, 0x45, // COLOR..COLOR..TE
0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x80, 0x01, // ......4......... 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x00, 0x00, 0x00, 0x68, 0x03, 0x44, 0x58, 0x42, 0x43, // XCOORD....h.DXBC
0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xb8, 0x00, // ..........RDEF.. 0x86, 0xad, 0xb6, 0x81, 0xa7, 0x03, 0x01, 0x3e, 0x2a, 0x57, 0xe1, 0x88, 0xd8, 0x74, 0xb7, 0x81, // .......>*W...t..
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, // ..............<. 0x01, 0x00, 0x00, 0x00, 0x68, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ....h.......4...
0x00, 0x00, 0x00, 0x05, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x52, 0x44, // ..............RD 0xf4, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, // ................
0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, // 11<....... ...(. 0x52, 0x44, 0x45, 0x46, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEF............
0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, // ..$...........|. 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, // ....<...........
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x87, 0x00, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ....RD11<.......
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, // ..............|. 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // ...(...$.......
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, // ................ 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....|...........
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, // ..............u_ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, // texColor.Microso 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....|...........
0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, // ft (R) HLSL Shad 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, // er Compiler 9.29 0x0c, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x4d, // ....u_texColor.M
0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x84, 0x00, // .952.3111.ISGN.. 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........h..... 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, // r 9.29.952.3111.
0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..t............. 0x49, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGN............
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, // ..........t..... 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // h...............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, // ................ 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........t.......
0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..z............. 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, // ..........SV_POS 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // t...............
0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, // ITION.COLOR.TEXC 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........z.......
0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, // OORD..OSGN,..... 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...... ......... 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, // ..............SV 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, // R.TEXCOORD..OSGN
0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0x10, 0x01, // _TARGET...SHEX.. 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ...
0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x5a, 0x00, // ..P...D...j...Z. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, // ...`......X....p 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET...
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, // ......UU..b..... 0x53, 0x48, 0x45, 0x58, 0x10, 0x01, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // SHEX....P...D...
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, // ......b......... 0x6a, 0x08, 0x00, 0x01, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // j...Z....`......
0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, // ..b...2.......e. 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, // X....p......UU..
0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, // ... ......h..... 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // b...........b...
0x00, 0x00, 0x45, 0x00, 0x00, 0x8b, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0x12, 0x00, // ..E.......CU.... 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // ........b...2...
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x7e, // ......F.......F~ 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ......
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......`........ 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x8b, 0xc2, 0x00, 0x00, 0x80, // h.......E.......
0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, // ..........F..... 0x43, 0x55, 0x15, 0x00, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, // CU..........F...
0x00, 0x00, 0x46, 0x1e, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, // ..F...A.......2. 0x03, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, // ....F~.......`..
0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, // ..F.......F..... 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, // F.......F...A...
0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, // ..1...........:. 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2...........
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x0d, 0x00, // .......@.....;.. 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F.......
0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, // ..........6.... 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, // F.......1.......
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, // ......F.......>. 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, // ....:........@..
0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, // ..STAT.......... 0x81, 0x80, 0x80, 0x3b, 0x0d, 0x00, 0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ...;............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // 6.... ......F...
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, // ....>...STAT....
0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ................
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ............... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, // .....
}; };

View file

@ -42,7 +42,7 @@ namespace bgfx
static const D3D11_COMPARISON_FUNC s_depthFunc[] = static const D3D11_COMPARISON_FUNC s_depthFunc[] =
{ {
(D3D11_COMPARISON_FUNC)0, // ignored D3D11_COMPARISON_LESS, // ignored
D3D11_COMPARISON_LESS, D3D11_COMPARISON_LESS,
D3D11_COMPARISON_LESS_EQUAL, D3D11_COMPARISON_LESS_EQUAL,
D3D11_COMPARISON_EQUAL, D3D11_COMPARISON_EQUAL,
@ -60,6 +60,19 @@ namespace bgfx
D3D11_CULL_BACK, D3D11_CULL_BACK,
}; };
static DXGI_FORMAT s_colorFormat[] =
{
DXGI_FORMAT_UNKNOWN, // ignored
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R32_FLOAT,
};
static const DXGI_FORMAT s_depthFormat[] =
{
DXGI_FORMAT_UNKNOWN, // ignored
DXGI_FORMAT_D24_UNORM_S8_UINT,
};
static const D3D11_TEXTURE_ADDRESS_MODE s_textureAddress[] = static const D3D11_TEXTURE_ADDRESS_MODE s_textureAddress[] =
{ {
D3D11_TEXTURE_ADDRESS_WRAP, D3D11_TEXTURE_ADDRESS_WRAP,
@ -155,7 +168,7 @@ namespace bgfx
default: default:
case 4: case 4:
format = DXGI_FORMAT_R8G8B8A8_UNORM; //DXGI_FORMAT_R8G8B8A8_UINT; format = DXGI_FORMAT_R8G8B8A8_UINT;
break; break;
} }
} }
@ -229,10 +242,23 @@ namespace bgfx
return elem; return elem;
} }
struct TextureStage
{
TextureStage()
{
memset(m_srv, 0, sizeof(m_srv) );
memset(m_sampler, 0, sizeof(m_sampler) );
}
ID3D11ShaderResourceView* m_srv[BGFX_STATE_TEX_COUNT];
ID3D11SamplerState* m_sampler[BGFX_STATE_TEX_COUNT];
};
struct RendererContext struct RendererContext
{ {
RendererContext() RendererContext()
: m_vsChanges(0) : m_wireframe(false)
, m_vsChanges(0)
, m_fsChanges(0) , m_fsChanges(0)
{ {
} }
@ -242,18 +268,10 @@ namespace bgfx
m_d3d11dll = LoadLibrary("d3d11.dll"); m_d3d11dll = LoadLibrary("d3d11.dll");
BGFX_FATAL(NULL != m_d3d11dll, Fatal::D3D11_UnableToInitialize, "Failed to load d3d11.dll."); BGFX_FATAL(NULL != m_d3d11dll, Fatal::D3D11_UnableToInitialize, "Failed to load d3d11.dll.");
m_dxgidll = LoadLibrary("dxgi.dll");
BGFX_FATAL(NULL != m_dxgidll, Fatal::D3D11_UnableToInitialize, "Failed to load dxgi.dll.");
PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN d3D11CreateDeviceAndSwapChain = (PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)GetProcAddress(m_d3d11dll, "D3D11CreateDeviceAndSwapChain"); PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN d3D11CreateDeviceAndSwapChain = (PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN)GetProcAddress(m_d3d11dll, "D3D11CreateDeviceAndSwapChain");
BGFX_FATAL(NULL != d3D11CreateDeviceAndSwapChain, Fatal::D3D11_UnableToInitialize, "Function D3D11CreateDeviceAndSwapChain not found."); BGFX_FATAL(NULL != d3D11CreateDeviceAndSwapChain, Fatal::D3D11_UnableToInitialize, "Function D3D11CreateDeviceAndSwapChain not found.");
CreateDXGIFactoryFn createDXGIFactory = (CreateDXGIFactoryFn)GetProcAddress(m_dxgidll, "CreateDXGIFactory");
BGFX_FATAL(NULL != createDXGIFactory, Fatal::D3D11_UnableToInitialize, "Function CreateDXGIFactory not found.");
HRESULT hr; HRESULT hr;
// IDXGIFactory* factory;
// hr = CreateDXGIFactory(__uuidof(IDXGIFactory), (void**)(&factory) );
D3D_FEATURE_LEVEL features[] = D3D_FEATURE_LEVEL features[] =
{ {
@ -296,39 +314,19 @@ namespace bgfx
); );
BGFX_FATAL(SUCCEEDED(hr), Fatal::D3D11_UnableToInitialize, "Unable to create Direct3D11 device."); BGFX_FATAL(SUCCEEDED(hr), Fatal::D3D11_UnableToInitialize, "Unable to create Direct3D11 device.");
ID3D11Texture2D* color;
DX_CHECK(m_swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)&color) );
DX_CHECK(m_device->CreateRenderTargetView(color, NULL, &m_backBufferColor) );
DX_RELEASE(color, 0);
D3D11_TEXTURE2D_DESC dsd;
dsd.Width = m_scd.BufferDesc.Width;
dsd.Height = m_scd.BufferDesc.Height;
dsd.MipLevels = 1;
dsd.ArraySize = 1;
dsd.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
dsd.SampleDesc = m_scd.SampleDesc;
dsd.Usage = D3D11_USAGE_DEFAULT;
dsd.BindFlags = D3D11_BIND_DEPTH_STENCIL;
dsd.CPUAccessFlags = 0;
dsd.MiscFlags = 0;
ID3D11Texture2D* depthStencil;
DX_CHECK(m_device->CreateTexture2D(&dsd, NULL, &depthStencil) );
DX_CHECK(m_device->CreateDepthStencilView(depthStencil, NULL, &m_backBufferDepthStencil) );
DX_RELEASE(depthStencil, 0);
m_deviceCtx->OMSetRenderTargets(1, &m_backBufferColor, m_backBufferDepthStencil);
for (uint32_t ii = 0; ii < PredefinedUniform::Count; ++ii) for (uint32_t ii = 0; ii < PredefinedUniform::Count; ++ii)
{ {
m_predefinedUniforms[ii].create(ConstantType::Uniform4x4fv, 1, false); m_predefinedUniforms[ii].create(ConstantType::Uniform4x4fv, 1, false);
m_uniformReg.reg(getPredefinedUniformName(PredefinedUniform::Enum(ii) ), &m_predefinedUniforms[ii]); m_uniformReg.reg(getPredefinedUniformName(PredefinedUniform::Enum(ii) ), &m_predefinedUniforms[ii]);
} }
postReset();
} }
void shutdown() void shutdown()
{ {
preReset();
m_deviceCtx->ClearState(); m_deviceCtx->ClearState();
invalidateCache(); invalidateCache();
@ -373,16 +371,49 @@ namespace bgfx
m_predefinedUniforms[ii].destroy(); m_predefinedUniforms[ii].destroy();
} }
DX_RELEASE(m_backBufferDepthStencil, 0);
DX_RELEASE(m_backBufferColor, 0);
DX_RELEASE(m_swapChain, 0); DX_RELEASE(m_swapChain, 0);
DX_RELEASE(m_deviceCtx, 0); DX_RELEASE(m_deviceCtx, 0);
DX_RELEASE(m_device, 0); DX_RELEASE(m_device, 0);
FreeLibrary(m_dxgidll);
FreeLibrary(m_d3d11dll); FreeLibrary(m_d3d11dll);
} }
void preReset()
{
DX_RELEASE(m_backBufferDepthStencil, 0);
DX_RELEASE(m_backBufferColor, 0);
// invalidateCache();
}
void postReset()
{
ID3D11Texture2D* color;
DX_CHECK(m_swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (void**)&color) );
DX_CHECK(m_device->CreateRenderTargetView(color, NULL, &m_backBufferColor) );
DX_RELEASE(color, 0);
D3D11_TEXTURE2D_DESC dsd;
dsd.Width = m_scd.BufferDesc.Width;
dsd.Height = m_scd.BufferDesc.Height;
dsd.MipLevels = 1;
dsd.ArraySize = 1;
dsd.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
dsd.SampleDesc = m_scd.SampleDesc;
dsd.Usage = D3D11_USAGE_DEFAULT;
dsd.BindFlags = D3D11_BIND_DEPTH_STENCIL;
dsd.CPUAccessFlags = 0;
dsd.MiscFlags = 0;
ID3D11Texture2D* depthStencil;
DX_CHECK(m_device->CreateTexture2D(&dsd, NULL, &depthStencil) );
DX_CHECK(m_device->CreateDepthStencilView(depthStencil, NULL, &m_backBufferDepthStencil) );
DX_RELEASE(depthStencil, 0);
m_deviceCtx->OMSetRenderTargets(1, &m_backBufferColor, m_backBufferDepthStencil);
}
void flip() void flip()
{ {
if (NULL != m_swapChain) if (NULL != m_swapChain)
@ -411,30 +442,19 @@ namespace bgfx
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height); m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
m_textVideoMem.clear(); m_textVideoMem.clear();
#if 0 m_scd.BufferDesc.Width = _resolution.m_width;
D3DDEVICE_CREATION_PARAMETERS dcp; m_scd.BufferDesc.Height = _resolution.m_height;
DX_CHECK(m_device->GetCreationParameters(&dcp) );
D3DDISPLAYMODE dm;
DX_CHECK(m_d3d9->GetAdapterDisplayMode(dcp.AdapterOrdinal, &dm) );
m_params.BackBufferFormat = dm.Format;
m_params.BackBufferWidth = _resolution.m_width;
m_params.BackBufferHeight = _resolution.m_height;
m_params.FullScreen_RefreshRateInHz = BGFX_RESET_FULLSCREEN == (m_flags&BGFX_RESET_FULLSCREEN_MASK) ? 60 : 0;
m_params.PresentationInterval = !!(m_flags&BGFX_RESET_VSYNC) ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE;
updateMsaa();
Msaa& msaa = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
m_params.MultiSampleType = msaa.m_type;
m_params.MultiSampleQuality = msaa.m_quality;
preReset(); preReset();
DX_CHECK(m_device->Reset(&m_params) );
DX_CHECK(m_swapChain->ResizeBuffers(2
, m_scd.BufferDesc.Width
, m_scd.BufferDesc.Height
, m_scd.BufferDesc.Format
, DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH
) );
postReset(); postReset();
#endif // 0
} }
} }
@ -483,13 +503,13 @@ namespace bgfx
} }
else else
{ {
RenderTarget& renderTarget = m_renderTargets[_rt.idx];
m_deviceCtx->OMSetRenderTargets(1, &renderTarget.m_rtv, m_backBufferDepthStencil);
} }
} }
void clear(const Rect& _rect, const Clear& _clear) void clear(const Clear& _clear)
{ {
// DX_CHECK(s_renderCtx.m_device->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE) ); // DX_CHECK(s_renderCtx.m_device->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE) );
// DX_CHECK(s_renderCtx.m_device->SetScissorRect(&rc) ); // DX_CHECK(s_renderCtx.m_device->SetScissorRect(&rc) );
@ -521,7 +541,7 @@ namespace bgfx
{ {
D3D11_INPUT_ELEMENT_DESC vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; D3D11_INPUT_ELEMENT_DESC vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT];
D3D11_INPUT_ELEMENT_DESC* elem = fillVertexDecl(vertexElements, Attrib::Count, _vertexDecl); D3D11_INPUT_ELEMENT_DESC* elem = fillVertexDecl(vertexElements, Attrib::Count, _vertexDecl);
DX_CHECK(m_device->CreateInputLayout(vertexElements /*DX_CHECK*/(m_device->CreateInputLayout(vertexElements
, uint32_t(elem-vertexElements) , uint32_t(elem-vertexElements)
, _material.m_vsh->m_code->data , _material.m_vsh->m_code->data
, _material.m_vsh->m_code->size , _material.m_vsh->m_code->size
@ -591,9 +611,19 @@ namespace bgfx
m_deviceCtx->OMSetDepthStencilState(dss, 0); m_deviceCtx->OMSetDepthStencilState(dss, 0);
} }
void setDebugWireframe(bool _wireframe)
{
if (m_wireframe != _wireframe)
{
m_wireframe = _wireframe;
m_rasterizerStateCache.invalidate();
}
}
void setRasterizerState(uint64_t _state, bool _wireframe = false) void setRasterizerState(uint64_t _state, bool _wireframe = false)
{ {
_state &= BGFX_STATE_CULL_MASK; _state &= BGFX_STATE_CULL_MASK;
_state |= _wireframe ? BGFX_STATE_PT_LINES : BGFX_STATE_NONE;
ID3D11RasterizerState* rs = m_rasterizerStateCache.find(_state); ID3D11RasterizerState* rs = m_rasterizerStateCache.find(_state);
if (NULL == rs) if (NULL == rs)
@ -613,7 +643,11 @@ namespace bgfx
m_deviceCtx->RSSetState(rs); m_deviceCtx->RSSetState(rs);
} }
void commitTextureStage()
{
m_deviceCtx->PSSetShaderResources(0, BGFX_STATE_TEX_COUNT, m_textureStage.m_srv);
m_deviceCtx->PSSetSamplers(0, BGFX_STATE_TEX_COUNT, m_textureStage.m_sampler);
}
void saveScreenShot(Memory* _mem) void saveScreenShot(Memory* _mem)
{ {
@ -654,13 +688,14 @@ namespace bgfx
} }
HMODULE m_d3d11dll; HMODULE m_d3d11dll;
HMODULE m_dxgidll;
IDXGISwapChain* m_swapChain; IDXGISwapChain* m_swapChain;
ID3D11Device* m_device; ID3D11Device* m_device;
ID3D11DeviceContext* m_deviceCtx; ID3D11DeviceContext* m_deviceCtx;
ID3D11RenderTargetView* m_backBufferColor; ID3D11RenderTargetView* m_backBufferColor;
ID3D11DepthStencilView* m_backBufferDepthStencil; ID3D11DepthStencilView* m_backBufferDepthStencil;
bool m_wireframe;
DXGI_SWAP_CHAIN_DESC m_scd; DXGI_SWAP_CHAIN_DESC m_scd;
uint32_t m_flags; uint32_t m_flags;
@ -685,6 +720,8 @@ namespace bgfx
TextVideoMem m_textVideoMem; TextVideoMem m_textVideoMem;
RenderTargetHandle m_rt; RenderTargetHandle m_rt;
TextureStage m_textureStage;
Material* m_currentMaterial; Material* m_currentMaterial;
uint8_t m_vsScratch[64<<10]; uint8_t m_vsScratch[64<<10];
@ -888,7 +925,7 @@ namespace bgfx
s_renderCtx.setBlendState(state); s_renderCtx.setBlendState(state);
s_renderCtx.setDepthStencilState(state); s_renderCtx.setDepthStencilState(state);
s_renderCtx.setRasterizerState(state); s_renderCtx.setRasterizerState(state, false);
Material& material = s_renderCtx.m_materials[m_material.idx]; Material& material = s_renderCtx.m_materials[m_material.idx];
s_renderCtx.m_currentMaterial = &material; s_renderCtx.m_currentMaterial = &material;
@ -916,6 +953,7 @@ namespace bgfx
s_renderCtx.commitShaderConstants(); s_renderCtx.commitShaderConstants();
s_renderCtx.m_textures[m_texture.idx].commit(0); s_renderCtx.m_textures[m_texture.idx].commit(0);
s_renderCtx.commitTextureStage();
} }
void TextVideoMemBlitter::render(uint32_t _numIndices) void TextVideoMemBlitter::render(uint32_t _numIndices)
@ -942,28 +980,19 @@ namespace bgfx
&& width == _rect.m_width && width == _rect.m_width
&& height == _rect.m_height) && height == _rect.m_height)
{ {
s_renderCtx.clear(_rect, _clear); s_renderCtx.clear(_clear);
} }
else else
{ {
ID3D11DeviceContext* deviceCtx = s_renderCtx.m_deviceCtx; ID3D11DeviceContext* deviceCtx = s_renderCtx.m_deviceCtx;
D3D11_VIEWPORT vp;
vp.TopLeftX = _rect.m_x;
vp.TopLeftY = _rect.m_y;
vp.Width = (float)_rect.m_width;
vp.Height = (float)_rect.m_height;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;
deviceCtx->RSSetViewports(1, &vp);
uint64_t state = 0; uint64_t state = 0;
state |= _clear.m_flags & BGFX_CLEAR_COLOR_BIT ? BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE : 0; state |= _clear.m_flags & BGFX_CLEAR_COLOR_BIT ? BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE : 0;
state |= _clear.m_flags & BGFX_CLEAR_DEPTH_BIT ? BGFX_STATE_DEPTH_WRITE : 0; state |= _clear.m_flags & BGFX_CLEAR_DEPTH_BIT ? BGFX_STATE_DEPTH_WRITE : 0;
s_renderCtx.setBlendState(state); s_renderCtx.setBlendState(state);
s_renderCtx.setDepthStencilState(state); s_renderCtx.setDepthStencilState(state);
s_renderCtx.setRasterizerState(state); s_renderCtx.setRasterizerState(state, false);
Material& material = s_renderCtx.m_materials[m_material.idx]; Material& material = s_renderCtx.m_materials[m_material.idx];
s_renderCtx.m_currentMaterial = &material; s_renderCtx.m_currentMaterial = &material;
@ -989,7 +1018,7 @@ namespace bgfx
vertex->m_x = -1.0f; vertex->m_x = -1.0f;
vertex->m_y = -1.0f; vertex->m_y = -1.0f;
vertex->m_z = _clear.m_depth; vertex->m_z = _clear.m_depth;
vertex->m_abgr = rand(); //bx::endianSwap(_clear.m_rgba); vertex->m_abgr = bx::endianSwap(_clear.m_rgba);
vertex++; vertex++;
vertex->m_x = 1.0f; vertex->m_x = 1.0f;
vertex->m_y = -1.0f; vertex->m_y = -1.0f;
@ -1024,6 +1053,27 @@ namespace bgfx
m_constantBuffer = ConstantBuffer::create(1024); m_constantBuffer = ConstantBuffer::create(1024);
StreamRead stream(_mem->data, _mem->size); StreamRead stream(_mem->data, _mem->size);
uint8_t numAttr;
stream.read(numAttr);
for (uint8_t ii = 0; ii < numAttr; ++ii)
{
uint8_t semanticIndex;
stream.read(semanticIndex);
uint8_t len;
stream.read(len);
char temp[256];
memcpy(temp, stream.getDataPtr(), len);
temp[len] = '\0';
BX_TRACE("\t: %s %d", temp, semanticIndex);
stream.skip(len);
}
uint16_t count; uint16_t count;
stream.read(count); stream.read(count);
@ -1243,7 +1293,15 @@ namespace bgfx
if (getRawImageData(dds, 0, lod, _mem, mip) ) if (getRawImageData(dds, 0, lod, _mem, mip) )
{ {
srd[kk].pSysMem = mip.m_data; srd[kk].pSysMem = mip.m_data;
if (TextureFormat::Unknown > dds.m_type)
{
srd[kk].SysMemPitch = (mip.m_width/4)*mip.m_blockSize;
}
else
{
srd[kk].SysMemPitch = mip.m_width*mip.m_bpp; srd[kk].SysMemPitch = mip.m_width*mip.m_bpp;
}
srd[kk].SysMemSlicePitch = 0; srd[kk].SysMemSlicePitch = 0;
++kk; ++kk;
} }
@ -1338,18 +1396,71 @@ namespace bgfx
void Texture::commit(uint8_t _stage) void Texture::commit(uint8_t _stage)
{ {
s_renderCtx.m_deviceCtx->PSSetShaderResources(0, 1, &m_ptr); s_renderCtx.m_textureStage.m_srv[_stage] = m_ptr;
s_renderCtx.m_deviceCtx->PSSetSamplers(0, 1, &m_sampler); s_renderCtx.m_textureStage.m_sampler[_stage] = m_sampler;
} }
void RenderTarget::create(uint16_t _width, uint16_t _height, uint32_t _flags, uint32_t _textureFlags) void RenderTarget::create(uint16_t _width, uint16_t _height, uint32_t _flags, uint32_t _textureFlags)
{ {
m_width = _width;
m_height = _height;
m_flags = _flags;
uint32_t colorFormat = (m_flags&BGFX_RENDER_TARGET_COLOR_MASK)>>BGFX_RENDER_TARGET_COLOR_SHIFT;
D3D11_TEXTURE2D_DESC desc;
desc.Width = _width;
desc.Height = _height;
desc.MipLevels = 1;
desc.ArraySize = 1;
desc.Format = s_colorFormat[colorFormat];
desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0;
desc.Usage = D3D11_USAGE_DEFAULT;
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE|D3D11_BIND_RENDER_TARGET;
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
DX_CHECK(s_renderCtx.m_device->CreateTexture2D(&desc, NULL, &m_colorTexture) );
DX_CHECK(s_renderCtx.m_device->CreateRenderTargetView(m_colorTexture, NULL, &m_rtv) );
DX_CHECK(s_renderCtx.m_device->CreateShaderResourceView(m_colorTexture, NULL, &m_srv) );
m_sampler = s_renderCtx.m_samplerStateCache.find(_flags);
if (NULL == m_sampler)
{
D3D11_SAMPLER_DESC desc;
desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
desc.AddressU = s_textureAddress[(_textureFlags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT];
desc.AddressV = s_textureAddress[(_textureFlags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT];
desc.AddressW = s_textureAddress[(_textureFlags&BGFX_TEXTURE_W_MASK)>>BGFX_TEXTURE_W_SHIFT];
desc.MipLODBias = 0.0f;
desc.MaxAnisotropy = 1;
desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
desc.BorderColor[0] = 0.0f;
desc.BorderColor[1] = 0.0f;
desc.BorderColor[2] = 0.0f;
desc.BorderColor[3] = 0.0f;
desc.MinLOD = 0;
desc.MaxLOD = D3D11_FLOAT32_MAX;
s_renderCtx.m_device->CreateSamplerState(&desc, &m_sampler);
s_renderCtx.m_samplerStateCache.add(_flags, m_sampler);
}
}
void RenderTarget::destroy()
{
DX_RELEASE(m_srv, 0);
DX_RELEASE(m_rtv, 0);
DX_RELEASE(m_colorTexture, 0);
m_flags = 0;
} }
void RenderTarget::commit(uint8_t _stage) void RenderTarget::commit(uint8_t _stage)
{ {
s_renderCtx.m_textureStage.m_srv[_stage] = m_srv;
s_renderCtx.m_textureStage.m_sampler[_stage] = m_sampler;
} }
void Uniform::create(ConstantType::Enum _type, uint16_t _num, bool _alloc) void Uniform::create(ConstantType::Enum _type, uint16_t _num, bool _alloc)
@ -1559,7 +1670,9 @@ namespace bgfx
matrix_mul(viewProj[ii].val, m_render->m_view[ii].val, m_render->m_proj[ii].val); matrix_mul(viewProj[ii].val, m_render->m_view[ii].val, m_render->m_proj[ii].val);
} }
// DX_CHECK(s_renderCtx.m_device->SetRenderState(D3DRS_FILLMODE, m_render->m_debug&BGFX_DEBUG_WIREFRAME ? D3DFILL_WIREFRAME : D3DFILL_SOLID) ); bool wireframe = !!(m_render->m_debug&BGFX_DEBUG_WIREFRAME);
s_renderCtx.setDebugWireframe(wireframe);
uint16_t materialIdx = invalidHandle; uint16_t materialIdx = invalidHandle;
SortKey key; SortKey key;
uint8_t view = 0xff; uint8_t view = 0xff;
@ -1621,7 +1734,7 @@ namespace bgfx
s_renderCtx.setBlendState(BGFX_STATE_DEFAULT); s_renderCtx.setBlendState(BGFX_STATE_DEFAULT);
s_renderCtx.setDepthStencilState(BGFX_STATE_DEFAULT); s_renderCtx.setDepthStencilState(BGFX_STATE_DEFAULT);
s_renderCtx.setRasterizerState(BGFX_STATE_DEFAULT); s_renderCtx.setRasterizerState(BGFX_STATE_DEFAULT, wireframe);
uint8_t primIndex = uint8_t( (newFlags&BGFX_STATE_PT_MASK)>>BGFX_STATE_PT_SHIFT); uint8_t primIndex = uint8_t( (newFlags&BGFX_STATE_PT_MASK)>>BGFX_STATE_PT_SHIFT);
if (primType != s_primType[primIndex]) if (primType != s_primType[primIndex])
@ -1649,7 +1762,7 @@ namespace bgfx
if ( (BGFX_STATE_CULL_MASK) & changedFlags) if ( (BGFX_STATE_CULL_MASK) & changedFlags)
{ {
s_renderCtx.setRasterizerState(newFlags); s_renderCtx.setRasterizerState(newFlags, wireframe);
} }
} }
@ -1812,6 +1925,7 @@ namespace bgfx
// if (BGFX_STATE_TEX_MASK & changedFlags) // if (BGFX_STATE_TEX_MASK & changedFlags)
{ {
uint32_t changes = 0;
uint64_t flag = BGFX_STATE_TEX0; uint64_t flag = BGFX_STATE_TEX0;
for (uint32_t stage = 0; stage < BGFX_STATE_TEX_COUNT; ++stage) for (uint32_t stage = 0; stage < BGFX_STATE_TEX_COUNT; ++stage)
{ {
@ -1826,11 +1940,11 @@ namespace bgfx
switch (sampler.m_flags&BGFX_SAMPLER_TYPE_MASK) switch (sampler.m_flags&BGFX_SAMPLER_TYPE_MASK)
{ {
case BGFX_SAMPLER_TEXTURE: case BGFX_SAMPLER_TEXTURE:
// s_renderCtx.m_textures[sampler.m_idx].commit(stage); s_renderCtx.m_textures[sampler.m_idx].commit(stage);
break; break;
case BGFX_SAMPLER_RENDERTARGET_COLOR: case BGFX_SAMPLER_RENDERTARGET_COLOR:
// s_renderCtx.m_renderTargets[sampler.m_idx].commit(stage); s_renderCtx.m_renderTargets[sampler.m_idx].commit(stage);
break; break;
case BGFX_SAMPLER_RENDERTARGET_DEPTH: case BGFX_SAMPLER_RENDERTARGET_DEPTH:
@ -1840,13 +1954,21 @@ namespace bgfx
} }
else else
{ {
// DX_CHECK(device->SetTexture(stage, NULL) ); s_renderCtx.m_textureStage.m_srv[stage] = NULL;
s_renderCtx.m_textureStage.m_sampler[stage] = NULL;
} }
++changes;
} }
current = sampler; current = sampler;
flag <<= 1; flag <<= 1;
} }
if (0 < changes)
{
s_renderCtx.commitTextureStage();
}
} }
if (currentState.m_vertexBuffer.idx != state.m_vertexBuffer.idx || materialChanged) if (currentState.m_vertexBuffer.idx != state.m_vertexBuffer.idx || materialChanged)
@ -1930,7 +2052,7 @@ namespace bgfx
numInstances = state.m_numInstances; numInstances = state.m_numInstances;
numPrimsRendered = numPrimsSubmitted*state.m_numInstances; numPrimsRendered = numPrimsSubmitted*state.m_numInstances;
deviceCtx->DrawIndexed(numIndices, 0, 0); deviceCtx->DrawIndexed(numIndices, 0, state.m_startVertex);
} }
else if (primNumVerts <= state.m_numIndices) else if (primNumVerts <= state.m_numIndices)
{ {
@ -1939,7 +2061,7 @@ namespace bgfx
numInstances = state.m_numInstances; numInstances = state.m_numInstances;
numPrimsRendered = numPrimsSubmitted*state.m_numInstances; numPrimsRendered = numPrimsSubmitted*state.m_numInstances;
deviceCtx->DrawIndexed(numIndices, state.m_startIndex, 0); deviceCtx->DrawIndexed(numIndices, state.m_startIndex, state.m_startVertex);
} }
} }
else else
@ -1966,6 +2088,11 @@ namespace bgfx
int64_t frameTime = now - last; int64_t frameTime = now - last;
last = now; last = now;
static int64_t min = frameTime;
static int64_t max = frameTime;
min = min > frameTime ? frameTime : min;
max = max < frameTime ? frameTime : max;
if (m_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) if (m_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) )
{ {
// PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), "debugstats"); // PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), "debugstats");
@ -1984,7 +2111,12 @@ namespace bgfx
tvm.clear(); tvm.clear();
uint16_t pos = 10; uint16_t pos = 10;
tvm.printf(0, 0, 0x8f, " " BGFX_RENDERER_NAME " "); tvm.printf(0, 0, 0x8f, " " BGFX_RENDERER_NAME " ");
tvm.printf(10, pos++, 0x8e, " Frame: %3.4f [ms] / %3.2f", frameTime*toMs, freq/frameTime); tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS"
, double(frameTime)*toMs
, double(min)*toMs
, double(max)*toMs
, freq/frameTime
);
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]" tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]"
, m_render->m_num , m_render->m_num
, elapsedCpuMs , elapsedCpuMs
@ -2003,6 +2135,9 @@ namespace bgfx
tvm.printf(10, pos++, attr[attrIndex&1], "Submit wait: %3.4f [ms]", m_render->m_waitSubmit*toMs); tvm.printf(10, pos++, attr[attrIndex&1], "Submit wait: %3.4f [ms]", m_render->m_waitSubmit*toMs);
tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", m_render->m_waitRender*toMs); tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", m_render->m_waitRender*toMs);
min = frameTime;
max = frameTime;
} }
m_textVideoMemBlitter.blit(tvm); m_textVideoMemBlitter.blit(tvm);

View file

@ -9,8 +9,6 @@
#include <d3d11.h> #include <d3d11.h>
#include "renderer_d3d.h" #include "renderer_d3d.h"
typedef HRESULT (WINAPI *CreateDXGIFactoryFn)(REFIID, void**);
namespace bgfx namespace bgfx
{ {
template <typename Ty> template <typename Ty>
@ -258,14 +256,7 @@ namespace bgfx
} }
void create(uint16_t _width, uint16_t _height, uint32_t _flags, uint32_t _textureFlags); void create(uint16_t _width, uint16_t _height, uint32_t _flags, uint32_t _textureFlags);
// void createTextures(); void destroy();
// void destroyTextures();
void destroy()
{
// destroyTextures();
m_flags = 0;
}
void commit(uint8_t _stage); void commit(uint8_t _stage);
// void resolve(); // void resolve();
@ -278,6 +269,11 @@ namespace bgfx
// IDirect3DSurface9* m_depth; // IDirect3DSurface9* m_depth;
// D3DTEXTUREFILTERTYPE m_minFilter; // D3DTEXTUREFILTERTYPE m_minFilter;
// D3DTEXTUREFILTERTYPE m_magFilter; // D3DTEXTUREFILTERTYPE m_magFilter;
ID3D11Texture2D* m_colorTexture;
ID3D11RenderTargetView* m_rtv;
ID3D11ShaderResourceView* m_srv;
ID3D11SamplerState* m_sampler;
uint16_t m_width; uint16_t m_width;
uint16_t m_height; uint16_t m_height;
uint32_t m_flags; uint32_t m_flags;

View file

@ -2358,6 +2358,11 @@ namespace bgfx
int64_t frameTime = now - last; int64_t frameTime = now - last;
last = now; last = now;
static int64_t min = frameTime;
static int64_t max = frameTime;
min = min > frameTime ? frameTime : min;
max = max < frameTime ? frameTime : max;
if (m_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) if (m_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) )
{ {
PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), "debugstats"); PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), "debugstats");
@ -2369,6 +2374,7 @@ namespace bgfx
if (now >= next) if (now >= next)
{ {
next = now + bx::getHPFrequency(); next = now + bx::getHPFrequency();
double freq = double(bx::getHPFrequency() ); double freq = double(bx::getHPFrequency() );
double toMs = 1000.0/freq; double toMs = 1000.0/freq;
double elapsedCpuMs = double(elapsed)*toMs; double elapsedCpuMs = double(elapsed)*toMs;
@ -2376,7 +2382,12 @@ namespace bgfx
tvm.clear(); tvm.clear();
uint16_t pos = 10; uint16_t pos = 10;
tvm.printf(0, 0, 0x8f, " " BGFX_RENDERER_NAME " "); tvm.printf(0, 0, 0x8f, " " BGFX_RENDERER_NAME " ");
tvm.printf(10, pos++, 0x8e, " Frame: %3.4f [ms] / %3.2f", frameTime*toMs, freq/frameTime); tvm.printf(10, pos++, 0x8e, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS"
, double(frameTime)*toMs
, double(min)*toMs
, double(max)*toMs
, freq/frameTime
);
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]" tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms]"
, m_render->m_num , m_render->m_num
, elapsedCpuMs , elapsedCpuMs
@ -2395,6 +2406,9 @@ namespace bgfx
tvm.printf(10, pos++, attr[attrIndex&1], "Submit wait: %3.4f [ms]", m_render->m_waitSubmit*toMs); tvm.printf(10, pos++, attr[attrIndex&1], "Submit wait: %3.4f [ms]", m_render->m_waitSubmit*toMs);
tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", m_render->m_waitRender*toMs); tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", m_render->m_waitRender*toMs);
min = frameTime;
max = frameTime;
} }
m_textVideoMemBlitter.blit(tvm); m_textVideoMemBlitter.blit(tvm);

View file

@ -36,8 +36,8 @@ typedef BOOL (WINAPI *D3DPERF_QueryRepeatFrameFunc)();
typedef void (WINAPI *D3DPERF_SetOptionsFunc)(DWORD dwOptions); typedef void (WINAPI *D3DPERF_SetOptionsFunc)(DWORD dwOptions);
typedef DWORD (WINAPI *D3DPERF_GetStatusFunc)(); typedef DWORD (WINAPI *D3DPERF_GetStatusFunc)();
# define _PIX_SETMARKER(_col, _name) s_renderCtx.m_D3DPERF_SetMarker(_col, KeyL#_name) # define _PIX_SETMARKER(_col, _name) s_renderCtx.m_D3DPERF_SetMarker(_col, L#_name)
# define _PIX_BEGINEVENT(_col, _name) s_renderCtx.m_D3DPERF_BeginEvent(_col, KeyL#_name) # define _PIX_BEGINEVENT(_col, _name) s_renderCtx.m_D3DPERF_BeginEvent(_col, L#_name)
# define _PIX_ENDEVENT() s_renderCtx.m_D3DPERF_EndEvent() # define _PIX_ENDEVENT() s_renderCtx.m_D3DPERF_EndEvent()
#elif BX_PLATFORM_XBOX360 #elif BX_PLATFORM_XBOX360

View file

@ -2469,6 +2469,11 @@ namespace bgfx
int64_t frameTime = now - last; int64_t frameTime = now - last;
last = now; last = now;
static int64_t min = frameTime;
static int64_t max = frameTime;
min = min > frameTime ? frameTime : min;
max = max < frameTime ? frameTime : max;
if (m_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) if (m_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) )
{ {
double elapsedGpuMs = 0.0; double elapsedGpuMs = 0.0;
@ -2492,7 +2497,12 @@ namespace bgfx
tvm.clear(); tvm.clear();
uint16_t pos = 10; uint16_t pos = 10;
tvm.printf(0, 0, 0x8f, " " BGFX_RENDERER_NAME " "); tvm.printf(0, 0, 0x8f, " " BGFX_RENDERER_NAME " ");
tvm.printf(10, pos++, 0x8e, " Frame CPU: %3.4f [ms] / %3.2f", double(frameTime)*toMs, freq/frameTime); tvm.printf(10, pos++, 0x8e, " Frame CPU: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS"
, double(frameTime)*toMs
, double(min)*toMs
, double(max)*toMs
, freq/frameTime
);
tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms] %c GPU %3.4f [ms]" tvm.printf(10, pos++, 0x8e, " Draw calls: %4d / CPU %3.4f [ms] %c GPU %3.4f [ms]"
, m_render->m_num , m_render->m_num
, elapsedCpuMs , elapsedCpuMs
@ -2557,6 +2567,9 @@ namespace bgfx
pos++; pos++;
tvm.printf(10, pos++, attr[attrIndex&1], "Submit wait: %3.4f [ms]", double(m_render->m_waitSubmit)*toMs); tvm.printf(10, pos++, attr[attrIndex&1], "Submit wait: %3.4f [ms]", double(m_render->m_waitSubmit)*toMs);
tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", double(m_render->m_waitRender)*toMs); tvm.printf(10, pos++, attr[(attrIndex+1)&1], "Render wait: %3.4f [ms]", double(m_render->m_waitRender)*toMs);
min = frameTime;
max = frameTime;
} }
m_textVideoMemBlitter.blit(tvm); m_textVideoMemBlitter.blit(tvm);

View file

@ -1,43 +1,44 @@
static const uint8_t vs_clear_dx11[635] = static const uint8_t vs_clear_dx11[653] =
{ {
0x00, 0x00, 0x00, 0x00, 0x74, 0x02, 0x44, 0x58, 0x42, 0x43, 0x9f, 0x90, 0x55, 0x9a, 0x15, 0xd7, // ....t.DXBC..U... 0x02, 0x00, 0x08, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x05, 0x43, 0x4f, 0x4c, // ...POSITION..COL
0x4d, 0x46, 0x12, 0x19, 0x32, 0x30, 0xa7, 0xfd, 0x7a, 0x83, 0x01, 0x00, 0x00, 0x00, 0x74, 0x02, // MF..20..z.....t. 0x4f, 0x52, 0x00, 0x00, 0x00, 0x00, 0x74, 0x02, 0x44, 0x58, 0x42, 0x43, 0x9f, 0x90, 0x55, 0x9a, // OR....t.DXBC..U.
0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0xfc, 0x00, // ......4......... 0x15, 0xd7, 0x4d, 0x46, 0x12, 0x19, 0x32, 0x30, 0xa7, 0xfd, 0x7a, 0x83, 0x01, 0x00, 0x00, 0x00, // ..MF..20..z.....
0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x70, 0x00, // ..P.......RDEFp. 0x74, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, // t.......4.......
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, // ..............<. 0xfc, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0xd8, 0x01, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, // ....P.......RDEF
0x00, 0x00, 0x00, 0x05, 0xfe, 0xff, 0x00, 0x91, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x52, 0x44, // ..........<...RD 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // p...............
0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, // 11<....... ...(. 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0xff, 0x00, 0x91, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, // <...........<...
0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, // ..$...........Mi 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // RD11<....... ...
0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, // crosoft (R) HLSL 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // (...$...........
0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, // Shader Compiler 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, // Microsoft (R) HL
0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, // 9.29.952.3111.. 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, // SL Shader Compil
0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, // ..ISGNH......... 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, // er 9.29.952.3111
0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, // ..8............. 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....ISGNH.......
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........A..... 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8...........
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, // ................ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, // ............A...
0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, // ..POSITION.COLOR 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, // ..OSGNL......... 0x0f, 0x0f, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, // ....POSITION.COL
0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, // ..8............. 0x4f, 0x52, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // OR..OSGNL.......
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, // ..........D..... 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ....8...........
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, // ................ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, // ............D...
0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, // ..SV_POSITION.CO 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0x80, 0x00, 0x00, 0x00, 0x50, 0x00, // LOR...SHEX....P. 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION.
0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, // .. ...j..._...r. 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x45, 0x58, 0x80, 0x00, 0x00, 0x00, // COLOR...SHEX....
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, // ......_......... 0x50, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x5f, 0x00, 0x00, 0x03, // P... ...j..._...
0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ..g.... ........ 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, // r......._.......
0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, // ..e.... ......6. 0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ......
0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, // ..r ......F..... 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e.... ......
0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, // ..6.... .......@ 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, // 6...r ......F...
0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, // .....?6.... .... 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....6.... ......
0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, // ..F.......>...ST 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // .@.....?6.... ..
0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // AT.............. 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>...
0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x53, 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // STAT............
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .............
}; };

View file

@ -1,179 +1,181 @@
static const uint8_t vs_debugfont_dx11[2809] = static const uint8_t vs_debugfont_dx11[2844] =
{ {
0x01, 0x00, 0xc0, 0x0a, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, // .....u_modelView 0x04, 0x00, 0x08, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x05, 0x43, 0x4f, 0x4c, // ...POSITION..COL
0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x0a, 0x40, 0x00, 0xdc, 0x0a, 0x44, 0x58, 0x42, 0x43, // Proj....@...DXBC 0x4f, 0x52, 0x01, 0x05, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x08, 0x54, 0x45, 0x58, 0x43, 0x4f, // OR..COLOR..TEXCO
0x49, 0xc3, 0x37, 0x49, 0xa7, 0x55, 0xe6, 0x4d, 0x05, 0x66, 0x2d, 0x74, 0x33, 0xa1, 0xec, 0xf1, // I.7I.U.M.f-t3... 0x4f, 0x52, 0x44, 0x01, 0x00, 0xc0, 0x0a, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // ORD.....u_modelV
0x01, 0x00, 0x00, 0x00, 0xdc, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ............4... 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x09, 0x00, 0x00, 0x0a, 0x40, 0x00, 0xdc, 0x0a, 0x44, // iewProj....@...D
0xcc, 0x07, 0x00, 0x00, 0x54, 0x08, 0x00, 0x00, 0xe0, 0x08, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, // ....T.......@... 0x58, 0x42, 0x43, 0x49, 0xc3, 0x37, 0x49, 0xa7, 0x55, 0xe6, 0x4d, 0x05, 0x66, 0x2d, 0x74, 0x33, // XBCI.7I.U.M.f-t3
0x52, 0x44, 0x45, 0x46, 0x90, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, // RDEF........h... 0xa1, 0xec, 0xf1, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x0a, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, // ...............4
0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0xff, 0x00, 0x91, 0x00, 0x00, // ....<........... 0x00, 0x00, 0x00, 0xcc, 0x07, 0x00, 0x00, 0x54, 0x08, 0x00, 0x00, 0xe0, 0x08, 0x00, 0x00, 0x40, // .......T.......@
0x5d, 0x07, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ]...RD11<....... 0x0a, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x90, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, // ...RDEF........h
0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, // ...(...$....... 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0xff, 0x00, // .......<........
0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x91, 0x00, 0x00, 0x5d, 0x07, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, 0x18, // ...]...RD11<....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x0c, // ... ...(...$....
0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, // ....$Globals.... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x5c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x0a, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x73, 0x00, // .......$Globals.
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0xab, 0xab, 0xab, 0x5c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x04, 0x00, 0x00, 0x00, // ................
0x18, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, // ................
0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x18, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ................
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x05, 0x00, 0x00, 0x08, // ................
0x31, 0x05, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 1............... 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, // ................
0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x05, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, // ........=....... 0x00, 0x00, 0x00, 0x31, 0x05, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ...1............
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3d, 0x05, 0x00, 0x00, 0x10, // ...........=....
0x44, 0x05, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // D............... 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, // ................
0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x05, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, // ........O....... 0x00, 0x00, 0x00, 0x44, 0x05, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, // ...D............
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........`....... 0x00, 0x00, 0x00, 0xf4, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x05, 0x00, 0x00, 0x18, // ...........O....
0x84, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ........... 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x05, 0x00, 0x00, 0x00, // ...........`....
0x98, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x05, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ............0... 0x00, 0x00, 0x00, 0x84, 0x05, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, // ....... ........
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x98, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xbc, 0x05, 0x00, 0x00, 0x30, // ...............0
0xf4, 0x05, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....@........... 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // ............P... 0x00, 0x00, 0x00, 0xf4, 0x05, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .......@........
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x05, 0x06, 0x00, 0x00, 0x50, // ...............P
0x10, 0x06, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....`........... 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, // ............p... 0x00, 0x00, 0x00, 0x10, 0x06, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // .......`........
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x06, 0x00, 0x00, 0x70, // ...............p
0x2e, 0x06, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x06, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, // ........>....... 0x00, 0x00, 0x00, 0x2e, 0x06, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ................
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x06, 0x00, 0x00, 0x90, // ...........>....
0x49, 0x06, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // I............... 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x53, 0x06, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, // ........S....... 0x00, 0x00, 0x00, 0x49, 0x06, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ...I............
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x53, 0x06, 0x00, 0x00, 0xb0, // ...........S....
0x5e, 0x06, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ^............... 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x06, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, // ........j....... 0x00, 0x00, 0x00, 0x5e, 0x06, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ...^............
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x06, 0x00, 0x00, 0xd0, // ...........j....
0x78, 0x06, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // x............... 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x85, 0x06, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x78, 0x06, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, // ...x............
0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x85, 0x06, 0x00, 0x00, 0xf0, // ................
0x93, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........@....... 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x05, 0x00, 0x00, 0x00, // ................
0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, // ............@... 0x00, 0x00, 0x00, 0x93, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, // ...........@....
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x06, 0x00, 0x00, 0x40, // ...............@
0xf8, 0x06, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x06, 0x00, 0x00, 0x00, // ................
0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x24, 0x07, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x00, // ........$....... 0x00, 0x00, 0x00, 0xf8, 0x06, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ................
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @............... 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x24, 0x07, 0x00, 0x00, 0xc0, // ...........$....
0x30, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // 0.......@....... 0x09, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, // ...@............
0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x40, 0x07, 0x00, 0x00, 0x40, 0x0a, 0x00, 0x00, // ........@...@... 0x00, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, // ...0.......@....
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @............... 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x40, 0x07, 0x00, 0x00, 0x40, // ...........@...@
0x51, 0x07, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Q.......@....... 0x0a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, // ...@............
0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x52, // ........u_alphaR 0x00, 0x00, 0x00, 0x51, 0x07, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, // ...Q.......@....
0x65, 0x66, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x00, 0xab, 0xab, 0xab, 0x00, 0x00, 0x03, 0x00, // ef.float........ 0x00, 0x00, 0x00, 0xa4, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, // ................
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x61, 0x6c, 0x70, // ...........u_alp
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, 0x04, 0x00, 0x00, // ................ 0x68, 0x61, 0x52, 0x65, 0x66, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x00, 0xab, 0xab, 0xab, 0x00, // haRef.float.....
0x75, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x00, 0x75, 0x5f, 0x72, 0x67, 0x62, 0x64, 0x69, 0x73, 0x70, // u_time.u_rgbdisp 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x75, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, // lacement.u_inter 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xeb, // ................
0x6c, 0x61, 0x63, 0x65, 0x00, 0x75, 0x5f, 0x7a, 0x6f, 0x6f, 0x6d, 0x00, 0x75, 0x5f, 0x73, 0x74, // lace.u_zoom.u_st 0x04, 0x00, 0x00, 0x75, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x00, 0x75, 0x5f, 0x72, 0x67, 0x62, 0x64, // ...u_time.u_rgbd
0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x00, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x00, // rength.u_center. 0x69, 0x73, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x75, 0x5f, 0x69, 0x6e, // isplacement.u_in
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x02, 0x00, // float2.......... 0x74, 0x65, 0x72, 0x6c, 0x61, 0x63, 0x65, 0x00, 0x75, 0x5f, 0x7a, 0x6f, 0x6f, 0x6d, 0x00, 0x75, // terlace.u_zoom.u
0x5f, 0x73, 0x74, 0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x00, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, // _strength.u_cent
0x65, 0x72, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // er.float2.......
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x05, 0x00, 0x00, 0x75, // ...........X...u
0x5f, 0x6d, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6c, 0x65, 0x55, 0x56, 0x00, 0x66, 0x6c, 0x6f, 0x61, // _meshTileUV.floa
0x74, 0x33, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // t3..............
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x05, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x65, // ........X...u_me 0x00, 0x00, 0x00, 0x91, 0x05, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x61, 0x74, 0x44, 0x69, 0x66, 0x66, // .......u_matDiff
0x73, 0x68, 0x54, 0x69, 0x6c, 0x65, 0x55, 0x56, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x33, 0x00, // shTileUV.float3. 0x75, 0x73, 0x65, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, // use.float4......
0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x05, 0x00, 0x00, 0x75, // ...............u
0x91, 0x05, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x61, 0x74, 0x44, 0x69, 0x66, 0x66, 0x75, 0x73, 0x65, // ....u_matDiffuse 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // _highlightColor.
0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, // .float4......... 0x75, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x69, 0x72, 0x00, 0x75, 0x5f, 0x6c, 0x69, 0x67, // u_lightDir.u_lig
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x68, 0x74, 0x41, 0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x00, 0x75, 0x5f, 0x6c, 0x69, 0x67, 0x68, // htAmbient.u_ligh
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x05, 0x00, 0x00, 0x75, 0x5f, 0x68, 0x69, // ............u_hi 0x74, 0x44, 0x69, 0x66, 0x66, 0x75, 0x73, 0x65, 0x00, 0x75, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, // tDiffuse.u_light
0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x75, 0x5f, 0x6c, // ghlightColor.u_l 0x53, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x75, 0x5f, 0x66, 0x6f, 0x67, 0x43, 0x6f, // Specular.u_fogCo
0x69, 0x67, 0x68, 0x74, 0x44, 0x69, 0x72, 0x00, 0x75, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x41, // ightDir.u_lightA 0x6c, 0x6f, 0x72, 0x00, 0x75, 0x5f, 0x66, 0x6f, 0x67, 0x41, 0x72, 0x67, 0x73, 0x00, 0x75, 0x5f, // lor.u_fogArgs.u_
0x6d, 0x62, 0x69, 0x65, 0x6e, 0x74, 0x00, 0x75, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x44, 0x69, // mbient.u_lightDi 0x76, 0x69, 0x65, 0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, // viewRect.u_viewT
0x66, 0x66, 0x75, 0x73, 0x65, 0x00, 0x75, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x53, 0x70, 0x65, // ffuse.u_lightSpe 0x65, 0x78, 0x65, 0x6c, 0x00, 0x75, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x6c, // exel.u_shadowCol
0x63, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x75, 0x5f, 0x66, 0x6f, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, // cular.u_fogColor 0x6f, 0x72, 0x00, 0x75, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x72, 0x67, 0x73, 0x00, // or.u_filterArgs.
0x00, 0x75, 0x5f, 0x66, 0x6f, 0x67, 0x41, 0x72, 0x67, 0x73, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // .u_fogArgs.u_vie 0x75, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x72, 0x41, 0x72, 0x67, 0x73, 0x00, 0x75, 0x5f, // u_contourArgs.u_
0x77, 0x52, 0x65, 0x63, 0x74, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x54, 0x65, 0x78, 0x65, // wRect.u_viewTexe 0x76, 0x69, 0x65, 0x77, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x00, 0xab, 0x03, // view.float4x4...
0x6c, 0x00, 0x75, 0x5f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // l.u_shadowColor. 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x75, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x41, 0x72, 0x67, 0x73, 0x00, 0x75, 0x5f, 0x63, // u_filterArgs.u_c 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, // ................
0x6f, 0x6e, 0x74, 0x6f, 0x75, 0x72, 0x41, 0x72, 0x67, 0x73, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, // ontourArgs.u_vie 0x06, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, // ...u_viewProj...
0x77, 0x00, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, // w.float4x4...... 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x06, 0x00, 0x00, // ................ 0x06, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, // ...u_model......
0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, // u_viewProj...... 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ... ............
0x04, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x75, // ...............u
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x06, 0x00, 0x00, // ................ 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // _modelView.u_mod
0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, // u_model......... 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // elViewProj.u_mod
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ............... 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x58, 0x00, 0x75, 0x5f, 0x76, 0x69, // elViewProjX.u_vi
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x06, 0x00, 0x00, 0x75, 0x5f, 0x6d, 0x6f, // ............u_mo 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x58, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, // ewProjX.Microsof
0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // delView.u_modelV 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, // t (R) HLSL Shade
0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x00, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, // iewProj.u_modelV 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, // r Compiler 9.29.
0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x58, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // iewProjX.u_viewP 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x80, // 952.3111...ISGN.
0x72, 0x6f, 0x6a, 0x58, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // rojX.Microsoft ( 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, // ...........h....
0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, // ................
0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 0x07, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...q............
0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, // .3111...ISGN.... 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x01, // ...........q....
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........h....... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................ 0x0f, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...w............
0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // q............... 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, // ...........POSIT
0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........q....... 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................ 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, // RD.OSGN.........
0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // w............... 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, // ...h............
0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, // ........POSITION 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, // ...........t....
0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, // .COLOR.TEXCOORD. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
0x4f, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // OSGN............ 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...t............
0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // h............... 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, // ...........z....
0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........t....... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, // ................
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................ 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, // ...SV_POSITION.C
0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // t............... 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, // OLOR.TEXCOORD..S
0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........z....... 0x48, 0x45, 0x58, 0x58, 0x01, 0x00, 0x00, 0x50, 0x00, 0x01, 0x00, 0x56, 0x00, 0x00, 0x00, 0x6a, // HEXX...P...V...j
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, // ................ 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, // ...Y...F. ......
0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, // ..._...r......._
0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x53, 0x48, 0x45, 0x58, // R.TEXCOORD..SHEX 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, // ..........._....
0x58, 0x01, 0x00, 0x00, 0x50, 0x00, 0x01, 0x00, 0x56, 0x00, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, // X...P...V...j... 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x03, // ......._...2....
0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, // Y...F. ......... 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ...g.... .......
0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // _...r......._... 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, // ........_....... 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, // .... ......e...2
0x02, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, // ...._...2....... 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, // ......h.......8
0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // g.... .......... 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, // ...........V....
0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // e.... ......e... 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x32, // ...F. .........2
0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, // . ......e...2 .. 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...........F. ..
0x03, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, // ....h.......8... 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...............F
0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ........V....... 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, // .......2........
0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, // F. .........2... 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0xa6, // ...F. ..........
0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, // ........F. ..... 0x1a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......F........
0xa0, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, // ............F... 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, // .... ......F....
0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....2........... 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, // F. ............. 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, // .... ......F....
0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // ....F........... 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // . ......F....... 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x03, // .......6...2 ...
0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // F. .........6... 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, // ...F.......>...S
0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // . ......F....... 0x54, 0x41, 0x54, 0x94, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // TAT.............
0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F... 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, // ....6...2 ...... 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, // F.......>...STAT
0x94, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ............
}; };

View file

@ -14,8 +14,9 @@
#include "glsl_optimizer.h" #include "glsl_optimizer.h"
#define MAX_TAGS 256 #define MAX_TAGS 256
extern "C" { extern "C"
# include <fpp.h> {
#include <fpp.h>
} // extern "C" } // extern "C"
#if 1 #if 1
@ -48,6 +49,54 @@ long int fsize(FILE* _file)
return size; return size;
} }
struct Attrib
{
enum Enum
{
Position = 0,
Normal,
Color0,
Color1,
Indices,
Weight,
TexCoord0,
TexCoord1,
TexCoord2,
TexCoord3,
TexCoord4,
TexCoord5,
TexCoord6,
TexCoord7,
Count,
};
};
struct RemapInputSemantic
{
Attrib::Enum m_attr;
const char* m_name;
uint8_t m_index;
};
static const RemapInputSemantic s_remapInputSemantic[Attrib::Count] =
{
{ Attrib::Position, "POSITION", 0 },
{ Attrib::Normal, "NORMAL", 0 },
{ Attrib::Color0, "COLOR", 0 },
{ Attrib::Color1, "COLOR", 1 },
{ Attrib::Indices, "BLENDINDICES", 0 },
{ Attrib::Weight, "BLENDWEIGHT", 0 },
{ Attrib::TexCoord0, "TEXCOORD", 0 },
{ Attrib::TexCoord1, "TEXCOORD", 1 },
{ Attrib::TexCoord2, "TEXCOORD", 2 },
{ Attrib::TexCoord3, "TEXCOORD", 3 },
{ Attrib::TexCoord4, "TEXCOORD", 4 },
{ Attrib::TexCoord5, "TEXCOORD", 5 },
{ Attrib::TexCoord6, "TEXCOORD", 6 },
{ Attrib::TexCoord7, "TEXCOORD", 7 },
};
struct ConstantType struct ConstantType
{ {
enum Enum enum Enum
@ -741,18 +790,31 @@ bool compileHLSLShaderDx11(CommandLine& _cmdLine, const std::string& _code, IStr
BX_TRACE("Creator: %s 0x%08x", desc.Creator, desc.Version); BX_TRACE("Creator: %s 0x%08x", desc.Creator, desc.Version);
BX_TRACE("Num constant buffers: %d", desc.ConstantBuffers); BX_TRACE("Num constant buffers: %d", desc.ConstantBuffers);
BX_TRACE("# cl ty RxC S By Name");
// bx::HashMurmur2A hash;
// hash.begin();
BX_TRACE("Input:"); BX_TRACE("Input:");
for (uint32_t ii = 0; ii < desc.InputParameters; ++ii) uint8_t numAttr = (uint8_t)desc.InputParameters;
_stream.write(numAttr);
for (uint32_t ii = 0; ii < numAttr; ++ii)
{ {
D3D11_SIGNATURE_PARAMETER_DESC spd; D3D11_SIGNATURE_PARAMETER_DESC spd;
reflect->GetInputParameterDesc(ii, &spd); reflect->GetInputParameterDesc(ii, &spd);
BX_TRACE("\t%2d: %s%d, %d, %d", ii, spd.SemanticName, spd.SemanticIndex, spd.SystemValueType, spd.ComponentType); BX_TRACE("\t%2d: %s%d, %d, %d, %x, %d"
// hash.add(inputSignature->GetBufferPointer(), inputSignature->GetBufferSize() ); , ii
, spd.SemanticName
, spd.SemanticIndex
, spd.SystemValueType
, spd.ComponentType
, spd.Mask
, spd.Register
);
uint8_t semanticIndex = spd.SemanticIndex;
_stream.write(semanticIndex);
uint8_t len = (uint8_t)strlen(spd.SemanticName);
_stream.write(len);
_stream.write(spd.SemanticName);
} }
BX_TRACE("Output:"); BX_TRACE("Output:");
@ -761,9 +823,7 @@ bool compileHLSLShaderDx11(CommandLine& _cmdLine, const std::string& _code, IStr
D3D11_SIGNATURE_PARAMETER_DESC spd; D3D11_SIGNATURE_PARAMETER_DESC spd;
reflect->GetOutputParameterDesc(ii, &spd); reflect->GetOutputParameterDesc(ii, &spd);
BX_TRACE("\t%2d: %s%d, %d, %d", ii, spd.SemanticName, spd.SemanticIndex, spd.SystemValueType, spd.ComponentType); BX_TRACE("\t%2d: %s%d, %d, %d", ii, spd.SemanticName, spd.SemanticIndex, spd.SystemValueType, spd.ComponentType);
// hash.add(inputSignature->GetBufferPointer(), inputSignature->GetBufferSize() );
} }
// uint32_t inputSignatureHash = hash.end();
uint16_t size = 0; uint16_t size = 0;