[v3 1/6] d3dx9: add test for preshader in effect.

Paul Gofman gofmanp at gmail.com
Thu Mar 10 08:23:07 CST 2016


Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
CHANGES
Fixed effect source formatting, removed redundant comments;
Fixed value alignment and extra spaces in float result table;
Used D3DXVECTOR4 for float constants array;
Added a missing vector of test results to the end of vertex float
    constants result array;
Added a vector of float constant with default values to the end of
    float constant result array;
Initialized float result constants with floats (not doubles);
Made static result arrays constant;
Introduced ARRAY_SIZE macro and used it in array size defines;
Changed BOOL initialization from 1/0 to TRUE/FALSE;
Changed 'todo' bitword mask type from BOOL to unsigned int
    (test_effect_preshader_op_results array struct type);
Changed 'const static' definitions to 'static const'
Changed UINTs and DWORDs to unsigned int;
Changed !!bool1 != !!bool2 to !bool1 != !bool2
Changed %x to %#x in test fail messages, removed output of expected value
    when it is a constant;
Fixed typo in test fail messages (comma instead of dot in the end of the
    message);
Fixed initial float constant value setting (using loop index instead of 0),
    initialized all 256 vertex shader float constants;
Changed ok(vshader != NULL) -> ok(!vshader); ok(vshader == NULL) -> ok(!!vshader)
Removed pointless "if (vshader)" after ok(!!vshader)
Removed redundant if in op results test loop;

 dlls/d3dx9_36/tests/effect.c | 757 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 757 insertions(+)

diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index a785f4d..41de4bd 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -22,6 +22,8 @@
 #include "wine/test.h"
 #include "d3dx9.h"
 
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*arr))
+
 /* helper functions */
 static BOOL compare_float(FLOAT f, FLOAT g, UINT ulps)
 {
@@ -3009,6 +3011,760 @@ static void test_effect_states(IDirect3DDevice9 *device)
     ok(value == 3, "Got result %u, expected %u.\n", value, 1);
 }
 
