Commit Graph

10019 Commits

Author SHA1 Message Date
Henri Verbeet 0801337496 wined3d: Get rid of the special format handling in wined3d_check_depth_stencil_format().
By simply removing WINED3DFMT_FLAG_DEPTH_STENCIL from
WINED3DFMT_S1_UINT_D15_UNORM and WINED3DFMT_S4X4_UINT_D24_UNORM. That's also
the only way these formats could be used by GL, so this allows us to remove
them from format_texture_info[] completely.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Henri Verbeet a4cedbe86d wined3d: Get rid of WINED3D_QUIRK_SET_TEXCOORD_W.
This quirk only affects fixed-function fragment processing, which hasn't
been a supported configuration on the affected hardware for a while now.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Paul Gofman 5b287bb0ca wined3d: Merge _USER_MEMORY and _SYSMEM locations.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49375
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 00:05:44 +02:00
Henri Verbeet 67d0038e49 wined3d: Do not explicitly check 3D depth/stencil capabilities in wined3d_check_device_format().
WINED3D_RTYPE_NONE checks both 2D and 3D resource capabilities, but has
special handling for 3D depth/stencil capabilities. For
WINED3D_RTYPE_TEXTURE_3D, WINED3D_BIND_DEPTH_STENCIL is not an allowed bind
flag, so we never get here. This fixes a regression introduced by commit
9b8847ed7b.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-15 20:56:48 +02:00
Henri Verbeet 319ba87ab1 wined3d: Partially implement adapter_vk_clear_uav().
This is easy, and sufficient in a lot of cases. However, for a more
complete implementation, we'll want to do something more similar to
vkd3d.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Henri Verbeet 26e961b39a wined3d: Reference the back buffer in wined3d_swapchain_vk_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Henri Verbeet c6f94cc87b wined3d: Clear WINED3DFMT_FLAG_DEPTH_STENCIL if the format is not supported as FBO attachment.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Henri Verbeet 9b8847ed7b wined3d: Introduce WINED3DFMT_FLAG_DEPTH_STENCIL.
To indicate whether WINED3D_BIND_DEPTH_STENCIL is valid for the format.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Henri Verbeet c73f4a8129 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in create_and_bind_fbo_attachment().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:52 +02:00
Henri Verbeet 6fd061ba19 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in query_internal_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:50 +02:00
Henri Verbeet 28145b97eb wined3d: Use "depth_size" to check for a depth format in resolve_depth_buffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:47 +02:00
Henri Verbeet 831701d3f4 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:44 +02:00
Henri Verbeet f570c9b655 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in fbo_blitter_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-04 13:50:42 +02:00
Henri Verbeet 8d7c39b860 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in texture2d_depth_blt_fbo().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:49:01 +02:00
Henri Verbeet 2ae6de5287 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in texture2d_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:58 +02:00
Henri Verbeet 97a250075a wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in wined3d_texture_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:55 +02:00
Henri Verbeet 2b2a6ebdd1 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in ffp_blit_supported().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:52 +02:00
Henri Verbeet ce4b63dc88 wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in glsl_blitter_supported().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:48 +02:00
Henri Verbeet 9af34f9aea wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in arbfp_blit_supported().
The idea is to get rid of the WINED3DFMT_FLAG_DEPTH and
WINED3DFMT_FLAG_STENCIL format flags, and instead introduce a flag similar to
WINED3DFMT_FLAG_RENDERTARGET that indicates whether the format can be used
with WINED3D_BIND_DEPTH_STENCIL.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:43 +02:00
Henri Verbeet 4616867798 wined3d: Get rid of the "d3d_initialized" check in wined3d_texture_update_map_binding().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:39 +02:00
Henri Verbeet cc6d90b823 wined3d: Get rid of the "d3d_initialized" check in device_resource_released().
This used to protect against accessing the framebuffer state on the no3d
adapter; that's no longer a concern.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:34 +02:00
Henri Verbeet c125c65846 wined3d: Get rid of the "d3d_initialized" check in context_resource_released().
When this was introduced in commit 401e99b0c0,
it protected against calling the equivalent of context_acquire() on the
equivalent of the no3d adapter. Commit
94d33d3e86 removed the call in question.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:30 +02:00
Henri Verbeet 2200b841d5 wined3d: Get rid of the "d3d_initialized" check in wined3d_device_reset().
We require an implicit swapchain, so "d3d_initialized" is always true.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 21:48:24 +02:00
Henri Verbeet 35b2326265 wined3d: Set "device->d3d_initialized" in wined3d_device_set_implicit_swapchain().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 11:14:54 +02:00
Henri Verbeet f06f28cf04 wined3d: Explicitly check for WINED3D_NO3D instead of "d3d_initialized" in surface_convert_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 11:14:51 +02:00
Henri Verbeet 42a909b4f9 wined3d: Check for GPU access before attempting an upload blit in texture2d_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 11:14:47 +02:00
Henri Verbeet 17a1391fb6 wined3d: Create WINED3D_NO3D swapchain surfaces without GPU access.
The main issue this addresses is that WINED3D_RESOURCE_ACCESS_GPU implies that
WINED3D_LOCATION_TEXTURE_RGB makes sense as a location for the texture.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 11:14:45 +02:00
Henri Verbeet acb7923881 wined3d: Wait for the command stream to finish before removing the context in adapter_no3d_uninit_3d().
Like we do in adapter_gl_uninit_3d() and adapter_vk_uninit_3d().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 11:14:34 +02:00
Henri Verbeet 9aeef376e5 wined3d: Implement swapchains for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:31 +02:00
Henri Verbeet a8141ef080 wined3d: Move swapchain buffer discarding to wined3d_cs_exec_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Henri Verbeet 859514a684 wined3d: Map Vulkan adapter bo's persistently on 64-bit architectures.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Henri Verbeet d777b9492d wined3d: Initialise more caps and limits in wined3d_adapter_vk_init_d3d_info().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Henri Verbeet a2e39d837e wined3d: Use wined3d_buffer_vk_get_buffer_info() when binding Vulkan vertex buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Paul Gofman 3aa53f328c wined3d: Allow multisample source locations for all colour blits.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman 826cee41a7 wined3d: Allow multisample destination locations for all colour blits.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman c0ab55700f wined3d: Prepare/load the destination resource location in glsl_blitter_blit().
Like the other blitters. When the GLSL blitter was introduced, the idea was
that caller would be responsible for doing this, but we never ended up
updating the other blitters.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49251
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Paul Gofman a389f32967 wined3d: Use a single wined3d_texture_is_full_rect() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-28 20:18:32 +02:00
Henri Verbeet 5d1fc25808 wined3d: Use wined3d_buffer_vk_get_buffer_info() when binding the Vulkan index buffer.
Since it updates "bo_user.valid".

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 18:42:47 +02:00
Henri Verbeet 2d22715561 wined3d: Also load the index buffer in wined3d_context_vk_apply_draw_state() if STATE_INDEXBUFFER was invalidated.
Otherwise we might try to bind a NULL buffer if the index buffer was not
previously loaded.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 18:42:47 +02:00
Henri Verbeet 3da7d9d6bc wined3d: Map vkGetPhysicalDeviceFeatures2() to vkGetPhysicalDeviceFeatures2KHR().
Instead of to vkGetPhysicalDeviceFeaturess2KHR(), which doesn't
typically exist.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 18:42:47 +02:00
Henri Verbeet 7a03ccfbe9 wined3d: Implement pipeline statistics queries for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 18:42:47 +02:00
Henri Verbeet 8f70aad2d5 wined3d: Implement event queries for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 18:42:47 +02:00
Henri Verbeet 23ad2662c3 wined3d: Implement timestamp disjoint queries for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet 7101af57bf wined3d: Implement timestamp queries for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet 8cb3d29cf0 wined3d: Implement occlusion queries for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet c1f09c2461 wined3d: Move the swapchain cursor texture blit to wined3d_cs_exec_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet 4bae47cf17 wined3d: Move the swapchain logo texture blit to wined3d_cs_exec_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet b65ca13305 wined3d: Move the swapchain fps counter to wined3d_cs_exec_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 22:29:40 +02:00
Henri Verbeet b9638abe46 wined3d: Implement vertex attribute divisors for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 22:29:38 +02:00
Henri Verbeet 5e7dd9d73e wined3d: Implement alpha to coverage multisampling for the Vulkan adapter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 22:29:35 +02:00