Commit Graph

10472 Commits

Author SHA1 Message Date
Jan Sikorski 1554fc44c7 wined3d: Don't pass wined3d_shader to shader_spirv_compile().
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:21 +02:00
Jan Sikorski b0f1634b06 wined3d: Introduce wined3d_view_load_location() helper.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:21 +02:00
Zebediah Figura 7bc0d3edc4 wined3d: Do not return a struct upload_bo from the map_upload_bo callback.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:21 +02:00
Zebediah Figura f0cc2ef2bd wined3d: Call the unmap_upload_bo callback in wined3d_device_context_emit_update_sub_resource().
We will need to mark the resource as no longer mapped, from the client's
perspective.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:21 +02:00
Zebediah Figura a8ff9865b9 wined3d: Rename {prepare, get}_upload_bo() to {map, unmap}_upload_bo().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:21 +02:00
Zebediah Figura 3d1163f108 wined3d: Separate a resource_offset_map_pointer() helper.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:20 +02:00
Zebediah Figura 6ba6d65d91 wined3d: Do not emit an upload for NOOVERWRITE maps on deferred contexts.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:20 +02:00
Stefan Dösinger 235908a7a6 wined3d: Fix the center offset in get_projection_matrix.
If we have clip control, viewport_miscpart_cc applies both the half pixel
offset and the filling convention nudge. We always have integer pixel centers
in this <= d3d9-only codepath.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:20 +02:00
Jan Sikorski fbecfaec1b wined3d: Initial implementation of queries for deferred contexts.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-05 20:09:20 +02:00
Zebediah Figura e06f52eb00 wined3d: Wrap the upload bo address in a new upload_bo structure.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:12 +02:00
Zebediah Figura e906468c64 wined3d: Call prepare_upload_bo in wined3d_device_context_emit_map() only for DISCARD or NOOVERWRITE maps.
We can't do an asynchronous upload with just WINED3D_MAP_WRITE, but we can with
update_sub_resource, and prepare_upload_bo doesn't know which it was called
from.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:12 +02:00
Zebediah Figura 3691680478 wined3d: Do not call list_remove() on a Vulkan query which has not been started.
Or call it twice on one which has.

