Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d10/effect.c | 2 +- dlls/d3d10/tests/effect.c | 118 +++++++++++++++++++++----------------- 2 files changed, 66 insertions(+), 54 deletions(-)
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 4e8cd9a3b55..30650eca82d 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -2233,7 +2233,7 @@ static HRESULT parse_fx10_local_variable(const char *data, size_t data_size, return E_FAIL; }
- if (FAILED(hr = create_state_object(v))) + if (FAILED(hr = create_state_object(var))) return hr; } } diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index c445c95e281..a7fef6433fa 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -1267,61 +1267,73 @@ TextureCube tq; GeometryShader gs[2]; PixelShader ps; VertexShader vs[1]; +BlendState blend2[2]; +DepthStencilState depthstencil2[2]; +RasterizerState rast2[2]; +SamplerState sam2[2]; #endif static DWORD fx_test_evtc[] = { -0x43425844, 0x16ff7a62, 0x6eb690dc, 0x60dd5ba4, 0x903b0ce7, 0x00000001, 0x00000668, 0x00000001, -0x00000024, 0x30315846, 0x0000063c, 0xfeff1001, 0x00000001, 0x00000004, 0x00000011, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x000003dc, 0x00000000, 0x00000008, 0x00000001, 0x00000001, -0x00000001, 0x00000001, 0x00000001, 0x00000001, 0x00000004, 0x00000000, 0x00000000, 0x53006263, -0x6e697274, 0x00070067, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, -0x00730000, 0x49525453, 0x7300474e, 0x6c660032, 0x0074616f, 0x00000036, 0x00000001, 0x00000000, -0x00000004, 0x00000010, 0x00000004, 0x00000909, 0x6e690066, 0x5a003274, 0x01000000, 0x00000000, -0x08000000, 0x10000000, 0x08000000, 0x12000000, 0x69000011, 0x6e697500, 0x33783274, 0x00007d00, -0x00000100, 0x00000000, 0x00002800, 0x00003000, 0x00001800, 0x005a1b00, 0x62007500, 0x326c6f6f, -0xa3003378, 0x01000000, 0x00000000, 0x1c000000, 0x20000000, 0x18000000, 0x23000000, 0x6200001a, -0x656c4200, 0x7453646e, 0x00657461, 0x000000c9, 0x00000002, 0x00000000, 0x00000000, 0x00000000, -0x00000000, 0x00000002, 0x6e656c62, 0x65440064, 0x53687470, 0x636e6574, 0x74536c69, 0x00657461, -0x000000f6, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x74706564, -0x65747368, 0x6c69636e, 0x73615200, 0x69726574, 0x5372657a, 0x65746174, 0x00013100, 0x00000200, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0x73617200, 0x61530074, 0x656c706d, -0x61745372, 0x62006574, 0x02000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x15000000, -0x73000000, 0x52006d61, 0x65646e65, 0x72615472, 0x56746567, 0x00776569, 0x0000018f, 0x00000002, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000013, 0x00767472, 0x74706544, 0x65745368, -0x6c69636e, 0x77656956, 0x0001c000, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00001400, 0x76736400, 0x78655400, 0x65727574, 0xf1004431, 0x02000001, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x0a000000, 0x74000000, 0x65540031, 0x72757478, 0x41443165, 0x79617272, -0x00021a00, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000b00, 0x61317400, -0x78655400, 0x65727574, 0x49004432, 0x02000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0c000000, 0x74000000, 0x65540032, 0x72757478, 0x4d443265, 0x02720053, 0x00020000, 0x00000000, -0x00000000, 0x00000000, 0x00000000, 0x000e0000, 0x32740000, 0x00736d64, 0x74786554, 0x32657275, -0x72724144, 0xa0007961, 0x02000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0d000000, -0x74000000, 0x54006132, 0x75747865, 0x44326572, 0x7241534d, 0x00796172, 0x000002cf, 0x00000002, -0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x6d643274, 0x54006173, 0x75747865, -0x44336572, 0x00030300, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001000, -0x00337400, 0x74786554, 0x43657275, 0x00656275, 0x0000032c, 0x00000002, 0x00000000, 0x00000000, -0x00000000, 0x00000000, 0x00000011, 0x47007174, 0x656d6f65, 0x53797274, 0x65646168, 0x03570072, -0x00020000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00070000, 0x73670000, 0x78695000, -0x68536c65, 0x72656461, 0x00038500, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x00000500, 0x00737000, 0x74726556, 0x68537865, 0x72656461, 0x0003b000, 0x00000200, 0x00000100, -0x00000000, 0x00000000, 0x00000000, 0x00000600, 0x00737600, 0x00000004, 0x00000060, 0x00000000, -0x00000004, 0xffffffff, 0x00000002, 0x0000002a, 0x0000000e, 0x0000002c, 0x00000033, 0x0000000e, -0x0000002c, 0x00000058, 0x0000003c, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, -0x0000007b, 0x0000005f, 0x00000000, 0x00000004, 0x00000000, 0x00000000, 0x00000000, 0x000000a1, -0x00000085, 0x00000000, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x000000c7, 0x000000ab, -0x00000000, 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0x000000f0, 0x000000d4, 0x00000000, -0xffffffff, 0x00000000, 0x00000000, 0x00000124, 0x00000108, 0x00000000, 0xffffffff, 0x00000000, -0x00000000, 0x0000015d, 0x00000141, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x0000018b, -0x0000016f, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x000001bc, 0x000001a0, 0x00000000, -0xffffffff, 0x00000000, 0x000001ed, 0x000001d1, 0x00000000, 0xffffffff, 0x00000000, 0x00000217, -0x000001fb, 0x00000000, 0xffffffff, 0x00000000, 0x00000245, 0x00000229, 0x00000000, 0xffffffff, -0x00000000, 0x0000026f, 0x00000253, 0x00000000, 0xffffffff, 0x00000000, 0x0000029a, 0x0000027e, -0x00000000, 0xffffffff, 0x00000000, 0x000002cb, 0x000002af, 0x00000000, 0xffffffff, 0x00000000, -0x000002fc, 0x000002e0, 0x00000000, 0xffffffff, 0x00000000, 0x00000329, 0x0000030d, 0x00000000, -0xffffffff, 0x00000000, 0x00000354, 0x00000338, 0x00000000, 0xffffffff, 0x00000000, 0x00000382, -0x00000366, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x000003ad, 0x00000391, -0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x000003d9, 0x000003bd, 0x00000000, 0xffffffff, -0x00000000, 0x00000000, + 0x43425844, 0x2f42ba4c, 0x2e600cca, 0x3cf98c90, 0xab9f5124, 0x00000001, 0x00000768, 0x00000001, + 0x00000024, 0x30315846, 0x0000073c, 0xfeff1001, 0x00000001, 0x00000004, 0x00000015, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0000046c, 0x00000000, 0x00000008, 0x00000003, 0x00000003, + 0x00000003, 0x00000003, 0x00000001, 0x00000001, 0x00000004, 0x00000000, 0x00000000, 0x53006263, + 0x6e697274, 0x00070067, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00010000, + 0x00730000, 0x49525453, 0x7300474e, 0x6c660032, 0x0074616f, 0x00000036, 0x00000001, 0x00000000, + 0x00000004, 0x00000010, 0x00000004, 0x00000909, 0x6e690066, 0x5a003274, 0x01000000, 0x00000000, + 0x08000000, 0x10000000, 0x08000000, 0x12000000, 0x69000011, 0x6e697500, 0x33783274, 0x00007d00, + 0x00000100, 0x00000000, 0x00002800, 0x00003000, 0x00001800, 0x005a1b00, 0x62007500, 0x326c6f6f, + 0xa3003378, 0x01000000, 0x00000000, 0x1c000000, 0x20000000, 0x18000000, 0x23000000, 0x6200001a, + 0x656c4200, 0x7453646e, 0x00657461, 0x000000c9, 0x00000002, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000002, 0x6e656c62, 0x65440064, 0x53687470, 0x636e6574, 0x74536c69, 0x00657461, + 0x000000f6, 0x00000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000003, 0x74706564, + 0x65747368, 0x6c69636e, 0x73615200, 0x69726574, 0x5372657a, 0x65746174, 0x00013100, 0x00000200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0x73617200, 0x61530074, 0x656c706d, + 0x61745372, 0x62006574, 0x02000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x15000000, + 0x73000000, 0x52006d61, 0x65646e65, 0x72615472, 0x56746567, 0x00776569, 0x0000018f, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000013, 0x00767472, 0x74706544, 0x65745368, + 0x6c69636e, 0x77656956, 0x0001c000, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00001400, 0x76736400, 0x78655400, 0x65727574, 0xf1004431, 0x02000001, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0a000000, 0x74000000, 0x65540031, 0x72757478, 0x41443165, 0x79617272, + 0x00021a00, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000b00, 0x61317400, + 0x78655400, 0x65727574, 0x49004432, 0x02000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0c000000, 0x74000000, 0x65540032, 0x72757478, 0x4d443265, 0x02720053, 0x00020000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x000e0000, 0x32740000, 0x00736d64, 0x74786554, 0x32657275, + 0x72724144, 0xa0007961, 0x02000002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0d000000, + 0x74000000, 0x54006132, 0x75747865, 0x44326572, 0x7241534d, 0x00796172, 0x000002cf, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x6d643274, 0x54006173, 0x75747865, + 0x44336572, 0x00030300, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00001000, + 0x00337400, 0x74786554, 0x43657275, 0x00656275, 0x0000032c, 0x00000002, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000011, 0x47007174, 0x656d6f65, 0x53797274, 0x65646168, 0x03570072, + 0x00020000, 0x00020000, 0x00000000, 0x00000000, 0x00000000, 0x00070000, 0x73670000, 0x78695000, + 0x68536c65, 0x72656461, 0x00038500, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000500, 0x00737000, 0x74726556, 0x68537865, 0x72656461, 0x0003b000, 0x00000200, 0x00000100, + 0x00000000, 0x00000000, 0x00000000, 0x00000600, 0x00737600, 0x000000c9, 0x00000002, 0x00000002, + 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0x6e656c62, 0xf6003264, 0x02000000, 0x02000000, + 0x00000000, 0x00000000, 0x00000000, 0x03000000, 0x64000000, 0x68747065, 0x6e657473, 0x326c6963, + 0x00013100, 0x00000200, 0x00000200, 0x00000000, 0x00000000, 0x00000000, 0x00000400, 0x73617200, + 0x62003274, 0x02000001, 0x02000000, 0x00000000, 0x00000000, 0x00000000, 0x15000000, 0x73000000, + 0x00326d61, 0x00000004, 0x00000060, 0x00000000, 0x00000004, 0xffffffff, 0x00000002, 0x0000002a, + 0x0000000e, 0x0000002c, 0x00000033, 0x0000000e, 0x0000002c, 0x00000058, 0x0000003c, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000007b, 0x0000005f, 0x00000000, 0x00000004, + 0x00000000, 0x00000000, 0x00000000, 0x000000a1, 0x00000085, 0x00000000, 0x00000010, 0x00000000, + 0x00000000, 0x00000000, 0x000000c7, 0x000000ab, 0x00000000, 0x00000040, 0x00000000, 0x00000000, + 0x00000000, 0x000000f0, 0x000000d4, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000124, + 0x00000108, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x0000015d, 0x00000141, 0x00000000, + 0xffffffff, 0x00000000, 0x00000000, 0x0000018b, 0x0000016f, 0x00000000, 0xffffffff, 0x00000000, + 0x00000000, 0x000001bc, 0x000001a0, 0x00000000, 0xffffffff, 0x00000000, 0x000001ed, 0x000001d1, + 0x00000000, 0xffffffff, 0x00000000, 0x00000217, 0x000001fb, 0x00000000, 0xffffffff, 0x00000000, + 0x00000245, 0x00000229, 0x00000000, 0xffffffff, 0x00000000, 0x0000026f, 0x00000253, 0x00000000, + 0xffffffff, 0x00000000, 0x0000029a, 0x0000027e, 0x00000000, 0xffffffff, 0x00000000, 0x000002cb, + 0x000002af, 0x00000000, 0xffffffff, 0x00000000, 0x000002fc, 0x000002e0, 0x00000000, 0xffffffff, + 0x00000000, 0x00000329, 0x0000030d, 0x00000000, 0xffffffff, 0x00000000, 0x00000354, 0x00000338, + 0x00000000, 0xffffffff, 0x00000000, 0x00000382, 0x00000366, 0x00000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, 0x000003ad, 0x00000391, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, + 0x000003d9, 0x000003bd, 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x000003f8, 0x000003dc, + 0x00000000, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x0000041b, 0x000003ff, 0x00000000, + 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000445, 0x00000429, 0x00000000, 0xffffffff, + 0x00000000, 0x00000000, 0x00000000, 0x00000467, 0x0000044b, 0x00000000, 0xffffffff, 0x00000000, + 0x00000000, 0x00000000, };
static BOOL is_valid_check(BOOL a, BOOL b) @@ -1445,7 +1457,7 @@ static void test_effect_variable_type_class(void) effect_desc.ConstantBuffers); ok(effect_desc.SharedConstantBuffers == 0, "Unexpected shared constant buffers count %u.\n", effect_desc.SharedConstantBuffers); - ok(effect_desc.GlobalVariables == 21, "Unexpected global variables count %u.\n", + ok(effect_desc.GlobalVariables == 25, "Unexpected global variables count %u.\n", effect_desc.GlobalVariables); ok(effect_desc.SharedGlobalVariables == 0, "Unexpected shared global variables count %u.\n", effect_desc.SharedGlobalVariables);