https://bugs.winehq.org/show_bug.cgi?id=47391
Bug ID: 47391 Summary: Condor2: corrupt graphics, because Z-Buffering not working Product: Wine Version: 4.10 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: felixhaedicke@web.de Distribution: ---
Created attachment 64736 --> https://bugs.winehq.org/attachment.cgi?id=64736 Corrupt graphics in Condor2
Graphics in Condor2 (http://www.condorsoaring.com) is unusable, e. g. no panel instruments are shown.
It seems that Z-Buffering is not activated correctly for this game. It shows the following warning a thousand times:
0032:fixme:d3d:state_zenable Unrecognized depth buffer type 0xffffffff.
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #1 from Felix Hädicke felixhaedicke@web.de --- Created attachment 64737 --> https://bugs.winehq.org/attachment.cgi?id=64737 Patch: wined3d: call glEnable(GL_DEPTH_TEST) for unrecognized depth buffer type
With this patch, graphics looks fine in Condor2, and the simulator is fully playable
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #2 from Felix Hädicke felixhaedicke@web.de --- Created attachment 64738 --> https://bugs.winehq.org/attachment.cgi?id=64738 Graphics is looking good with patch #64737
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #3 from Matteo Bruni matteo.mystral@gmail.com --- Nice job! Notice that usually patches aren't picked up from Bugzilla (see https://wiki.winehq.org/SubmittingPatches).
WRT the patch itself, it probably needs some tests to be acceptable for submission. You can probably extend or tweak existing tests in ddraw..d3d11 to verify that any non-0 value for the depth test state means "enabled".
https://bugs.winehq.org/show_bug.cgi?id=47391
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #4 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-5.13?
https://bugs.winehq.org/show_bug.cgi?id=47391
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |fgouget@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #5 from joaopa jeremielapuree@yahoo.fr --- No one interested in fixing this pretty easy bug?
https://bugs.winehq.org/show_bug.cgi?id=47391
Alan alan1010035@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alan1010035@gmail.com
--- Comment #6 from Alan alan1010035@gmail.com --- (In reply to joaopa from comment #5)
No one interested in fixing this pretty easy bug?
i am interest in fixing it but am new how do i write a test case for this? what should i test ? a function? i need guidance
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #7 from joaopa jeremielapuree@yahoo.fr --- I think something as hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, 0x55); /* test a nonzero dummy value */ ok(SUCCEEDED(hr), "Non zero dummy value should enable Z-buffering, hr %#lx.\n", hr);
in https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/d3d8/tests/visual.c#L...
should be enough to prove the fix is correct. Obviously, you will have to do the same for all the directx versions.
Surely, someone will confirm or infirm what I wrote above.
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #8 from Alan alan1010035@gmail.com --- (In reply to joaopa from comment #7)
I think something as hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, 0x55); /* test a nonzero dummy value */ ok(SUCCEEDED(hr), "Non zero dummy value should enable Z-buffering, hr %#lx.\n", hr);
in https://gitlab.winehq.org/wine/wine/-/blob/master/dlls/d3d8/tests/visual. c#L8634
should be enough to prove the fix is correct. Obviously, you will have to do the same for all the directx versions.
Surely, someone will confirm or infirm what I wrote above.
tho i see
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, FALSE); ok(SUCCEEDED(hr), "Failed to disable Z test, hr %#lx.\n", hr);
many times in the test file with the same values what's the reason for that?
https://bugs.winehq.org/show_bug.cgi?id=47391
--- Comment #9 from joaopa jeremielapuree@yahoo.fr --- Bug still occurs with wine-8.11