This fixes a crash in Mafia: Definitive Edition.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-29 21:38:12 +02:00
Jan Sikorski 8a7e6cf166 wined3d: Record a state reset on the first command list.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-28 20:15:10 +02:00
Zebediah Figura 1ebe7e8b0e wined3d: Implement Vulkan NULL cube array image shader resource view descriptors.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 20:38:04 +02:00
Paul Gofman 6b724c3dd8 wined3d: Add GPU information for AMD VANGOGH.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 20:22:24 +02:00
Jan Sikorski bb729bf9d8 wined3d: Fix typo in wined3d_texture_vk_download_data().
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 20:22:21 +02:00
Alexandre Julliard 6ba7773121 makefiles: Add a -mcygwin flag to specify the inverse of -mno-cygwin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-20 22:45:48 +02:00
Jan Sikorski bb285f56f9 wined3d: Avoid stalling the pipeline on 3D blits.
Load the source texture to WINED3D_LOCATION_BUFFER, so that the copy
is GPU-side only.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Jan Sikorski 752551fa30 wined3d: Avoid the pipeline barrier when mapping buffer objects backing textures.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Jan Sikorski 4466d5b51c wined3d: Implement WINED3D_LOCATION_BUFFER for textures in the Vulkan backend.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Jan Sikorski 28b3d83d40 wined3d: Keep PBO support flag in d3d_info.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Jan Sikorski fb69639776 wined3d: Implement support for buffer objects in wined3d_texture_vk_download_data().
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Jan Sikorski 256a2a0913 wined3d: Implement support for buffer objects in wined3d_texture_vk_upload_data().
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Jan Sikorski 8e40f98c3e wined3d: Make wined3d_texture_update_map_binding() backend-independent.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-15 19:34:23 +02:00
Henri Verbeet 554a4a111a wined3d: Use wined3d_mask_from_size() in wined3d_fixup_alpha().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:28:20 +02:00
Henri Verbeet 4261369e5d wined3d: Use WGL_SWAP_COPY_ARB for swapchains with COPY swap effects, if available.
Avoiding the (slow) GDI present path.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:28:18 +02:00
Henri Verbeet 6181b0ea27 wined3d: Use GDI blits for partial presents with COPY swap effects.
The GL/Vulkan backbuffer contents are undefined after a buffer swap.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:28:16 +02:00
Henri Verbeet 830522e196 wined3d: Get rid of the "render_to_fbo" field from the wined3d_swapchain structure.
It's effectively always true when using ORM_FBO, now that the
"AlwaysOffscreen" setting is gone.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:28:14 +02:00
Henri Verbeet b535dea0aa wined3d: Do not attempt to restore GL contexts corresponding to wined3d contexts in wined3d_context_gl_cleanup().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-14 18:28:11 +02:00
Jan Sikorski 9d9d44e44b wined3d: Allow constant buffers to be forced to be write-mappable.
Using a registry setting. Games sometimes use DEFAULT usage and no CPU
access combined with UpdateSubresource() for often-changing constants,
causing us to interrupt the render pass and transfer through a staging
buffer on each update. In such cases forcing the buffers to be mappable
greatly increases performance.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-13 19:57:28 +02:00
Jan Sikorski d23f1007d2 wined3d: Remove wined3d_texture_copy_sysmem_location().
Use wined3d_context_copy_bo_address() instead.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 21:11:48 +02:00
Nikolay Sivov a408fdf5f5 wined3d: Handle null semantics in stream output description cache.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 21:11:30 +02:00
Francois Gouget 4a5d95272c wined3d: Make wined3d_context_vk_allocate_memory() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 21:21:26 +02:00
Anton Baskanov e3db02d0cb wined3d: Simplify the odd line condition in gen_yv12_read().
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 21:21:19 +02:00
Anton Baskanov f4d2bdddca wined3d: Fix the odd line condition in gen_yv12_read().
Signed-off-by: Anton Baskanov <baskanov@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 21:21:16 +02:00
Jan Sikorski b4e03a7c6e wined3d: Avoid read-to-read resource barriers.
Guard against the most recent write operation instead. Accumulate read
bindings to a) not issue unnecessary barriers when a resource has
multiple read-only usages, and b) synchronize with all previous read
bindings when writing.

This is motivated by an issue where a program using a single buffer to
store both indices and vertex attributes causes superfluous barriers on
each draw call.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-27 21:21:22 +02:00
Francois Gouget 135633bc20 wined3d: Fix the spelling of a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 21:49:09 +02:00
Matteo Bruni 451dede7c0 wined3d: Clear dirty flags after calling all the state handlers in context_apply_draw_state().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 23:07:06 +02:00
Matteo Bruni aaf4ef6e62 wined3d: Don't consider texture rectangles for buffers.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-12 23:07:03 +02:00
Jan Sikorski bd4b717702 wined3d: Avoid redundantly resetting timestamp queries.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:57:07 +02:00
Jan Sikorski 9b9f07ca84 wined3d: Don't try to reset query pools if we don't have a command buffer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51419
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-06 19:57:04 +02:00
Jan Sikorski fed705e03f wined3d: Make use of VK_EXT_host_query_reset if available.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Jan Sikorski ad0b459ebe wined3d: Do not request device local memory if we also want it to be host visible.
Some implementations do not support this combination.

Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 16:50:50 +02:00
Zebediah Figura 203dd2b640 wined3d: Use a designated initializer to initialize wined3d_settings.
And replace ~0u with the more meaningful UINT_MAX.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 16:50:48 +02:00
Jan Sikorski ba67dfe8c8 wined3d: Track queries started inside/outside of a render pass separately.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-29 16:50:41 +02:00
Zebediah Figura e4502cff81 wined3d: Check for failure from wined3d_device_context_require_space() in wined3d_device_context_emit_unmap().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51485
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-27 16:39:55 +02:00
Zebediah Figura f838d5a2b9 wined3d: Implement constant buffer offsetting for Vulkan.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Zebediah Figura 5fe58921bf wined3d: Separate a helper to update Vulkan sampler bindings.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Zebediah Figura 17d39ff067 wined3d: Separate a helper to update Vulkan UAV counter bindings.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00
Zebediah Figura fd6a67436b wined3d: Separate a helper to update Vulkan UAV bindings.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-23 16:43:50 +02:00