+/*
+ * fxc.exe /Tfx_2_0
+ */
+#if 0
+float4 g_Pos1;
+float4 g_Pos2;
+float4 g_Selector[2] = {{0, 0, 0, 0}, {10, 10, 10, 10}};
+
+float4 opvect1 = {0.0, -0.0, -2.2, 3.402823466e+38F};
+float4 opvect2 = {1.0, 2.0, -3.0, 4.0};
+
+int4 g_iVect = {4, 3, 2, 1};
+
+vertexshader vs_arr[3] =
+{
+    asm
+    {
+        vs_1_0
+        def c0, 1, 1, 1, 1
+        mov oPos, c0
+    },
+    asm
+    {
+        vs_1_1
+        def c0, 2, 2, 2, 2
+        mov oPos, c0
+    },
+    asm
+    {
+        vs_2_0
+        def c0, 3, 3, 3, 3
+        mov oPos, c0
+    }
+};
+
+row_major float4x3 m4x3row = {{11, 12, 13}, {21, 22, 23}, {31, 32, 33}, {41, 42, 43}};
+row_major float3x4 m3x4row = {{11, 12, 13, 14}, {21, 22, 23, 24}, {31, 32, 33, 34}};
+column_major float4x3 m4x3column = {{11, 12, 13},{21, 22, 23},{31, 32, 33},{41, 42, 43}};
+column_major float3x4 m3x4column = {{11, 12, 13, 14}, {21, 22, 23, 24}, {31, 32, 33, 34}};
+row_major float2x2 m2x2row = {{11, 12}, {21, 22}};
+column_major float2x2 m2x2column = {{11, 12}, {21, 22}};
+row_major float2x3 m2x3row = {{11, 12, 13}, {21, 22, 23}};
+column_major float2x3 m2x3column = {{11, 12, 13}, {21, 22, 23}};
+row_major float3x2 m3x2row = {{11, 12}, {21, 22}, {31, 32}};
+column_major float3x2 m3x2column = {{11, 12}, {21, 22}, {31, 32}};
+
+row_major bool2x3 mb2x3row = {{true, false, true}, {false, true, true}};
+column_major bool2x3 mb2x3column = {{true, false, true}, {false, true, true}};
+
+struct VS_OUTPUT
+{
+    float4 Position   : POSITION;
+    float2 TextureUV  : TEXCOORD0;
+    float4 Diffuse    : COLOR0;
+};
+VS_OUTPUT RenderSceneVS(float4 vPos : POSITION,
+                        float3 vNormal : NORMAL,
+                        float2 vTexCoord0 : TEXCOORD0,
+                        uniform int nNumLights,
+                        uniform bool bTexture)
+{
+    VS_OUTPUT Output;
+
+    if (g_Selector[1].y > float4(0.5, 0.5, 0.5, 0.5).y)
+        Output.Position = -g_Pos1 * 2 - float4(-4, -5, -6, -7);
+    else
+        Output.Position = -g_Pos2 * 3 - float4(-4, -5, -6, -7);
+    Output.TextureUV = float2(0, 0);
+    Output.Diffuse = 0;
+    Output.Diffuse.xyz = mul(vPos, m4x3column);
+    Output.Diffuse += mul(vPos, m3x4column);
+    Output.Diffuse += mul(vPos, m3x4row);
+    Output.Diffuse.xyz += mul(vPos, m4x3row);
+    return Output;
+}
+
+struct PS_OUTPUT
+{
+    float4 RGBColor : COLOR0;  // Pixel color
+};
+PS_OUTPUT RenderScenePS( VS_OUTPUT In, uniform bool2x3 mb)
+{
+    PS_OUTPUT Output;
+
+    Output.RGBColor = In.Diffuse;
+    Output.RGBColor.xy += mul(In.Diffuse, m2x2row);
+    Output.RGBColor.xy += mul(In.Diffuse, m2x2column);
+    Output.RGBColor.xy += mul(In.Diffuse, m3x2row);
+    Output.RGBColor.xy += mul(In.Diffuse, m3x2column);
+    Output.RGBColor.xyz += mul(In.Diffuse, m2x3row);
+    Output.RGBColor.xyz += mul(In.Diffuse, m2x3column);
+    if (mb[1][1])
+    {
+        Output.RGBColor += sin(Output.RGBColor);
+        Output.RGBColor += cos(Output.RGBColor);
+        Output.RGBColor.xyz += mul(Output.RGBColor, m2x3column);
+        Output.RGBColor.xyz += mul(Output.RGBColor, m2x3row);
+        Output.RGBColor.xy += mul(Output.RGBColor, m3x2column);
+        Output.RGBColor.xy += mul(Output.RGBColor, m3x2row);
+    }
+    return Output;
+}
+
+technique tech0
+{
+    pass p0
+    {
+        VertexShader = compile vs_3_0 RenderSceneVS(1, true);
+        PixelShader  = compile ps_3_0 RenderScenePS(mb2x3row);
+
+        LightEnable[0] = TRUE;
+        LightEnable[1] = TRUE;
+        LightEnable[2] = TRUE;
+        LightEnable[3] = TRUE;
+        LightEnable[4] = TRUE;
+        LightEnable[5] = TRUE;
+        LightEnable[6] = TRUE;
+        LightEnable[7] = TRUE;
+        LightType[0] = POINT;
+        LightType[1] = POINT;
+        LightType[2] = POINT;
+        LightType[3] = POINT;
+        LightType[4] = POINT;
+        LightType[5] = POINT;
+        LightType[6] = POINT;
+        LightType[7] = POINT;
+        LightDiffuse[0] = 1 / opvect1;
+        LightDiffuse[1] = rsqrt(opvect1);
+        LightDiffuse[2] = opvect1 * opvect2;
+        LightDiffuse[3] = opvect1 + opvect2;
+        LightDiffuse[4] = float4(opvect1 < opvect2);
+        LightDiffuse[5] = float4(opvect1 >= opvect2);
+        LightDiffuse[6] = -opvect1;
+        LightDiffuse[7] = rcp(opvect1);
+
+        LightAmbient[0] = frac(opvect1);
+        LightAmbient[1] = min(opvect1, opvect2);
+        LightAmbient[2] = max(opvect1, opvect2);
+        LightAmbient[3] = sin(opvect1);
+        LightAmbient[4] = cos(opvect1);
+        LightAmbient[5] = 1e-2/opvect1;
+        LightAmbient[6] = float4(0, dot(opvect1, opvect2), dot(opvect2, opvect2), 0);
+    }
+    pass p1
+    {
+        VertexShader = vs_arr[g_iVect.z];
+    }
+}
+#endif
+static const DWORD test_effect_preshader_effect_blob[] =
+{
+    0xfeff0901, 0x000009f8, 0x00000000, 0x00000003, 0x00000001, 0x00000030, 0x00000000, 0x00000000,
+    0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x6f505f67,
+    0x00003173, 0x00000003, 0x00000001, 0x00000068, 0x00000000, 0x00000000, 0x00000004, 0x00000001,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000007, 0x6f505f67, 0x00003273, 0x00000003,
+    0x00000001, 0x000000b0, 0x00000000, 0x00000002, 0x00000004, 0x00000001, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x41200000, 0x41200000, 0x41200000, 0x41200000, 0x0000000b, 0x65535f67,
+    0x7463656c, 0x0000726f, 0x00000003, 0x00000001, 0x000000ec, 0x00000000, 0x00000000, 0x00000004,
+    0x00000001, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x00000008, 0x6576706f, 0x00317463,
+    0x00000003, 0x00000001, 0x00000124, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x3f800000,
+    0x40000000, 0xc0400000, 0x40800000, 0x00000008, 0x6576706f, 0x00327463, 0x00000002, 0x00000001,
+    0x0000015c, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000004, 0x00000003, 0x00000002,
+    0x00000001, 0x00000008, 0x56695f67, 0x00746365, 0x00000010, 0x00000004, 0x00000188, 0x00000000,
+    0x00000003, 0x00000001, 0x00000002, 0x00000003, 0x00000007, 0x615f7376, 0x00007272, 0x00000003,
+    0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00000004, 0x00000003, 0x41300000, 0x41400000,
+    0x41500000, 0x41a80000, 0x41b00000, 0x41b80000, 0x41f80000, 0x42000000, 0x42040000, 0x42240000,
+    0x42280000, 0x422c0000, 0x00000008, 0x3378346d, 0x00776f72, 0x00000003, 0x00000002, 0x00000238,
+    0x00000000, 0x00000000, 0x00000003, 0x00000004, 0x41300000, 0x41400000, 0x41500000, 0x41600000,
+    0x41a80000, 0x41b00000, 0x41b80000, 0x41c00000, 0x41f80000, 0x42000000, 0x42040000, 0x42080000,
+    0x00000008, 0x3478336d, 0x00776f72, 0x00000003, 0x00000002, 0x00000290, 0x00000000, 0x00000000,
+    0x00000004, 0x00000003, 0x41300000, 0x41400000, 0x41500000, 0x41a80000, 0x41b00000, 0x41b80000,
+    0x41f80000, 0x42000000, 0x42040000, 0x42240000, 0x42280000, 0x422c0000, 0x0000000b, 0x3378346d,
+    0x756c6f63, 0x00006e6d, 0x00000003, 0x00000002, 0x000002ec, 0x00000000, 0x00000000, 0x00000003,
+    0x00000004, 0x41300000, 0x41400000, 0x41500000, 0x41600000, 0x41a80000, 0x41b00000, 0x41b80000,
+    0x41c00000, 0x41f80000, 0x42000000, 0x42040000, 0x42080000, 0x0000000b, 0x3478336d, 0x756c6f63,
+    0x00006e6d, 0x00000003, 0x00000002, 0x00000328, 0x00000000, 0x00000000, 0x00000002, 0x00000002,
+    0x41300000, 0x41400000, 0x41a80000, 0x41b00000, 0x00000008, 0x3278326d, 0x00776f72, 0x00000003,
+    0x00000002, 0x00000360, 0x00000000, 0x00000000, 0x00000002, 0x00000002, 0x41300000, 0x41400000,
+    0x41a80000, 0x41b00000, 0x0000000b, 0x3278326d, 0x756c6f63, 0x00006e6d, 0x00000003, 0x00000002,
+    0x000003a4, 0x00000000, 0x00000000, 0x00000002, 0x00000003, 0x41300000, 0x41400000, 0x41500000,
+    0x41a80000, 0x41b00000, 0x41b80000, 0x00000008, 0x3378326d, 0x00776f72, 0x00000003, 0x00000002,
+    0x000003e4, 0x00000000, 0x00000000, 0x00000002, 0x00000003, 0x41300000, 0x41400000, 0x41500000,
+    0x41a80000, 0x41b00000, 0x41b80000, 0x0000000b, 0x3378326d, 0x756c6f63, 0x00006e6d, 0x00000003,
+    0x00000002, 0x00000428, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x41300000, 0x41400000,
+    0x41a80000, 0x41b00000, 0x41f80000, 0x42000000, 0x00000008, 0x3278336d, 0x00776f72, 0x00000003,
+    0x00000002, 0x00000468, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x41300000, 0x41400000,
+    0x41a80000, 0x41b00000, 0x41f80000, 0x42000000, 0x0000000b, 0x3278336d, 0x756c6f63, 0x00006e6d,
+    0x00000001, 0x00000002, 0x000004ac, 0x00000000, 0x00000000, 0x00000002, 0x00000003, 0x00000001,
+    0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x00000009, 0x7832626d, 0x776f7233,
+    0x00000000, 0x00000001, 0x00000002, 0x000004f0, 0x00000000, 0x00000000, 0x00000002, 0x00000003,
+    0x00000001, 0x00000000, 0x00000001, 0x00000000, 0x00000001, 0x00000001, 0x0000000c, 0x7832626d,
+    0x6c6f6333, 0x006e6d75, 0x00000004, 0x00000010, 0x00000004, 0x00000000, 0x00000000, 0x00000000,
+    0x00000005, 0x0000000f, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000001, 0x00000002,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000001, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004,
+    0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000,
+    0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+    0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
+    0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000,
+    0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003,
+    0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004,
+    0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000,
+    0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+    0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002,
+    0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000004, 0x00000001,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00000002, 0x00000000, 0x00000000,
+    0x00000000, 0x00000004, 0x00000001, 0x00000003, 0x00003070, 0x00000006, 0x00000010, 0x00000004,
+    0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x00003170, 0x00000006, 0x68636574, 0x00000030,
+    0x00000013, 0x00000001, 0x00000008, 0x00000007, 0x00000004, 0x00000020, 0x00000000, 0x00000000,
+    0x0000003c, 0x00000058, 0x00000000, 0x00000000, 0x00000074, 0x00000090, 0x00000000, 0x00000000,
+    0x000000c0, 0x000000dc, 0x00000000, 0x00000000, 0x000000f8, 0x00000114, 0x00000000, 0x00000000,
+    0x00000130, 0x0000014c, 0x00000000, 0x00000000, 0x00000168, 0x0000017c, 0x00000000, 0x00000000,
+    0x00000194, 0x000001b0, 0x00000000, 0x00000000, 0x000001ec, 0x00000208, 0x00000000, 0x00000000,
+    0x00000244, 0x00000260, 0x00000000, 0x00000000, 0x000002a0, 0x000002bc, 0x00000000, 0x00000000,
+    0x000002fc, 0x00000318, 0x00000000, 0x00000000, 0x00000334, 0x00000350, 0x00000000, 0x00000000,
+    0x00000370, 0x0000038c, 0x00000000, 0x00000000, 0x000003b0, 0x000003cc, 0x00000000, 0x00000000,
+    0x000003f4, 0x00000410, 0x00000000, 0x00000000, 0x00000434, 0x00000450, 0x00000000, 0x00000000,
+    0x00000478, 0x00000494, 0x00000000, 0x00000000, 0x000004bc, 0x000004d8, 0x00000000, 0x00000000,
+    0x000009ec, 0x00000000, 0x00000002, 0x000009c4, 0x00000000, 0x00000021, 0x00000092, 0x00000000,
+    0x00000504, 0x00000500, 0x00000093, 0x00000000, 0x0000051c, 0x00000518, 0x00000091, 0x00000000,
+    0x00000534, 0x00000530, 0x00000091, 0x00000001, 0x00000554, 0x00000550, 0x00000091, 0x00000002,
+    0x00000574, 0x00000570, 0x00000091, 0x00000003, 0x00000594, 0x00000590, 0x00000091, 0x00000004,
+    0x000005b4, 0x000005b0, 0x00000091, 0x00000005, 0x000005d4, 0x000005d0, 0x00000091, 0x00000006,
+    0x000005f4, 0x000005f0, 0x00000091, 0x00000007, 0x00000614, 0x00000610, 0x00000084, 0x00000000,
+    0x00000634, 0x00000630, 0x00000084, 0x00000001, 0x00000654, 0x00000650, 0x00000084, 0x00000002,
+    0x00000674, 0x00000670, 0x00000084, 0x00000003, 0x00000694, 0x00000690, 0x00000084, 0x00000004,
+    0x000006b4, 0x000006b0, 0x00000084, 0x00000005, 0x000006d4, 0x000006d0, 0x00000084, 0x00000006,
+    0x000006f4, 0x000006f0, 0x00000084, 0x00000007, 0x00000714, 0x00000710, 0x00000085, 0x00000000,
+    0x00000740, 0x00000730, 0x00000085, 0x00000001, 0x0000076c, 0x0000075c, 0x00000085, 0x00000002,
+    0x00000798, 0x00000788, 0x00000085, 0x00000003, 0x000007c4, 0x000007b4, 0x00000085, 0x00000004,
+    0x000007f0, 0x000007e0, 0x00000085, 0x00000005, 0x0000081c, 0x0000080c, 0x00000085, 0x00000006,
+    0x00000848, 0x00000838, 0x00000085, 0x00000007, 0x00000874, 0x00000864, 0x00000087, 0x00000000,
+    0x000008a0, 0x00000890, 0x00000087, 0x00000001, 0x000008cc, 0x000008bc, 0x00000087, 0x00000002,
+    0x000008f8, 0x000008e8, 0x00000087, 0x00000003, 0x00000924, 0x00000914, 0x00000087, 0x00000004,
+    0x00000950, 0x00000940, 0x00000087, 0x00000005, 0x0000097c, 0x0000096c, 0x00000087, 0x00000006,
+    0x000009a8, 0x00000998, 0x000009e4, 0x00000000, 0x00000001, 0x00000092, 0x00000000, 0x000009d0,
+    0x000009cc, 0x00000003, 0x00000012, 0x00000001, 0x0000002c, 0xfffe0101, 0x00000051, 0xa00f0000,
+    0x3f800000, 0x3f800000, 0x3f800000, 0x3f800000, 0x00000001, 0xc00f0000, 0xa0e40000, 0x0000ffff,
+    0x00000002, 0x0000002c, 0xfffe0101, 0x00000051, 0xa00f0000, 0x40000000, 0x40000000, 0x40000000,
+    0x40000000, 0x00000001, 0xc00f0000, 0xa0e40000, 0x0000ffff, 0x00000003, 0x0000002c, 0xfffe0200,
+    0x05000051, 0xa00f0000, 0x40400000, 0x40400000, 0x40400000, 0x40400000, 0x02000001, 0xc00f0000,
+    0xa0e40000, 0x0000ffff, 0x00000000, 0x00000001, 0xffffffff, 0x00000000, 0x00000002, 0x000000e8,
+    0x00000008, 0x615f7376, 0x00007272, 0x46580200, 0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b,
+    0x46580200, 0x00000001, 0x0000001c, 0x00000100, 0x00000058, 0x00000030, 0x00000002, 0x00000001,
+    0x00000038, 0x00000048, 0x56695f67, 0x00746365, 0x00020001, 0x00040001, 0x00000001, 0x00000000,
+    0x40800000, 0x40400000, 0x40000000, 0x3f800000, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820,
+    0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235,
+    0x00313131, 0x0002fffe, 0x54494c43, 0x00000000, 0x000cfffe, 0x434c5846, 0x00000001, 0x10000001,
+    0x00000001, 0x00000000, 0x00000002, 0x00000002, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0,
+    0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000020, 0x00000000, 0x000001f0,
+    0x46580200, 0x0033fffe, 0x42415443, 0x0000001c, 0x00000097, 0x46580200, 0x00000002, 0x0000001c,
+    0x20000100, 0x00000094, 0x00000044, 0x00000002, 0x00000001, 0x0000004c, 0x0000005c, 0x0000006c,
+    0x00010002, 0x00000001, 0x00000074, 0x00000084, 0x6576706f, 0x00317463, 0x00030001, 0x00040001,
+    0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x6576706f, 0x00327463,
+    0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x3f800000, 0x40000000, 0xc0400000, 0x40800000,
+    0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320,
+    0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x001afffe, 0x54494c43, 0x0000000c,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x002afffe, 0x434c5846, 0x00000004, 0x50000004, 0x00000002, 0x00000000, 0x00000002, 0x00000000,
+    0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000004, 0x00000001, 0x50000004, 0x00000002,
+    0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000004,
+    0x00000002, 0x10000001, 0x00000001, 0x00000000, 0x00000001, 0x00000008, 0x00000000, 0x00000004,
+    0x00000000, 0x10000001, 0x00000001, 0x00000000, 0x00000001, 0x00000008, 0x00000000, 0x00000004,
+    0x00000003, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x0000001f,
+    0x00000000, 0x000001a8, 0x46580200, 0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b, 0x46580200,
+    0x00000001, 0x0000001c, 0x20000100, 0x00000058, 0x00000030, 0x00000002, 0x00000001, 0x00000038,
+    0x00000048, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000,
+    0x80000000, 0xc00ccccd, 0x7f7fffff, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
+    0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
+    0x0012fffe, 0x54494c43, 0x00000008, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x47ae147b, 0x3f847ae1, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x002ffffe, 0x434c5846, 0x00000005, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000007, 0x00000000, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000001, 0x00000000, 0x00000007, 0x00000001, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000002, 0x00000000, 0x00000007, 0x00000002, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000003, 0x00000000, 0x00000007, 0x00000003, 0xa0500004, 0x00000002,
+    0x00000000, 0x00000001, 0x00000004, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000004,
+    0x00000000, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x0000001e,
+    0x00000000, 0x000000dc, 0x46580200, 0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b, 0x46580200,
+    0x00000001, 0x0000001c, 0x20000100, 0x00000058, 0x00000030, 0x00000002, 0x00000001, 0x00000038,
+    0x00000048, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000,
+    0x80000000, 0xc00ccccd, 0x7f7fffff, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
+    0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
+    0x0002fffe, 0x54494c43, 0x00000000, 0x000cfffe, 0x434c5846, 0x00000001, 0x10900004, 0x00000001,
+    0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f,
+    0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x0000001d, 0x00000000, 0x000000dc, 0x46580200,
+    0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b, 0x46580200, 0x00000001, 0x0000001c, 0x20000100,
+    0x00000058, 0x00000030, 0x00000002, 0x00000001, 0x00000038, 0x00000048, 0x6576706f, 0x00317463,
+    0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff,
+    0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320,
+    0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000,
+    0x000cfffe, 0x434c5846, 0x00000001, 0x10800004, 0x00000001, 0x00000000, 0x00000002, 0x00000000,
+    0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000,
+    0xffffffff, 0x0000001c, 0x00000000, 0x00000124, 0x46580200, 0x0033fffe, 0x42415443, 0x0000001c,
+    0x00000097, 0x46580200, 0x00000002, 0x0000001c, 0x20000100, 0x00000094, 0x00000044, 0x00000002,
+    0x00000001, 0x0000004c, 0x0000005c, 0x0000006c, 0x00010002, 0x00000001, 0x00000074, 0x00000084,
+    0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000, 0x80000000,
+    0xc00ccccd, 0x7f7fffff, 0x6576706f, 0x00327463, 0x00030001, 0x00040001, 0x00000001, 0x00000000,
+    0x3f800000, 0x40000000, 0xc0400000, 0x40800000, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820,
+    0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235,
+    0x00313131, 0x0002fffe, 0x54494c43, 0x00000000, 0x000ffffe, 0x434c5846, 0x00000001, 0x20100004,
+    0x00000002, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0x00000004, 0x00000000,
+    0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff,
+    0x0000001b, 0x00000000, 0x00000124, 0x46580200, 0x0033fffe, 0x42415443, 0x0000001c, 0x00000097,
+    0x46580200, 0x00000002, 0x0000001c, 0x20000100, 0x00000094, 0x00000044, 0x00000002, 0x00000001,
+    0x0000004c, 0x0000005c, 0x0000006c, 0x00010002, 0x00000001, 0x00000074, 0x00000084, 0x6576706f,
+    0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd,
+    0x7f7fffff, 0x6576706f, 0x00327463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x3f800000,
+    0x40000000, 0xc0400000, 0x40800000, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
+    0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
+    0x0002fffe, 0x54494c43, 0x00000000, 0x000ffffe, 0x434c5846, 0x00000001, 0x20000004, 0x00000002,
+    0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000004,
+    0x00000000, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x0000001a,
+    0x00000000, 0x000000dc, 0x46580200, 0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b, 0x46580200,
+    0x00000001, 0x0000001c, 0x20000100, 0x00000058, 0x00000030, 0x00000002, 0x00000001, 0x00000038,
+    0x00000048, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000,
+    0x80000000, 0xc00ccccd, 0x7f7fffff, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
+    0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
+    0x0002fffe, 0x54494c43, 0x00000000, 0x000cfffe, 0x434c5846, 0x00000001, 0x10400004, 0x00000001,
+    0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f,
+    0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000019, 0x00000000, 0x0000013c, 0x46580200,
+    0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b, 0x46580200, 0x00000001, 0x0000001c, 0x20000100,
+    0x00000058, 0x00000030, 0x00000002, 0x00000001, 0x00000038, 0x00000048, 0x6576706f, 0x00317463,
+    0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff,
+    0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320,
+    0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000,
+    0x0024fffe, 0x434c5846, 0x00000004, 0x10300001, 0x00000001, 0x00000000, 0x00000002, 0x00000000,
+    0x00000000, 0x00000004, 0x00000000, 0x10300001, 0x00000001, 0x00000000, 0x00000002, 0x00000001,
+    0x00000000, 0x00000004, 0x00000001, 0x10300001, 0x00000001, 0x00000000, 0x00000002, 0x00000002,
+    0x00000000, 0x00000004, 0x00000002, 0x10300001, 0x00000001, 0x00000000, 0x00000002, 0x00000003,
+    0x00000000, 0x00000004, 0x00000003, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000,
+    0xffffffff, 0x00000018, 0x00000000, 0x000000dc, 0x46580200, 0x0024fffe, 0x42415443, 0x0000001c,
+    0x0000005b, 0x46580200, 0x00000001, 0x0000001c, 0x20000100, 0x00000058, 0x00000030, 0x00000002,
+    0x00000001, 0x00000038, 0x00000048, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001,
+    0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x4d007874, 0x6f726369, 0x74666f73,
+    0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932,
+    0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000, 0x000cfffe, 0x434c5846, 0x00000001,
+    0x10100004, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000004, 0x00000000,
+    0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000017, 0x00000000,
+    0x00000124, 0x46580200, 0x0033fffe, 0x42415443, 0x0000001c, 0x00000097, 0x46580200, 0x00000002,
+    0x0000001c, 0x20000100, 0x00000094, 0x00000044, 0x00000002, 0x00000001, 0x0000004c, 0x0000005c,
+    0x0000006c, 0x00010002, 0x00000001, 0x00000074, 0x00000084, 0x6576706f, 0x00317463, 0x00030001,
+    0x00040001, 0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x6576706f,
+    0x00327463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x3f800000, 0x40000000, 0xc0400000,
+    0x40800000, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461,
+    0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43,
+    0x00000000, 0x000ffffe, 0x434c5846, 0x00000001, 0x20300004, 0x00000002, 0x00000000, 0x00000002,
+    0x00000000, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0,
+    0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000016, 0x00000000, 0x00000124,
+    0x46580200, 0x0033fffe, 0x42415443, 0x0000001c, 0x00000097, 0x46580200, 0x00000002, 0x0000001c,
+    0x20000100, 0x00000094, 0x00000044, 0x00000002, 0x00000001, 0x0000004c, 0x0000005c, 0x0000006c,
+    0x00010002, 0x00000001, 0x00000074, 0x00000084, 0x6576706f, 0x00317463, 0x00030001, 0x00040001,
+    0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x6576706f, 0x00327463,
+    0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x3f800000, 0x40000000, 0xc0400000, 0x40800000,
+    0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320,
+    0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000,
+    0x000ffffe, 0x434c5846, 0x00000001, 0x20200004, 0x00000002, 0x00000000, 0x00000002, 0x00000000,
+    0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f,
+    0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000015, 0x00000000, 0x00000124, 0x46580200,
+    0x0033fffe, 0x42415443, 0x0000001c, 0x00000097, 0x46580200, 0x00000002, 0x0000001c, 0x20000100,
+    0x00000094, 0x00000044, 0x00000002, 0x00000001, 0x0000004c, 0x0000005c, 0x0000006c, 0x00010002,
+    0x00000001, 0x00000074, 0x00000084, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001,
+    0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x6576706f, 0x00327463, 0x00030001,
+    0x00040001, 0x00000001, 0x00000000, 0x3f800000, 0x40000000, 0xc0400000, 0x40800000, 0x4d007874,
+    0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970,
+    0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000, 0x000ffffe,
+    0x434c5846, 0x00000001, 0x20400004, 0x00000002, 0x00000000, 0x00000002, 0x00000000, 0x00000000,
+    0x00000002, 0x00000004, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff,
+    0x00000000, 0x00000000, 0xffffffff, 0x00000014, 0x00000000, 0x00000124, 0x46580200, 0x0033fffe,
+    0x42415443, 0x0000001c, 0x00000097, 0x46580200, 0x00000002, 0x0000001c, 0x20000100, 0x00000094,
+    0x00000044, 0x00000002, 0x00000001, 0x0000004c, 0x0000005c, 0x0000006c, 0x00010002, 0x00000001,
+    0x00000074, 0x00000084, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000,
+    0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x6576706f, 0x00327463, 0x00030001, 0x00040001,
+    0x00000001, 0x00000000, 0x3f800000, 0x40000000, 0xc0400000, 0x40800000, 0x4d007874, 0x6f726369,
+    0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072,
+    0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000, 0x000ffffe, 0x434c5846,
+    0x00000001, 0x20500004, 0x00000002, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000002,
+    0x00000004, 0x00000000, 0x00000004, 0x00000000, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000,
+    0x00000000, 0xffffffff, 0x00000013, 0x00000000, 0x0000013c, 0x46580200, 0x0024fffe, 0x42415443,
+    0x0000001c, 0x0000005b, 0x46580200, 0x00000001, 0x0000001c, 0x20000100, 0x00000058, 0x00000030,
+    0x00000002, 0x00000001, 0x00000038, 0x00000048, 0x6576706f, 0x00317463, 0x00030001, 0x00040001,
+    0x00000001, 0x00000000, 0x00000000, 0x80000000, 0xc00ccccd, 0x7f7fffff, 0x4d007874, 0x6f726369,
+    0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072,
+    0x392e3932, 0x332e3235, 0x00313131, 0x0002fffe, 0x54494c43, 0x00000000, 0x0024fffe, 0x434c5846,
+    0x00000004, 0x10700001, 0x00000001, 0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000004,
+    0x00000000, 0x10700001, 0x00000001, 0x00000000, 0x00000002, 0x00000001, 0x00000000, 0x00000004,
+    0x00000001, 0x10700001, 0x00000001, 0x00000000, 0x00000002, 0x00000002, 0x00000000, 0x00000004,
+    0x00000002, 0x10700001, 0x00000001, 0x00000000, 0x00000002, 0x00000003, 0x00000000, 0x00000004,
+    0x00000003, 0xf0f0f0f0, 0x0f0f0f0f, 0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000012,
+    0x00000000, 0x0000013c, 0x46580200, 0x0024fffe, 0x42415443, 0x0000001c, 0x0000005b, 0x46580200,
+    0x00000001, 0x0000001c, 0x20000100, 0x00000058, 0x00000030, 0x00000002, 0x00000001, 0x00000038,
+    0x00000048, 0x6576706f, 0x00317463, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000,
+    0x80000000, 0xc00ccccd, 0x7f7fffff, 0x4d007874, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820,
+    0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131,
+    0x0002fffe, 0x54494c43, 0x00000000, 0x0024fffe, 0x434c5846, 0x00000004, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000000, 0x00000000, 0x00000004, 0x00000000, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000001, 0x00000000, 0x00000004, 0x00000001, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000002, 0x00000000, 0x00000004, 0x00000002, 0x10300001, 0x00000001,
+    0x00000000, 0x00000002, 0x00000003, 0x00000000, 0x00000004, 0x00000003, 0xf0f0f0f0, 0x0f0f0f0f,
+    0x0000ffff, 0x00000000, 0x00000000, 0xffffffff, 0x00000001, 0x00000000, 0x00000724, 0xffff0300,
+    0x00a5fffe, 0x42415443, 0x0000001c, 0x0000025f, 0xffff0300, 0x00000007, 0x0000001c, 0x20000000,
+    0x00000258, 0x000000a8, 0x00080002, 0x00000002, 0x000000b4, 0x000000c4, 0x000000e4, 0x00060002,
+    0x00000002, 0x000000ec, 0x000000fc, 0x0000011c, 0x00000002, 0x00000003, 0x00000128, 0x00000138,
+    0x00000168, 0x000a0002, 0x00000002, 0x00000170, 0x00000180, 0x000001a0, 0x000c0002, 0x00000002,
+    0x000001ac, 0x000001bc, 0x000001dc, 0x00030002, 0x00000003, 0x000001e4, 0x000001f4, 0x00000224,
+    0x00000000, 0x00000005, 0x00000230, 0x00000240, 0x3278326d, 0x756c6f63, 0xab006e6d, 0x00030003,
+    0x00020002, 0x00000001, 0x00000000, 0x41300000, 0x41a80000, 0x00000000, 0x00000000, 0x41400000,
+    0x41b00000, 0x00000000, 0x00000000, 0x3278326d, 0x00776f72, 0x00030002, 0x00020002, 0x00000001,
+    0x00000000, 0x41300000, 0x41400000, 0x00000000, 0x00000000, 0x41a80000, 0x41b00000, 0x00000000,
+    0x00000000, 0x3378326d, 0x756c6f63, 0xab006e6d, 0x00030003, 0x00030002, 0x00000001, 0x00000000,
+    0x41300000, 0x41a80000, 0x00000000, 0x00000000, 0x41400000, 0x41b00000, 0x00000000, 0x00000000,
+    0x41500000, 0x41b80000, 0x00000000, 0x00000000, 0x3378326d, 0x00776f72, 0x00030002, 0x00030002,
+    0x00000001, 0x00000000, 0x41300000, 0x41400000, 0x41500000, 0x00000000, 0x41a80000, 0x41b00000,
+    0x41b80000, 0x00000000, 0x3278336d, 0x756c6f63, 0xab006e6d, 0x00030003, 0x00020003, 0x00000001,
+    0x00000000, 0x41300000, 0x41a80000, 0x41f80000, 0x00000000, 0x41400000, 0x41b00000, 0x42000000,
+    0x00000000, 0x3278336d, 0x00776f72, 0x00030002, 0x00020003, 0x00000001, 0x00000000, 0x41300000,
+    0x41400000, 0x00000000, 0x00000000, 0x41a80000, 0x41b00000, 0x00000000, 0x00000000, 0x41f80000,
+    0x42000000, 0x00000000, 0x00000000, 0x7832626d, 0x776f7233, 0xababab00, 0x00010002, 0x00030002,
+    0x00000001, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0x00000000, 0xffffffff, 0xffffffff,
+    0x335f7370, 0x4d00305f, 0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461,
+    0x6d6f4320, 0x656c6970, 0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x05000051, 0xa00f000e,
+    0x3d2aaaa4, 0xbf000000, 0x3f800000, 0xbe22f983, 0x05000051, 0xa00f000f, 0x00000000, 0x3e22f983,
+    0x3e800000, 0xbab609ba, 0x05000051, 0xa00f0010, 0x40c90fdb, 0xc0490fdb, 0xb4878163, 0x37cfb5a1,
+    0x0200001f, 0x8000000a, 0x900f0000, 0x03000005, 0x80030000, 0xa0e40007, 0x90550000, 0x04000004,
+    0x80030000, 0x90000000, 0xa0e40006, 0x80e40000, 0x03000002, 0x80030000, 0x80e40000, 0x90e40000,
+    0x02000001, 0x80010001, 0xa000000f, 0x0400005a, 0x80010002, 0x90e40000, 0xa0e40008, 0x80000001,
+    0x0400005a, 0x80020002, 0x90e40000, 0xa0e40009, 0x80000001, 0x03000002, 0x80030000, 0x80e40000,
+    0x80e40002, 0x03000005, 0x800c0000, 0xa0440004, 0x90550000, 0x04000004, 0x800c0000, 0x90000000,
+    0xa0440003, 0x80e40000, 0x04000004, 0x800c0000, 0x90aa0000, 0xa0440005, 0x80e40000, 0x03000002,
+    0x80030000, 0x80ee0000, 0x80e40000, 0x03000008, 0x80010002, 0x90e40000, 0xa0e4000c, 0x03000008,
+    0x80020002, 0x90e40000, 0xa0e4000d, 0x03000002, 0x80030000, 0x80e40000, 0x80e40002, 0x03000005,
+    0x800e0001, 0xa090000b, 0x90550000, 0x04000004, 0x800e0001, 0x90000000, 0xa090000a, 0x80e40001,
+    0x02000001, 0x80040000, 0x90aa0000, 0x03000002, 0x80070000, 0x80e40000, 0x80f90001, 0x0400005a,
+    0x80010002, 0x90e40000, 0xa0e40000, 0x80000001, 0x0400005a, 0x80020002, 0x90e40000, 0xa0e40001,
+    0x80000001, 0x0400005a, 0x80040002, 0x90e40000, 0xa0e40002, 0x80000001, 0x03000002, 0x80070000,
+    0x80e40000, 0x80e40002, 0x01000028, 0xe0e40804, 0x02000001, 0x80080000, 0x90ff0000, 0x04000004,
+    0x800f0002, 0x80e40000, 0xa055000f, 0xa0aa000f, 0x02000013, 0x800f0002, 0x80e40002, 0x04000004,
+    0x800f0002, 0x80e40002, 0xa0000010, 0xa0550010, 0x03000005, 0x800f0002, 0x80e40002, 0x80e40002,
+    0x04000004, 0x800f0003, 0x80e40002, 0xa0aa0010, 0xa0ff0010, 0x04000004, 0x800f0003, 0x80e40002,
+    0x80e40003, 0xa0ff000f, 0x04000004, 0x800f0003, 0x80e40002, 0x80e40003, 0xa000000e, 0x04000004,
+    0x800f0003, 0x80e40002, 0x80e40003, 0xa055000e, 0x04000004, 0x800f0002, 0x80e40002, 0x80e40003,
+    0x80e40000, 0x03000002, 0x800f0002, 0x80e40002, 0xa0aa000e, 0x04000004, 0x800f0003, 0x80e40002,
+    0xa1ff000e, 0xa155000e, 0x02000013, 0x800f0003, 0x80e40003, 0x04000004, 0x800f0003, 0x80e40003,
+    0xa0000010, 0xa0550010, 0x03000005, 0x800f0003, 0x80e40003, 0x80e40003, 0x04000004, 0x800f0004,
+    0x80e40003, 0xa0aa0010, 0xa0ff0010, 0x04000004, 0x800f0004, 0x80e40003, 0x80e40004, 0xa0ff000f,
+    0x04000004, 0x800f0004, 0x80e40003, 0x80e40004, 0xa000000e, 0x04000004, 0x800f0004, 0x80e40003,
+    0x80e40004, 0xa055000e, 0x04000004, 0x800f0002, 0x80e40003, 0x80e40004, 0x80e40002, 0x03000002,
+    0x800f0002, 0x80e40002, 0xa0aa000e, 0x0400005a, 0x80010003, 0x80e40002, 0xa0e40000, 0x80000001,
+    0x0400005a, 0x80020003, 0x80e40002, 0xa0e40001, 0x80000001, 0x0400005a, 0x80040003, 0x80e40002,
+    0xa0e40002, 0x80000001, 0x03000002, 0x80070001, 0x80e40002, 0x80e40003, 0x03000005, 0x80070002,
+    0x80550001, 0xa0e4000b, 0x04000004, 0x80070002, 0x80000001, 0xa0e4000a, 0x80e40002, 0x03000002,
+    0x80070001, 0x80e40001, 0x80e40002, 0x03000008, 0x80010002, 0x80e40001, 0xa0e4000c, 0x03000008,
+    0x80020002, 0x80e40001, 0xa0e4000d, 0x03000002, 0x80030001, 0x80e40001, 0x80e40002, 0x03000005,
+    0x80030002, 0x80550001, 0xa0e40004, 0x04000004, 0x80030002, 0x80000001, 0xa0e40003, 0x80e40002,
+    0x04000004, 0x80030002, 0x80aa0001, 0xa0e40005, 0x80e40002, 0x03000002, 0x80030800, 0x80e40001,
+    0x80e40002, 0x02000001, 0x80040800, 0x80aa0001, 0x02000001, 0x80080800, 0x80ff0002, 0x0000002a,
+    0x02000001, 0x80070800, 0x80e40000, 0x02000001, 0x80080800, 0x90ff0000, 0x0000002b, 0x0000ffff,
+    0x00000000, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x0000074c, 0xfffe0300, 0x007cfffe,
+    0x42415443, 0x0000001c, 0x000001bb, 0xfffe0300, 0x00000004, 0x0000001c, 0x20000000, 0x000001b4,
+    0x0000006c, 0x00040002, 0x00000004, 0x00000078, 0x00000088, 0x000000c8, 0x00080002, 0x00000003,
+    0x000000d0, 0x000000e0, 0x00000110, 0x000b0002, 0x00000003, 0x0000011c, 0x0000012c, 0x0000015c,
+    0x00000002, 0x00000004, 0x00000164, 0x00000174, 0x3478336d, 0x756c6f63, 0xab006e6d, 0x00030003,
+    0x00040003, 0x00000001, 0x00000000, 0x41300000, 0x41a80000, 0x41f80000, 0x00000000, 0x41400000,
+    0x41b00000, 0x42000000, 0x00000000, 0x41500000, 0x41b80000, 0x42040000, 0x00000000, 0x41600000,
+    0x41c00000, 0x42080000, 0x00000000, 0x3478336d, 0x00776f72, 0x00030002, 0x00040003, 0x00000001,
+    0x00000000, 0x41300000, 0x41400000, 0x41500000, 0x41600000, 0x41a80000, 0x41b00000, 0x41b80000,
+    0x41c00000, 0x41f80000, 0x42000000, 0x42040000, 0x42080000, 0x3378346d, 0x756c6f63, 0xab006e6d,
+    0x00030003, 0x00030004, 0x00000001, 0x00000000, 0x41300000, 0x41a80000, 0x41f80000, 0x42240000,
+    0x41400000, 0x41b00000, 0x42000000, 0x42280000, 0x41500000, 0x41b80000, 0x42040000, 0x422c0000,
+    0x3378346d, 0x00776f72, 0x00030002, 0x00030004, 0x00000001, 0x00000000, 0x41300000, 0x41400000,
+    0x41500000, 0x00000000, 0x41a80000, 0x41b00000, 0x41b80000, 0x00000000, 0x41f80000, 0x42000000,
+    0x42040000, 0x00000000, 0x42240000, 0x42280000, 0x422c0000, 0x00000000, 0x335f7376, 0x4d00305f,
+    0x6f726369, 0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970,
+    0x2e392072, 0x392e3932, 0x332e3235, 0x00313131, 0x00ecfffe, 0x53455250, 0x46580201, 0x0043fffe,
+    0x42415443, 0x0000001c, 0x000000d7, 0x46580201, 0x00000003, 0x0000001c, 0x20000100, 0x000000d4,
+    0x00000058, 0x00020002, 0x00000001, 0x00000060, 0x00000070, 0x00000080, 0x00030002, 0x00000001,
+    0x00000088, 0x00000070, 0x00000098, 0x00000002, 0x00000002, 0x000000a4, 0x000000b4, 0x6f505f67,
+    0xab003173, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x6f505f67, 0xab003273, 0x00030001, 0x00040001, 0x00000001, 0x00000000, 0x65535f67,
+    0x7463656c, 0xab00726f, 0x00030001, 0x00040001, 0x00000002, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x41200000, 0x41200000, 0x41200000, 0x41200000, 0x4d007874, 0x6f726369,
+    0x74666f73, 0x29522820, 0x534c4820, 0x6853204c, 0x72656461, 0x6d6f4320, 0x656c6970, 0x2e392072,
+    0x392e3932, 0x332e3235, 0x00313131, 0x000cfffe, 0x49535250, 0x0000000e, 0x00000000, 0x00000000,
+    0x00000001, 0x00000000, 0x00000000, 0x00000001, 0x0000000e, 0x00000001, 0x00000000, 0x00000000,
+    0x0032fffe, 0x54494c43, 0x00000018, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x3fe00000, 0x00000000, 0xc0000000, 0x00000000,
+    0xc0080000, 0x00000000, 0x00000000, 0x00000000, 0x40100000, 0x00000000, 0x40140000, 0x00000000,
+    0x40180000, 0x00000000, 0x401c0000, 0x0064fffe, 0x434c5846, 0x00000009, 0xa0500004, 0x00000002,
+    0x00000000, 0x00000001, 0x00000011, 0x00000000, 0x00000002, 0x00000008, 0x00000000, 0x00000007,
+    0x00000000, 0x20400004, 0x00000002, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000001,
+    0x00000014, 0x00000000, 0x00000007, 0x00000004, 0xa0500004, 0x00000002, 0x00000000, 0x00000001,
+    0x00000012, 0x00000000, 0x00000002, 0x0000000c, 0x00000000, 0x00000007, 0x00000000, 0x20400004,
+    0x00000002, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000001, 0x00000014, 0x00000000,
+    0x00000007, 0x00000008, 0x10100004, 0x00000001, 0x00000000, 0x00000007, 0x00000008, 0x00000000,
+    0x00000007, 0x00000000, 0x20400004, 0x00000002, 0x00000000, 0x00000007, 0x00000000, 0x00000000,
+    0x00000007, 0x00000004, 0x00000000, 0x00000007, 0x0000000c, 0xa0200001, 0x00000002, 0x00000000,
+    0x00000001, 0x00000010, 0x00000000, 0x00000002, 0x00000005, 0x00000000, 0x00000007, 0x00000000,
+    0xa0500004, 0x00000002, 0x00000000, 0x00000007, 0x00000000, 0x00000000, 0x00000007, 0x0000000c,
+    0x00000000, 0x00000007, 0x00000004, 0x20400004, 0x00000002, 0x00000000, 0x00000007, 0x00000004,
+    0x00000000, 0x00000007, 0x00000008, 0x00000000, 0x00000004, 0x00000038, 0xf0f0f0f0, 0x0f0f0f0f,
+    0x0000ffff, 0x05000051, 0xa00f000f, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0200001f,
+    0x80000000, 0x900f0000, 0x0200001f, 0x80000000, 0xe00f0000, 0x0200001f, 0x80000005, 0xe0030001,
+    0x0200001f, 0x8000000a, 0xe00f0002, 0x03000009, 0x80010000, 0x90e40000, 0xa0e4000b, 0x03000009,
+    0x80020000, 0x90e40000, 0xa0e4000c, 0x03000009, 0x80040000, 0x90e40000, 0xa0e4000d, 0x03000008,
+    0x80010001, 0x90e40000, 0xa0e40004, 0x03000008, 0x80020001, 0x90e40000, 0xa0e40005, 0x03000008,
+    0x80040001, 0x90e40000, 0xa0e40006, 0x03000008, 0x80080001, 0x90e40000, 0xa0e40007, 0x02000001,
+    0x80080000, 0xa000000f, 0x03000002, 0x800f0000, 0x80e40000, 0x80e40001, 0x03000005, 0x800f0001,
+    0xa0e40009, 0x90550000, 0x04000004, 0x800f0001, 0x90000000, 0xa0e40008, 0x80e40001, 0x04000004,
+    0x800f0001, 0x90aa0000, 0xa0e4000a, 0x80e40001, 0x03000002, 0x800f0000, 0x80e40000, 0x80e40001,
+    0x03000005, 0x80070001, 0xa0e40001, 0x90550000, 0x04000004, 0x80070001, 0x90000000, 0xa0e40000,
+    0x80e40001, 0x04000004, 0x80070001, 0x90aa0000, 0xa0e40002, 0x80e40001, 0x04000004, 0x80070001,
+    0x90ff0000, 0xa0e40003, 0x80e40001, 0x03000002, 0xe0070002, 0x80e40000, 0x80e40001, 0x02000001,
+    0xe0080002, 0x80ff0000, 0x02000001, 0xe00f0000, 0xa0e4000e, 0x02000001, 0xe0030001, 0xa000000f,
+    0x0000ffff,
+};
+#define TEST_EFFECT_PRESHADER_VSHADER_POS 869
+#define TEST_EFFECT_PRESHADER_VSHADER_LEN 13
+
+static const D3DXVECTOR4 test_effect_preshader_fconstsv[] =
+{
+    {11.0f, 12.0f, 13.0f, 0.0f},
+    {21.0f, 22.0f, 23.0f, 0.0f},
+    {31.0f, 32.0f, 33.0f, 0.0f},
+    {41.0f, 42.0f, 43.0f, 0.0f},
+    {11.0f, 21.0f, 31.0f, 0.0f},
+    {12.0f, 22.0f, 32.0f, 0.0f},
+    {13.0f, 23.0f, 33.0f, 0.0f},
+    {14.0f, 24.0f, 34.0f, 0.0f},
+    {11.0f, 12.0f, 13.0f, 14.0f},
+    {21.0f, 22.0f, 23.0f, 24.0f},
+    {31.0f, 32.0f, 33.0f, 34.0f},
+    {11.0f, 21.0f, 31.0f, 41.0f},
+    {12.0f, 22.0f, 32.0f, 42.0f},
+    {13.0f, 23.0f, 33.0f, 43.0f},
+    {4.0f,   5.0f,  6.0f, 7.0f},
+    {-9999.0f, -9999.0f, -9999.0f, -9999.0f}
+};
+
+static const D3DXVECTOR4 test_effect_preshader_fconstsp[] =
+{
+    {11.0f, 21.0f,  0.0f, 0.0f},
+    {12.0f, 22.0f,  0.0f, 0.0f},
+    {13.0f, 23.0f,  0.0f, 0.0f},
+    {11.0f, 12.0f,  0.0f, 0.0f},
+    {21.0f, 22.0f,  0.0f, 0.0f},
+    {31.0f, 32.0f,  0.0f, 0.0f},
+    {11.0f, 12.0f,  0.0f, 0.0f},
+    {21.0f, 22.0f,  0.0f, 0.0f},
+    {11.0f, 21.0f,  0.0f, 0.0f},
+    {12.0f, 22.0f,  0.0f, 0.0f},
+    {11.0f, 12.0f, 13.0f, 0.0f},
+    {21.0f, 22.0f, 23.0f, 0.0f},
+    {11.0f, 21.0f, 31.0f, 0.0f},
+    {12.0f, 22.0f, 32.0f, 0.0f},
+    {-9999.0f, -9999.0f, -9999.0f, -9999.0f}
+};
+
+static const BOOL test_effect_preshader_bconsts[] =
+{
+    TRUE, FALSE, TRUE, FALSE, TRUE, FALSE
+};
+
+static const struct
+{
+    const char *comment;
+    unsigned int todo[4];
+    unsigned int result[4];
+}
+test_effect_preshader_op_results[] =
+{
+    {"1 / op", {1, 1, 1, 1}, {0x7f800000, 0xff800000, 0xbee8ba2e, 0x00200000}},
+    {"rsq",    {1, 1, 3, 3}, {0x7f800000, 0x7f800000, 0x3f2c985d, 0x1f800000}},
+    {"mul",    {1, 1, 1, 1}, {0x00000000, 0x80000000, 0x40d33334, 0x7f800000}},
+    {"add",    {0, 1, 1, 1}, {0x3f800000, 0x40000000, 0xc0a66666, 0x7f7fffff}},
+    {"lt",     {0, 0, 1, 0}, {0x3f800000, 0x3f800000, 0x00000000, 0x00000000}},
+    {"ge",     {1, 1, 0, 1}, {0x00000000, 0x00000000, 0x3f800000, 0x3f800000}},
+    {"neg",    {1, 1, 1, 1}, {0x80000000, 0x00000000, 0x400ccccd, 0xff7fffff}},
+    {"rcp",    {1, 1, 1, 1}, {0x7f800000, 0xff800000, 0xbee8ba2e, 0x00200000}},
+    {"frac",   {0, 0, 1, 0}, {0x00000000, 0x00000000, 0x3f4ccccc, 0x00000000}},
+    {"min",    {0, 1, 1, 1}, {0x00000000, 0x80000000, 0xc0400000, 0x40800000}},
+    {"max",    {1, 1, 1, 1}, {0x3f800000, 0x40000000, 0xc00ccccd, 0x7f7fffff}},
+    {"sin",    {0, 1, 1, 3}, {0x00000000, 0x80000000, 0xbf4ef99e, 0xbf0599b3}},
+    {"cos",    {1, 1, 1, 3}, {0x3f800000, 0x3f800000, 0xbf16a803, 0x3f5a5f96}},
+    {"den mul",{1, 1, 1, 1}, {0x7f800000, 0xff800000, 0xbb94f209, 0x000051ec}},
+    {"dot",    {0, 1, 1, 0}, {0x00000000, 0x7f800000, 0x41f00000, 0x00000000}}
+};
+
+#define TEST_EFFECT_PRES_NFLOATV ARRAY_SIZE(test_effect_preshader_fconstsv)
+#define TEST_EFFECT_PRES_NFLOATP ARRAY_SIZE(test_effect_preshader_fconstsp)
+#define TEST_EFFECT_PRES_NFLOATMAX (TEST_EFFECT_PRES_NFLOATV > TEST_EFFECT_PRES_NFLOATP ? \
+        TEST_EFFECT_PRES_NFLOATV : TEST_EFFECT_PRES_NFLOATP)
+#define TEST_EFFECT_PRES_NBOOL ARRAY_SIZE(test_effect_preshader_bconsts)
+#define TEST_EFFECT_PRES_NOPTESTS ARRAY_SIZE(test_effect_preshader_op_results)
+
+static void test_effect_preshader(IDirect3DDevice9 *device)
+{
+    static const D3DXVECTOR4 fvect1 = {28.0f, 29.0f, 30.0f, 31.0f};
+    static const D3DXVECTOR4 fvect2 = {0.0f, 0.0f, 1.0f, 0.0f};
+    static const D3DXVECTOR4 fvect_empty = {-9999.0f, -9999.0f, -9999.0f, -9999.0f};
+    HRESULT hr;
+    ID3DXEffect *effect;
+    D3DXHANDLE par;
+    unsigned int npasses;
+    BOOL bval;
+    D3DLIGHT9 light;
+    D3DXVECTOR4 fdata[TEST_EFFECT_PRES_NFLOATMAX];
+    BOOL bdata[TEST_EFFECT_PRES_NBOOL];
+    IDirect3DVertexShader9 *vshader;
+    void *byte_code;
+    unsigned int byte_code_size;
+    unsigned int i, j;
+
+    hr = D3DXCreateEffect(device, test_effect_preshader_effect_blob, sizeof(test_effect_preshader_effect_blob),
+            NULL, NULL, 0, NULL, &effect, NULL);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+
+    for (i = 0; i < 256; i++)
+    {
+        hr = IDirect3DDevice9_SetVertexShaderConstantF(device, i,
+                (const float *)&fvect_empty, 1);
+        ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    }
+    for (i = 0; i < TEST_EFFECT_PRES_NFLOATP; i++)
+    {
+        hr = IDirect3DDevice9_SetPixelShaderConstantF(device, i,
+                (const float *)&fvect_empty, 1);
+        ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    }
+    bval = FALSE;
+    for (i = 0; i < TEST_EFFECT_PRES_NBOOL; i++)
+    {
+        hr = IDirect3DDevice9_SetPixelShaderConstantB(device, i, &bval, 1);
+        ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    }
+
+    hr = effect->lpVtbl->Begin(effect, &npasses, 0);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+
+    par = effect->lpVtbl->GetParameterByName(effect, NULL, "g_Pos2");
+    ok(par != NULL, "GetParameterByName failed.\n");
+
+    hr = effect->lpVtbl->SetVector(effect, par, &fvect1);
+    ok(hr == D3D_OK, "SetFloatArray failed, hr %#x.\n", hr);
+
+    hr = effect->lpVtbl->BeginPass(effect, 0);
+    todo_wine ok(hr == D3D_OK, "Got result %#x.\n", hr);
+
+    hr = IDirect3DDevice9_GetVertexShaderConstantF(device, 0, (float *)fdata, TEST_EFFECT_PRES_NFLOATV);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    todo_wine ok(!memcmp(fdata, test_effect_preshader_fconstsv, sizeof(test_effect_preshader_fconstsv)),
+            "Vertex shader float constants do not match.\n");
+    hr = IDirect3DDevice9_GetPixelShaderConstantF(device, 0, (float *)fdata, TEST_EFFECT_PRES_NFLOATP);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    todo_wine ok(!memcmp(fdata, test_effect_preshader_fconstsp, sizeof(test_effect_preshader_fconstsp)),
+            "Pixel shader float constants do not match.\n");
+
+    hr = IDirect3DDevice9_GetPixelShaderConstantB(device, 0, bdata, TEST_EFFECT_PRES_NBOOL);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    for (i = 0; i < TEST_EFFECT_PRES_NBOOL; i++)
+        todo_wine_if(!bdata[i] != !test_effect_preshader_bconsts[i])
+        ok(!bdata[i] == !test_effect_preshader_bconsts[i],
+                "Pixel shader boolean constants do not match.\n");
+
+    for (i = 0; i < TEST_EFFECT_PRES_NOPTESTS; i++)
+    {
+        unsigned int *v;
+
+        hr = IDirect3DDevice9_GetLight(device, i % 8, &light);
+        v = i < 8 ? (unsigned int *)&light.Diffuse : (unsigned int *)&light.Ambient;
+        ok(hr == D3D_OK, "Got result %#x.\n", hr);
+        for (j = 0; j < 4; j++)
+            todo_wine_if(test_effect_preshader_op_results[i].todo[j] & 1)
+            ok(v[j] == test_effect_preshader_op_results[i].result[j] ||
+            ((test_effect_preshader_op_results[i].todo[j] & 2) &&
+            broken(v[j] != test_effect_preshader_op_results[i].result[j])),
+                    "Operation %s, component %u, expected %#x, got %#x.\n",
+                    test_effect_preshader_op_results[i].comment, j,
+                    test_effect_preshader_op_results[i].result[j], v[j]);
+    }
+
+    hr = effect->lpVtbl->EndPass(effect);
+
+    par = effect->lpVtbl->GetParameterByName(effect, NULL, "g_iVect");
+    ok(par != NULL, "GetParameterByName failed.\n");
+    hr = effect->lpVtbl->SetVector(effect, par, &fvect2);
+    ok(hr == D3D_OK, "SetFloatArray failed, hr %#x.\n", hr);
+    hr = effect->lpVtbl->BeginPass(effect, 1);
+    todo_wine ok(hr == D3D_OK, "Got result %#x.\n", hr);
+
+    hr = IDirect3DDevice9_GetVertexShader(device, &vshader);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    ok(!!vshader, "Got NULL vshader.\n");
+
+    hr = IDirect3DVertexShader9_GetFunction(vshader, NULL, &byte_code_size);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    byte_code = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, byte_code_size);
+    hr = IDirect3DVertexShader9_GetFunction(vshader, byte_code, &byte_code_size);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    ok(byte_code_size > 1, "Got unexpected byte code size %u.\n", byte_code_size);
+    todo_wine ok(!memcmp(byte_code,
+            &test_effect_preshader_effect_blob[TEST_EFFECT_PRESHADER_VSHADER_POS +
+            1 * TEST_EFFECT_PRESHADER_VSHADER_LEN], byte_code_size),
+            "Incorrect shader selected.\n");
+    HeapFree(GetProcessHeap(), 0, byte_code);
+    IDirect3DVertexShader9_Release(vshader);
+
+    hr = IDirect3DDevice9_SetVertexShader(device, NULL);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+
+    hr = effect->lpVtbl->SetVector(effect, par, &fvect1);
+    ok(hr == D3D_OK, "SetFloatArray failed, hr %#x.\n", hr);
+    hr = effect->lpVtbl->CommitChanges(effect);
+    todo_wine ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    hr = IDirect3DDevice9_GetVertexShader(device, &vshader);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    ok(!vshader, "Incorrect shader selected.\n");
+    if (vshader)
+        IDirect3DVertexShader9_Release(vshader);
+    hr = effect->lpVtbl->EndPass(effect);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+
+    hr = effect->lpVtbl->End(effect);
+    ok(hr == D3D_OK, "Got result %#x.\n", hr);
+    effect->lpVtbl->Release(effect);
+}
+
 START_TEST(effect)
 {
     HWND wnd;
@@ -3049,6 +3805,7 @@ START_TEST(effect)
     test_effect_variable_names(device);
     test_effect_compilation_errors(device);
     test_effect_states(device);
+    test_effect_preshader(device);
 
     count = IDirect3DDevice9_Release(device);
     ok(count == 0, "The device was not properly freed: refcount %u\n", count);
-- 
2.5.0




More information about the wine-patches mailing list