Paul Gofman
b36e4cfe2d
wined3d: Clear GL backbuffer in wined3d_context_gl_init().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-14 21:20:42 +01:00
Jan Sikorski
9a799898a1
wined3d: Avoid waiting for a command buffer to finish executing to read off its queries.
...
Some games wait for query results on the frame executing the query,
expecting that enough time have passed for it to be available. By
requiring that the entire command buffer is done, we risk stalling the
whole frame if it wasn't flushed along the way. This patch drops this
requirement.
Mainly, we need to ensure that we don't call vkGetQueryPoolResults()
before the reset command is executed, and accidentally retrieve result
from previous usage. Using host query reset doesn't quite solve the
problem, as it might get called too early, if the application decides to
reuse a query without waiting for results. Besides, we want to support
devices where host query reset is not available.
To make it work, when a Vulkan query is no longer needed, we queue it
for resetting at command buffer submission time, and only mark it free
for reuse after this command buffer is finished executing.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:13:10 +01:00
Jan Sikorski
8981c32fa2
wined3d: Reinitialize query pool's free list entry when it runs out.
...
We check if it's empty to put it back in.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:12:33 +01:00
Zebediah Figura
626dc29ae2
wined3d: Always submit UPDATE_SUB_RESOURCE ops when uploading if not mapping persistently.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:08:27 +01:00
Zebediah Figura
f30d3ac214
wined3d: Introduce wined3d_lock_init() and wined3d_lock_cleanup() helpers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:08:22 +01:00
Zebediah Figura
d53f9d5f88
wined3d: Always set map_ptr for mapped OpenGL BOs.
...
Regardless of whether we are mapping persistently. Matches the Vulkan backend.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:08:05 +01:00
Jan Sikorski
b33a5b34b7
wined3d: Use a separate heap for deferred resource upload buffers.
...
Significantly reduces global heap lock contention in some games.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:07:58 +01:00
Paul Gofman
2435f116c3
wined3d: Use StretchBlt() in swapchain_blit_gdi().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 17:07:48 +01:00
Zebediah Figura
d9e8f4b458
wined3d: Call wined3d_context_unmap_bo_address() when updating a buffer BO.
...
That is, don't just flush it, but unmap it as well.
As of d8e8ab21c0
, we can get here even when
!wined3d_map_persistent(). Thus we currently end up leaving BOs mapped when
performing an accelerated DISCARD map. Try to avoid that.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 18:09:36 +01:00
Zebediah Figura
28285f1e76
wined3d: Set resource->client.addr in buffer_resource_sub_resource_map() only if persistently mapping.
...
Be consistent with wined3d_cs_map_upload_bo(). This may change in the future,
but for now we depend on this logic in the Vulkan backend.
This fixes test_dynamic_map_synchronization() on 32-bit architectures with the
Vulkan backend, which is currently broken because we try to perform accelerated
NOOVERWRITE maps while unmapping the same BOs.
Fixes: d8e8ab21c0
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-10 18:09:30 +01:00
Zebediah Figura
06e178e87f
wined3d: Initialize map_ptr to NULL in wined3d_context_vk_create_slab_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>
2022-02-10 18:09:26 +01:00
Matteo Bruni
ee78b46e8a
wined3d: Skip non-color outputs in SM4 shader output mapping.
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 20:08:27 +01:00
Matteo Bruni
84dcf5279f
wined3d: Improve comment in wined3d_query_vk_issue().
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 20:08:21 +01:00
Zebediah Figura
86f0ae8efb
wined3d: Use the chunk allocator for GL uniform buffers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 20:08:02 +01:00
Zebediah Figura
b208711214
wined3d: Use the chunk allocator for GL texture buffers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-09 20:07:59 +01:00
Zebediah Figura
1e72b622f0
wined3d: Use the chunk allocator for GL pixel unpack buffers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:15 +01:00
Zebediah Figura
5fb6d5cc31
wined3d: Use the chunk allocator for GL atomic counter buffers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:14 +01:00
Henri Verbeet
7c844cd3c9
wined3d: Use the chunk allocator for GL indirect draw buffers.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-08 20:24:14 +01:00
Henri Verbeet
576e44e040
wined3d: Use wined3d_bit_scan() in shader_arb_generate_pshader().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 20:36:04 +01:00
Henri Verbeet
59b06fdb43
wined3d: Use wined3d_bit_scan() in shader_generate_arb_declarations().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-01 20:36:01 +01:00
Zebediah Figura
d8e8ab21c0
wined3d: Allow DISCARD maps to be accelerated even on 32-bit architectures.
...
We will still block on a subsequent NOOVERWRITE map, so in practice this
probably doesn't remove any bottlenecks. However, it leads to clearer code, and
it matches what will need to be done for textures.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:55 +01:00
Henri Verbeet
01bd9a7028
wined3d: Introduce a wined3d_bo_gl_unmap() helper.
...
Mirroring wined3d_bo_vk_unmap().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:55 +01:00
Zebediah Figura
1af6cb07b2
wined3d: Introduce WINED3D_LOCATION_CLEARED and use it for the initial state of buffers.
...
The practical effect of this is to defer clearing buffers until they are used.
Under normal circumstances the buffer will be initially discarded, in which
case we need not clear it at all, and may even avoid ever allocating sysmem.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Zebediah Figura
6b96021a1c
wined3d: Prefer mapping a BO if the buffer has WINED3D_BUFFER_USE_BO set.
...
Instead of checking whether a BO already exists.
This will end up allocating a BO earlier in some cases. This is not particularly
impactful by itself, since we already would have sysmem available and thus could
use it without a performance penalty. However, we would like to avoid ever
allocating sysmem where not necessary, in particular by deferring allocation of
any location at all until the resource is written to.
This also has the side effect of fixing test_map_synchronization() on 64-bit
architectures, broken since 194b47b4fd
. The test
creates a buffer, maps it once, then maps it again with NOOVERWRITE while the
GPU is still drawing, expecting the new data to be read by the GPU during the
draw. On 32-bit machines, and 64-bit machines before the offending commit, we do
the following:
First map: uses SYSMEM since the BO is not created yet
Draw: upload to VBO
Second map: map the existing VBO with GL_MAP_UNSYNCHRONIZED_BIT
After 194b47b4fd
, we don't use GL_MAP_UNSYNCHRONIZED_BIT since the buffer has
READ access, which means that the second map will be synchronized and wait for
the draw to complete.
After this patch, we do the following:
First map: create and map a VBO (not unsynchronized, but coherent and
persistently mapped)
Draw: use mapped VBO
Second map: write to existing (coherent) VBO, which is unsynchronized
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Zebediah Figura
287bfc7758
wined3d: Use wined3d_buffer_load_location() in wined3d_buffer_get_memory().
...
wined3d_buffer_load_location() can handle loading from
WINED3D_LOCATION_DISCARDED just fine, so use it instead of duplicating the
functionality here.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Henri Verbeet
837e605076
wined3d: Use wined3d_bit_scan() in shader_arb_load_np2fixup_constants().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Henri Verbeet
4946471bec
wined3d: Use wined3d_bit_scan() in shader_glsl_generate_fragment_shader().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Henri Verbeet
1a7dbab1c4
wined3d: Use wined3d_bit_scan() in shader_generate_glsl_declarations().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Henri Verbeet
bbb7d41eae
wined3d: Use wined3d_bit_scan() in shader_glsl_load_constantsB().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Henri Verbeet
6f150854e7
wined3d: Use wined3d_bit_scan() in shader_glsl_load_constants_i().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-28 21:10:21 +01:00
Alexandre Julliard
f0cd33c69e
include: Add support for defining Win32 types as 'long' where possible.
...
Add -DWINE_NO_LONG_TYPES to modules that still have compilation
warnings with long types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 20:38:22 +01:00
Henri Verbeet
bfac6c990d
wined3d: Use wined3d_bit_scan() in set_glsl_shader_program().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:59:14 +01:00
Henri Verbeet
c265f2f2ac
wined3d: Use wined3d_bit_scan() in wined3d_context_gl_map_fixed_function_samplers().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:59:09 +01:00
Henri Verbeet
d6a7918a46
wined3d: Use wined3d_bit_scan() in draw_primitive_immediate_mode().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:58:59 +01:00
Henri Verbeet
d89bfc39c5
wined3d: Use wined3d_bit_scan() in context_preload_textures().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:58:51 +01:00
Henri Verbeet
a7cd33ef51
wined3d: Get rid of a superfluous cast.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-27 17:58:47 +01:00
Henri Verbeet
caea3d10fa
wined3d: Use wined3d_bit_scan() in context_update_stream_info().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:57 +01:00
Henri Verbeet
1e33280864
wined3d: Use wined3d_bit_scan() in wined3d_device_process_vertices().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:57 +01:00
Henri Verbeet
dc990b6b2b
wined3d: Use wined3d_bit_scan() in vshader_get_input().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Henri Verbeet
8350e026e8
wined3d: Use wined3d_uint32_compare() in glsl_program_key_compare().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Henri Verbeet
ceb9994669
wined3d: Use wined3d_uint32_compare() in compare_sig().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Jan Sikorski
b49062303e
wined3d: Acquire references to mip-map generation shader resource views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Jan Sikorski
a33ed42ffe
wined3d: Acquire references to unordered-access view counter buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Jan Sikorski
51c10cbc33
wined3d: Acquire references to blitted resources for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Jan Sikorski
06a5337f7b
wined3d: Acquire references to updated resources for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Zebediah Figura
ff94b838fd
wined3d: Handle structured buffers in wined3d_unordered_access_view_vk_clear().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:56 +01:00
Alexandre Julliard
3527230c46
include: Remove the wine_ prefix on rbtree functions.
...
Add defines for frequently-used functions.
For compatibility with vkd3d.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-26 21:53:55 +01:00
Henri Verbeet
c8c79a9043
wined3d: Use wined3d_mask_from_size() in set_glsl_shader_program().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Henri Verbeet
8c7dce6949
wined3d: Use wined3d_mask_from_size() in shader_glsl_generate_stream_output_setup().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Henri Verbeet
02106b0195
wined3d: Use wined3d_mask_from_size() in shader_glsl_gather4().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Henri Verbeet
e804eebe0b
wined3d: Use wined3d_mask_from_size() in shader_glsl_store_uav().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Jan Sikorski
6e0e2bef5d
wined3d: Acquire references to vertex buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Jan Sikorski
c36351be1e
wined3d: Acquire references to stream output buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Jan Sikorski
8641353442
wined3d: Acquire references to index buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Jan Sikorski
5f417adf18
wined3d: Acquire references to indirect draw buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Jan Sikorski
3fb9a8ea51
wined3d: Acquire references to indirect dispatch buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 20:50:49 +01:00
Zebediah Figura
9206277105
d3d11: Report D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER.
...
This fixes a black screen in The Unfinished Swan.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Zebediah Figura
59636714e7
d3d11: Report D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Henri Verbeet
98d3624f23
wined3d: Use wined3d_mask_from_size() in stateblock_savedstates_set_all().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Henri Verbeet
5a8ffed774
wined3d: Use wined3d_mask_from_size() in find_ps_compile_args().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Henri Verbeet
e9a109835f
wined3d: Use wined3d_mask_from_size() in geometry_shader_init_stream_output().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Henri Verbeet
b0a961eaca
wined3d: Properly compare integers in wined3d_graphics_pipeline_vk_compare().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Henri Verbeet
162fc7bd46
wined3d: Properly compare integers in wined3d_bo_slab_vk_compare().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Jan Sikorski
18a6d9ab0e
wined3d: Acquire references to cleared render-target views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Jan Sikorski
4f7837a584
wined3d: Acquire references to cleared unordered-access views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Jan Sikorski
d5e13912b2
wined3d: Acquire references to constant buffers for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Jan Sikorski
e7810388e2
wined3d: Acquire references to depth/stencil views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Jan Sikorski
e6b61128e5
wined3d: Acquire references to unordered-access views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 21:44:51 +01:00
Jan Sikorski
06ce7001bd
wined3d: Acquire references to shader resource views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:23 +01:00
Jan Sikorski
2991180e47
wined3d: Acquire references to render-target views for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:21 +01:00
Jan Sikorski
c976f8fb95
wined3d: Acquire blend state references for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:19 +01:00
Jan Sikorski
7c0d1595e0
wined3d: Acquire rasterizer state references for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:16 +01:00
Jan Sikorski
cb853ec2cd
wined3d: Acquire depth/stencil state references for command lists by inspecting CS packets.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 18:40:14 +01:00
Henri Verbeet
d878158675
wined3d: Properly compare integers in wined3d_so_desc_compare().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:18:41 +01:00
Henri Verbeet
9b98d86f29
wined3d: Properly compare integers in wined3d_pipeline_layout_vk_compare().
...
As pointed out by Giovanni, modular subtraction doesn't produce a total order;
in particular, it's not transitive. For the values likely to be encountered by
wined3d_pipeline_layout_vk_compare(), this is perhaps unlikely to be an issue
in practice. However, that's not necessarily the case for e.g. handles or
masks.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:18:38 +01:00
Henri Verbeet
0a1b3fc136
wined3d: Use wined3d_mask_from_size() in wined3d_ffp_get_fs_settings().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:18:35 +01:00
Henri Verbeet
074dd54536
wined3d: Use wined3d_mask_from_size() in wined3d_ffp_get_vs_settings().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:18:31 +01:00
Henri Verbeet
8b4ae5951d
wined3d: Discard texture resources before unloading them in wined3d_texture_destroy_object().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-20 18:18:29 +01:00
Zebediah Figura
35e08b90b3
wined3d: Do not iterate over multiple layers when clearing 3D UAVs.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52390
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-13 17:05:00 +01:00
Andrey Gusev
76c9fc8a76
wined3d: Handle WINED3DSPSM_NONE in shader_sm4_read_param().
...
Next titles call for it Dying Light, Mortal Shell, Deus Ex: Mankind Divided, Thief (2014).
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-11 21:59:51 +01:00
Henri Verbeet
1908cb9501
wined3d: Use GL_MAP_PERSISTENT_BIT even for non-persistent bo maps.
...
While the reason for doing this is to allow draws referencing mapped buffer
resources to succeed, the behaviour of the application in the referenced bug
report (FlatOut) appears to be slightly different; it does end up drawing
while buffer objects are mapped due to reordering of map operations inside the
command stream, but as far as I can tell those buffer objects are not
referenced by the draw. The driver in question (fglrx/Catalyst) appears to
simply be a bit overzealous with throwing errors, and unfortunately doesn't
provide much more information than "glDrawElementsBaseVertex has generated an
error (GL_INVALID_OPERATION)". The issue is not reproducible with Mesa
radeonsi.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46118
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-07 16:49:53 +01:00
Alex Henrie
29c9cf6429
wined3d: Fix memory leak on error path in wined3d_buffer_vk_create_buffer_object (Coverity).
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-03 14:50:29 +01:00
Conor McCarthy
586b52204e
wined3d: Also check the internal format when determining GL raw blit compatibility.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51935
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-28 17:23:24 +01:00
Andrey Gusev
b006a4c5ac
wined3d: Add WINED3DFMT_R11G11B10_FLOAT vertex format.
...
Used by Dark Souls: Remastered.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 18:33:57 +01:00
Henri Verbeet
44cb2ba942
wined3d: Release the allocator lock on error in wined3d_allocator_chunk_vk_map().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 17:57:04 +01:00
Conor McCarthy
d61c9998d9
wined3d: Do not bind buffers in state_cb() if the shader is not set.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52020
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 18:55:25 +01:00
Zebediah Figura
f69d4a865f
wined3d: Trace CS packet pointers.
...
This makes it easier to "unwind" through the CS thread when debugging.
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-12-09 21:23:24 +01:00
Jan Sikorski
87b5d91412
Revert "wined3d: Acquire references to shaders in deferred contexts.".
...
This reverts commit 908fb50728
.
Moved to wined3d_cs_packet_{in/de}cref_objects().
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-12-09 21:23:18 +01:00
Jan Sikorski
5d450c0a4b
wined3d: Acquire shader references for command lists by inspecting CS packets.
...
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-12-09 21:23:14 +01:00
Jan Sikorski
9340ed6067
Revert "wined3d: Acquire references to samplers in deferred contexts.".
...
This reverts commit 0056ebf91e
.
Sampler references in deferred contexts are now managed by inspecting CS
packets.
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-12-09 21:23:11 +01:00
Jan Sikorski
ffa37997be
wined3d: Acquire sampler references for command lists by inspecting CS packets.
...
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-12-09 21:23:05 +01:00
Henri Verbeet
2802328cf6
wined3d: Move the command list reference counting functions to the end of cs.c.
...
These are part of the public API, so there's not need for them to be at
the start of the file.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 21:23:00 +01:00
Jan Sikorski
e418b1f59d
wined3d: Use wined3d_next_cs_packet() in wined3d_cs_exec_execute_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-12-09 21:22:50 +01:00
Jan Sikorski
6ebbc4a882
wined3d: Introduce a helper function to extract a packet from a command stream.
...
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-12-09 21:22:47 +01:00
Zebediah Figura
0cd8c95e67
wined3d: Use wined3d_context_copy_bo_address() in wined3d_buffer_gl_upload_ranges().
...
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-12-09 21:22:18 +01:00
Henri Verbeet
0eb686f20d
wined3d: Pass a wined3d_device_gl pointer to wined3d_device_delete_opengl_contexts_cs().
...
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-12-09 21:22:15 +01:00
Henri Verbeet
194b47b4fd
wined3d: Use the access flags used to create the bo for persistent maps in wined3d_bo_gl_map().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Henri Verbeet
c22970af57
wined3d: Pass a wined3d_device_gl pointer to wined3d_device_create_primary_opengl_context_cs().
...
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-12-09 17:14:59 +01:00
Jan Sikorski
996728315a
wined3d: Decrement reference count and take the lock atomically for cached objects.
...
Samplers, blend states, rasterizer states and depth stencil states can
be retrieved from the cache in struct d3d_device even after the
reference count reaches zero, causing memory corruption.
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-12-09 17:14:59 +01:00
Jacek Caban
9596e7f2a4
win32u: Use user driver for wine_get_vulkan_driver.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 09:57:56 +01:00