Commit Graph

943 Commits

Author SHA1 Message Date
Zebediah Figura 334a3bbe37 wined3d: Handle WINED3D_LOCATION_DISCARDED in wined3d_buffer_get_memory().
This can't currently happen. However, we'd like to use
wined3d_buffer_get_memory() in wined3d_cs_exec_update_sub_resource(). This would
probably also help in implementing ID3D11DeviceContext1::DiscardResource().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:47 +02:00
Zebediah Figura 9c1a80f433 wined3d: Remove the now redundant "locations" parameter from wined3d_buffer_get_memory().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-22 17:57:47 +02:00
Zebediah Figura 57fc75b3ef wined3d: Check for SRV/RTV binding conflicts per wined3d_state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 22:38:46 +02:00
Zebediah Figura 4d345a78bf wined3d: Implement zero step rate for instanced attributes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 17:56:01 +01:00
Henri Verbeet e29877ee42 wined3d: Reference the SRV bo in context_load_shader_resources().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-02 19:08:04 +01:00
Henri Verbeet a0abc66566 wined3d: Reference the UAV bo in context_load_unordered_access_resources().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-02 19:08:04 +01:00
Henri Verbeet 56f1ce6be6 wined3d: Reference the stream output bo in context_load_stream_output_buffers().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-01 19:52:11 +01:00
Henri Verbeet a7c320d184 wined3d: Use command buffer IDs for synchronisation in wined3d_buffer_gl_sync_apple().
Analogous to the Vulkan adapter. This is slightly awkward in OpenGL
because it doesn't have explicit command buffers like Vulkan, but
calling wined3d_context_gl_submit_command_fence() on swapchain present
works well enough in practice. The main advantage of this approach is that it
avoids using a separate fence for each usage of each bo.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Paul Gofman 97636bc9b6 wined3d: Use partial bind counts instead of partial bind flags.
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-09-29 18:33:54 +02:00
Paul Gofman 774e4b2ea3 wined3d: Don't check for readonly depth / stencil in context_preload_texture().
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-09-24 16:43:22 +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 0a5e61595a wined3d: Move OpenGL specific context functions to context_gl.c.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:10 +02:00
Henri Verbeet 77f72dc386 wined3d: Move Vulkan specific context functions to context_vk.c.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Matteo Bruni 9a7591fab4 wined3d: Add a few traces to draw_primitive().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-02 12:57:06 +02:00
Matteo Bruni b83b897b4a wined3d: Skip loading current index buffer if the draw is not indexed.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 18:34:50 +01:00
Matteo Bruni e11ae91b9c wined3d: Store the framebuffer inline in struct wined3d_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>
2020-03-26 18:34:50 +01:00
Matteo Bruni ef66c4488f wined3d: Get rid of MAX_RENDER_TARGET_VIEWS.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-24 20:43:10 +01:00
Matteo Bruni 4ff594e885 wined3d: Don't pass the whole context to needs_srgb_write().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 16:53:04 +01:00
Zebediah Figura df569853bf wined3d: Implement dual source blending.
Based on a patch by Michael Müller.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 16:52:39 +01:00
Zebediah Figura 998d901f0d wined3d: Check the writemask for the correct render target in draw_primitive().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:30:24 +01:00
Zebediah Figura 980a060949 wined3d: Fix an accidental replacement of STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-16 21:30:18 +01:00
Zebediah Figura f396b49a92 wined3d: Move the color masks to wined3d_blend_state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 13:23:11 +01:00
Zebediah Figura 04453496a2 wined3d: Move the blend enable state to wined3d_blend_state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 17:59:24 +01:00
Zebediah Figura a6009fa21f wined3d: Move the scissor test state to wined3d_rasterizer_state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Zebediah Figura 6045fe027b wined3d: Move the cull mode to wined3d_rasterizer_state.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:52:23 +01:00
Matteo Bruni 8d87bce071 wined3d: Rename struct wined3d_map_range to struct wined3d_range.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-27 23:34:51 +01:00
Henri Verbeet 22e76d0397 wined3d: Implement mapping Vulkan buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:21:26 +01:00
Henri Verbeet dd03e37f9f wined3d: Create Vulkan buffers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-24 17:21:13 +01:00
Gabriel Ivăncescu a6606d0dae wined3d: Return FALSE rather than E_FAIL in wined3d_context_gl_create_wgl_ctx.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-03 21:40:59 +01:00
Francois Gouget 2cab6bea5e wined3d: Fix the spelling of some comments.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Paul Gofman 645eb62f70 wined3d: Create a backup context if setting the pixel format failed in wined3d_context_gl_create_wgl_ctx().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-18 22:12:38 +01:00
Paul Gofman ecad635124 wined3d: Factor out wined3d_context_gl_create_wgl() function.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-18 22:12:36 +01:00
Paul Gofman 600f39d4ad d3d11: Mind DSV flags when checking for conflicting SRV.
Fixes a regression introduced by commit 3f698b950f.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-31 17:39:13 +01:00
Paul Gofman a5551040f2 wined3d: Issue texture barrier before using a texture attached to FBO.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45978
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-27 19:12:41 +01:00
Henri Verbeet 179c8cc86f wined3d: Move the "buffer_object" field from struct wined3d_buffer_gl to struct wined3d_buffer.
We'll want to use this for Vulkan buffers as well.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Henri Verbeet c2f0ae50b4 wined3d: Use explicit flushing in wined3d_context_gl_unmap_bo_address().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:17 +02:00
Henri Verbeet 5356292ee9 wined3d: Introduce a separate structure for OpenGL sampler information.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-15 20:16:58 +02:00
Henri Verbeet 9bbe8ec590 wined3d: Get rid of a redundant NULL check in wined3d_context_gl_acquire() (Coverity).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 11:02:52 +02:00
Henri Verbeet b27f961eeb wined3d: Move the context array from struct wined3d_swapchain to struct wined3d_swapchain_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 11:02:50 +02:00
Henri Verbeet 17ce100766 wined3d: Move the backup window from struct wined3d_swapchain to struct wined3d_swapchain_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 11:02:47 +02:00
Henri Verbeet f654f983fa wined3d: Introduce a structure for Vulkan context information.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 09:02:00 +02:00
Henri Verbeet 2ddb6b66a7 wined3d: Get rid of the "dirtyArray" field from struct wined3d_context.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:56:22 +02:00
Henri Verbeet 6a66af88de wined3d: Move the "level" field from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:56:18 +02:00
Henri Verbeet 74b9ef2c1d wined3d: Move the "gl_info" field from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:56:16 +02:00
Henri Verbeet 1c41aac4a4 wined3d: Get rid of the float16 fallback in context_update_stream_info().
This is never used, since we reject creation of vertex declarations that
contain any elements with unsupported formats.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-05 18:45:03 +02:00
Henri Verbeet 337dc8a272 wined3d: Use d3d_info to determine BGRA vertex support in context_update_stream_info().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-05 18:45:01 +02:00
Henri Verbeet 157440e3d3 wined3d: Return a wined3d_context_gl structure from context_get_current().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-05 18:44:58 +02:00
Henri Verbeet 360e1a46d8 wined3d: Pass a wined3d_context_gl structure to context_set_current().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-05 18:44:55 +02:00
Henri Verbeet aaf57e761a wined3d: Pass a wined3d_context_gl structure to wined3d_shader_resource_view_gl_bind().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 08:58:55 +02:00
Henri Verbeet 64d41b3dec wined3d: Try harder to reuse the current context.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00