Detection of swapchain backbuffer format casting support has been corrected based on @hverbeet suggestion to check D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST instead of feature_level. `wined3d_rendertarget_view` is no longer handles extra rtvs per swapchain backbuffers. Instead `struct wined3d_swapchain_rendertarget_view_gl` now handles extra views via `GLuint gl_swap_views[29]` and `struct wined3d_swapchain_rendertarget_view_vk` handles via `VkImageView vk_swap_views[29]`. Extra backbuffer views array size 29 (D3DPRESENT_BACK_BUFFERS_MAX_EX - 1) was chosen instead of a list. D3DPRESENT_BACK_BUFFERS_MAX_EX is from d3d9 and I did not find max equiv for d3d10+. Is d3d10+ bounded by something other than D3DPRESENT_BACK_BUFFERS_MAX_EX? Maybe the array is better handled by a list but array was chosen to keep memory packed despite costing extra space because the overhead seems likely negligible given there will probably never be too many RTVs for swapchain backbuffers. Latest patch also leaves d3d9 untouched because new swapchain backbuffer rtvs are now handled entirely within wined3d. d3d8/9 tests seem to pass but unclear if they still need to be adjusted to account for new `wined3d_swapchain struct list back_buffer_rendertarget_views;`. d3d8/9 are able to create rtvs for any swapchain backbuffer vs just the first for d3d10/11 and seem not to support different formats from the swapchain backbuffers, so the latest changes should not apply. wined3d logic seems to skip creating actual views when format and layer count matches so I think d3d8/9 should be unaffected by this patch but still needs to be tested more. Wine server tests pass but it seems to only run gl and not vulkan/damavand because vk fails for my local tests. Previous patch passed for both vk and gl so something like `vk_blitter_clear_rendertargets` may need to be fixed to handle the new impl. Frostpunk works for both gl and vk so vk bug seems related to blit_clear which works for gl. Besides pending vk blit_clear fixes, this latest patch seems ready enough for another review. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10567#note_144308