2014-03-05 17:37 GMT+01:00 Rico Schüller kgbricola@web.de:
On 03.03.2014 17:48, Matteo Bruni wrote:
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index 74ada6e..80c0f64 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -120,7 +120,7 @@ static const DWORD ctab_matrices[] = { 0x000000ac, 0x00000058, 0x00070002, 0x00000001, 0x00000064, 0x00000000, /* Constant 1 desc (fmatrix3x1) */ 0x00000074, 0x00000002, 0x00000004, 0x00000080, 0x00000000, /* Constant 2 desc (fmatrix4x4) */
- 0x00000090, 0x00040002, 0x00000003, 0x0000009c, 0x00000000,
/* Constant 3 desc (imatrix2x3) */
- 0x00000090, 0x00040002, 0x00000002, 0x0000009c, 0x00000000,
/* Constant 3 desc (imatrix2x3) */
Why this? Was the shader blob wrong (invalid)? Or did you just compile with vs without optimization?
AFAICT that shader bytecode was hand-generated and specifically that constant was wrongly given 3 registers instead of 2.
We still differ from native in that, in cases like this where a constant is assigned more registers than it would naturally need, we only allocate the minimum required, while native sometimes just uses the register size stored in the shader (which is the reason this test passed on native). Since that kind of overallocation doesn't seem to happen in real shaders generated by D3DCompile() / fxc.exe I don't think that is an issue we should care of.