https://bugs.winehq.org/show_bug.cgi?id=39852
Bug ID: 39852 Summary: 3DMark03: Mother Nature test: waterfall has no transparency if AllwaysOffScreen=disabled Product: Wine Version: 1.8-rc4 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: isakov-sl@bk.ru
Created attachment 53208 --> https://bugs.winehq.org/attachment.cgi?id=53208 Waterfall is nontransparent
If AllwaysOffScreen set to disabled then the test is faster but water looks like non-transparent surface. If set to enable then the picture is good.
https://bugs.winehq.org/show_bug.cgi?id=39852
--- Comment #1 from Sergey Isakov isakov-sl@bk.ru --- Same in version 1.7.54. Will look older versions.
https://bugs.winehq.org/show_bug.cgi?id=39852
--- Comment #2 from Sergey Isakov isakov-sl@bk.ru --- It is easy to see that wined3d_settings.always_offscreen used only in two places: wined3d/context.c ~~~ if (wined3d_settings.offscreen_rendering_mode != ORM_BACKBUFFER && wined3d_settings.always_offscreen) { color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM); ds_format = wined3d_get_format(gl_info, WINED3DFMT_UNKNOWN); } ~~~ and wined3d/swapchain.c ~~~ if (!wined3d_settings.always_offscreen && !swapchain->desc.multisample_type && swapchain->desc.backbuffer_width == client_rect.right && swapchain->desc.backbuffer_height == client_rect.bottom) { TRACE("Backbuffer dimensions match window dimensions, rendering onscreen.\n"); swapchain->render_to_fbo = FALSE; return; } ~~~ Second place is the key for this bug. If I set TRUE then the picture is good. Also affected test "Pixel shaders". tracing +d3d didn't reveal more differences.
https://bugs.winehq.org/show_bug.cgi?id=39852
--- Comment #3 from Sergey Isakov isakov-sl@bk.ru --- I understand. There is no bug if set offscreen_rendering_mode = ORM_BACKBUFFER. The bug is only if FBO+OffscreenDisabled. In this case color_format = WINED3DFMT_B8G8R8X8_UNORM (no transparency). In other cases {OffscreenRenderingMode, AlwaysOffscreen} the final color_format will be WINED3DFMT_B8G8R8A8_UNORM (with transparency).
For backbuffer the correction is here: ~~~~ /* In case of ORM_BACKBUFFER, make sure to request an alpha component for * X4R4G4B4/X8R8G8B8 as we might need it for the backbuffer. */ if (wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) { auxBuffers = TRUE;
if (color_format->id == WINED3DFMT_B4G4R4X4_UNORM) color_format = wined3d_get_format(gl_info, WINED3DFMT_B4G4R4A4_UNORM); else if (color_format->id == WINED3DFMT_B8G8R8X8_UNORM) color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM); } ~~~
As I see fbo+AllwaysOffscreen=disable also requires same correction, i.e. unconditionally request ~~~ if (color_format->id == WINED3DFMT_B8G8R8X8_UNORM) color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM); ~~~ What is the reason to this restriction? Is it cause other bugs?
https://bugs.winehq.org/show_bug.cgi?id=39852
--- Comment #4 from Sergey Isakov isakov-sl@bk.ru --- Hurray! The issue resolved in wine-1.9.4-185-g9d3230b I think with commit d71f452c4d70a9fa6513322a5751f1eb0f46b4e1 by Stefan Dösinger
(with wine-1.9.4-4-gd6b289a the bug is still present)
https://bugs.winehq.org/show_bug.cgi?id=39852
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Sergey Isakov isakov-sl@bk.ru --- The issue resolved
https://bugs.winehq.org/show_bug.cgi?id=39852
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d71f452c4d70a9fa6513322a575 | |1f1eb0f46b4e1 CC| |mstefani@redhat.com
https://bugs.winehq.org/show_bug.cgi?id=39852
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.5.
https://bugs.winehq.org/show_bug.cgi?id=39852
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=39852
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #7 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.5.