From: Sven Baars sven.wine@gmail.com
Stream is not a member of D3D10_SIGNATURE_PARAMETER_DESC.
Signed-off-by: Sven Baars sven.wine@gmail.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- Supersedes patch 174732.
dlls/d3dcompiler_43/tests/reflection.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dcompiler_43/tests/reflection.c b/dlls/d3dcompiler_43/tests/reflection.c index f8c97230d61..c451a81f49d 100644 --- a/dlls/d3dcompiler_43/tests/reflection.c +++ b/dlls/d3dcompiler_43/tests/reflection.c @@ -740,8 +740,11 @@ static void test_reflection_desc_ps(void) i, desc.Mask, pdesc->Mask); ok(desc.ReadWriteMask == pdesc->ReadWriteMask, "GetInputParameterDesc(%u) ReadWriteMask failed, got %x, expected %x\n", i, desc.ReadWriteMask, pdesc->ReadWriteMask); - ok(desc.Stream == pdesc->Stream, "GetInputParameterDesc(%u) Stream failed, got %u, expected %u\n", - i, desc.Stream, pdesc->Stream); + if (D3D_COMPILER_VERSION) + ok(desc.Stream == pdesc->Stream, "(%u): got unexpected Stream %u, expected %u.\n", + i, desc.Stream, pdesc->Stream); + else + ok(!desc.Stream, "(%u): got unexpected Stream %u.\n", i, desc.Stream); }
for (i = 0; i < ARRAY_SIZE(test_reflection_desc_ps_resultout); ++i)
On 29-11-2019 11:57, Matteo Bruni wrote:
else
ok(!desc.Stream,·"(%u):·got·unexpected·Stream·%u.\n",·i,·desc.Stream);
Hi Matteo,
This is not true according to the tests:
https://test.winehq.org/data/tests/d3d10:reflection.html
Also, if you prefer your fix, it should probably be done for the other Stream tests in that file as well.
Best, Sven
On Fri, Nov 29, 2019, 13:05 Sven Baars sven.wine@gmail.com wrote:
On 29-11-2019 11:57, Matteo Bruni wrote:
else
ok(!desc.Stream,·"(%u):·got·unexpected·Stream·%u.\n",·i,·desc.Stream);
Hi Matteo,
This is not true according to the tests:
Oh indeed, there is something weird going on (e.g. https://test.winehq.org/data/ec9eddf86b144cc0fcf975a9cc864cf08ba84eaf/win10_...). That suggests that somehow the "missing" field is changed by the implementation? AFAICS the local variable is supposed to be completely initialized to 0 by the test. Also of note, it looks like only the 64-bit tests are affected.
Also, if you prefer your fix, it should probably be done for the other Stream tests in that file as well.
Well, not if it's wrong... We need to figure out what's going on first. I'll give it a deeper look later today. Alexandre, please ignore the patch for the time being.
Best, Sven
Thanks for the heads up, Matteo.
On Fri, Nov 29, 2019 at 2:07 PM Matteo Bruni matteo.mystral@gmail.com wrote:
On Fri, Nov 29, 2019, 13:05 Sven Baars sven.wine@gmail.com wrote:
On 29-11-2019 11:57, Matteo Bruni wrote:
else
ok(!desc.Stream,·"(%u):·got·unexpected·Stream·%u.\n",·i,·desc.Stream);
Hi Matteo,
This is not true according to the tests:
Oh indeed, there is something weird going on (e.g. https://test.winehq.org/data/ec9eddf86b144cc0fcf975a9cc864cf08ba84eaf/win10_...). That suggests that somehow the "missing" field is changed by the implementation? AFAICS the local variable is supposed to be completely initialized to 0 by the test. Also of note, it looks like only the 64-bit tests are affected.
Okay, as it turns out on 64-bit sizeof(D3D10_SIGNATURE_PARAMETER_DESC) == sizeof(D3D11_SIGNATURE_PARAMETER_DESC) == 32 i.e. the structs have actually the same size, the d3d10 version has just more padding at the end. I thought that the d3d10 version would always end before the offset of the Stream field in the d3d11 structure so testing that the implementation (especially our implementation) doesn't write out of the struct would be a useful test. But that's clearly not the case and checking the contents of the padding isn't a particularly sensible thing to do. I'll drop those checks from the d3d10 tests; Sven, thanks again for the patch and keep looking after the fix in case I still miss something :D
P.S.: It's mildly annoying that pahole doesn't work with PE files, it would have been useful in this case.