Henri Verbeet
052dbb427d
wined3d: Do not add the BO address offset when calling glFlushMappedBufferRange().
...
Fixes: c2f0ae50b4
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-11-24 15:33:29 +01:00
Henri Verbeet
0e501c00c4
wined3d: Respect the BO buffer offset in wined3d_context_gl_copy_bo_address().
...
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-11-24 15:33:27 +01:00
Zebediah Figura
2e67ea199c
wined3d: Allow OpenGL indirect draw buffer objects to be suballocated from a larger 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>
2021-11-22 22:20:50 +01:00
Zebediah Figura
3220ea2431
wined3d: Allow OpenGL indirect dispatch buffer objects to be suballocated from a larger 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>
2021-11-22 22:20:50 +01:00
Zebediah Figura
5c13b060ca
wined3d: Move the "buffer_offset" field to struct wined3d_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-11-22 22:20:50 +01:00
Henri Verbeet
ba5f90b29a
wined3d: Allow OpenGL atomic counter buffer objects to be suballocated from a larger 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>
2021-11-19 18:31:38 +01:00
Henri Verbeet
6c6fcff96e
wined3d: Allow OpenGL index buffer objects to be suballocated from a larger 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-11-19 18:31:38 +01:00
Henri Verbeet
a9584bf521
wined3d: Allow OpenGL vertex buffer objects to be suballocated from a larger 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-11-19 18:31:38 +01:00
Zebediah Figura
6f0d15e0e3
wined3d: Add a helper to calculate the vertex attribute address for a stream element.
...
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-11-19 18:31:38 +01:00
Zebediah Figura
f3647c4b4f
wined3d: Make the "buffer_object" field of struct wined3d_const_bo_addr a wined3d_bo pointer.
...
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-11-16 17:44:42 +01:00
Zebediah Figura
7148f3939a
wined3d: Make the "buffer_object" field of struct wined3d_bo_address a wined3d_bo pointer.
...
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-11-16 17:44:42 +01:00
Zebediah Figura
c465f339a7
wined3d: Avoid accessing the "bo" member of struct wined3d_buffer_gl.
...
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-11-10 18:56:00 +01:00
Zebediah Figura
4b22faa94e
wined3d: Introduce wined3d_context_gl_reference_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>
2021-11-10 18:55:58 +01:00
Zebediah Figura
613e163877
wined3d: Reference vertex buffer objects only after calling context_update_stream_info().
...
It may load buffers into a different location.
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-11-09 22:02:54 +01:00
Zebediah Figura
d4f8d13b09
wined3d: Move the bo_user field to struct wined3d_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>
2021-11-01 20:47:39 +01:00
Zebediah Figura
9acf66b795
wined3d: Handle NOOVERWRITE maps on persistently mapped Vulkan buffers from the client thread.
...
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-15 18:30:53 +02:00
Zebediah Figura
6e7779ace9
wined3d: Move the "map_ptr" field from struct wined3d_bo_vk to struct wined3d_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-15 18:30:49 +02:00
Zebediah Figura
2d05178b28
wined3d: Move the "coherent" field from struct wined3d_bo_gl to struct wined3d_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-15 18:30:44 +02:00
Zebediah Figura
86e4d3aa8c
wined3d: Omit GL_MAP_FLUSH_EXPLICIT_BIT for incoherent maps when ARB_MAP_BUFFER_RANGE is used.
...
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-15 18:30:38 +02:00
Zebediah Figura
c53736d12f
wined3d: Move the "memory_offset" field from struct wined3d_bo_vk to struct wined3d_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-14 09:14:15 +02:00
Zebediah Figura
59f16dd564
wined3d: Move the "users" field to a common wined3d_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-10-14 09:14:13 +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
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
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
Zebediah Figura
5ce7adaace
d3d11: Implement constant buffer offsetting for OpenGL.
...
Based on a patch by Kimmo Myllyvirta.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45198
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-19 12:21:52 +02:00
Henri Verbeet
64ab905758
wined3d: Use wined3d_mask_from_size() in find_draw_buffers_mask().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 22:48:48 +02:00
Henri Verbeet
0fd45ba2be
wined3d: Use wined3d_mask_from_size() in wined3d_context_gl_enable_clip_distances().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 22:48:48 +02:00
Henri Verbeet
3847eca099
wined3d: Use wglSetPixelFormatWINE() in wined3d_context_gl_set_pixel_format() if we can.
...
Based on a patch by Connor McAdams.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 22:57:11 +02:00
Henri Verbeet
b1c8449954
wined3d: Invalidate sRGB write state in wined3d_cs_exec_set_rendertarget_view() if needed.
...
Instead of in wined3d_context_gl_setup_target(). If the render-target view
uses an sRGB format, but the underlying resource has a typeless format, we'd
potentially miss an invalidation in wined3d_context_gl_setup_target() where we
only have access to the underlying resource.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 17:56:46 +01: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
3cc8147594
wined3d: Use glFinish() for synchronisation when cleaning up a destroyed context in wined3d_context_gl_cleanup().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50485
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-15 10:09:57 +01:00
Matteo Bruni
5031b9a994
wined3d: Rename d3d_synchronous debug channel to d3d_sync.
...
The old name exceeded the maximum size of 14 characters.
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-12-04 18:39:44 +01:00
Henri Verbeet
b2748a99fd
wined3d: Handle GL_APPLE_flush_buffer_range flushing in wined3d_context_gl_unmap_bo_address().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:36:45 +01:00
Henri Verbeet
8b3cc57df0
wined3d: Allocate a new bo for busy DISCARD maps.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:36:40 +01:00
Henri Verbeet
4c5581c2eb
wined3d: Use the "bo user" mechanism to invalidate existing bindings in wined3d_buffer_gl_destroy_buffer_object().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 16:36:36 +01:00
Henri Verbeet
d52a75a795
wined3d: Explicitly synchronise in wined3d_context_gl_map_bo_address().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-03 20:18:39 +01:00
Henri Verbeet
5a9c2f2de1
wined3d: Reference the constant buffer bo in context_gl_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
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
587174be8b
wined3d: Reference the indirect buffer bo in dispatch_compute().
...
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
a381f0cae8
wined3d: Reference the indirect buffer bo in wined3d_context_gl_draw_indirect().
...
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
20c828bdc5
wined3d: Reference the source/destination bo in wined3d_context_gl_copy_bo_address().
...
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
Matteo Bruni
77f0149a6c
wined3d: Use GL_ARB_buffer_storage if available.
...
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-11-30 21:36:10 +01:00
Matteo Bruni
90f33067da
wined3d: Introduce wined3d_context_gl_create_bo().
...
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-11-30 21:36:05 +01:00
Matteo Bruni
0638d50b22
wined3d: Introduce wined3d_context_gl_destroy_bo().
...
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-11-30 21:35:58 +01:00
Matteo Bruni
22c6334656
wined3d: Add a trace to wined3d_context_gl_bind_fbo().
...
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-11-26 23:25:24 +01:00
Matteo Bruni
7b23056c0b
wined3d: Ignore WINED3DFMT_NULL rendertarget in D/S size checks.
...
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-11-26 23:25:24 +01:00
Zebediah Figura
94becf6fc6
wined3d: Move the stencil enable state to wined3d_depth_stencil_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-09-28 17:03:58 +02:00