Re: [PATCH v50 0/11] MR10567: wined3d: fix SRGB RTV fail for UNORM swapchain backbuffers > 1 for d3d10/11
This is hard to read and could probably do with quite a lot of splitting Tracking the list of swapchain views, while not doing anything with them yet, can be its own commit. GL and Vulkan rotate implementations should ideally be separated.
Commits have been split. Please let me know if they should be adjusted more.
D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST implementation can be its own commit It also should not use a fixed list of formats, and should live in wined3d like all the other format flags.
D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST now handled along with the other format flags for `ID3D11Device_CheckFormatSupport
D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST validation similarly can be its own commit, and also should live in wined3d. Actually, you seem to unnecessarily have it in both places?
`wined3d_check_device_format` is called directly now instead of via `ID3D11Device_CheckFormatSupport` for less `d3d_rendertarget_view_init` overhead which handles the validation specifically for d3d10/11 all in one call. `ID3D11Device_CheckFormatSupport` changes are technically no longer needed to support the fix but included with patchset anyway since it may be needed to fix other apps.
I would not use the fixed array size of 29; just allocate it dynamically instead the same as we do for the actual list of backbuffers. With that done, wined3d_swapchain_rendertarget_view_gl is fairly unnecessary; it's just a single pointer that can be put directly in wined3d_rendertarget_view like the others.
`wined3d_swapchain_rendertarget_view_gl` and vk have been changed as list structs instead of wrappers of `wined3d_rendertarget_view_gl` and initialized based on `view_gl->bo_user.entry`.
Disabling GL_FRAMEBUFFER_SRGB on swapchain blit is still wrong, as Henri said. (Moving it back "to fix test failures" is not correct; you need to understand why it should be there.) And that should be its own commit; it's not related to the rest of this.
GL_FRAMEBUFFER_SRGB has been moved back to `texture2d_blt_fbo` with a condition for `resolve_format` `WINED3D_FORMAT_CAP_SRGB_WRITE`. Unclear if this is actually correct but it fixes tests and Frostpunk. @zfigura originally mentioned WINED3D_FORMAT_CAP_SRGB_WRITE may be a discrepancy before I discovered lack of backbuffers support was a wider problem so it seems to come full circle. Some extra vulkan/damavand tests fail locally despite wine server tests passing. Is there a way to get wine server to also test vulkan? Vulkan may have bugs that this patch exposes similar to GL_FRAMEBUFFER_SRGB bug. I think this merge is ready for another review while vulkan fails are addressed. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10567#note_144391
participants (1)
-
Stian Low (@stianlow)