Commit Graph

167 Commits

Author SHA1 Message Date
Józef Kucia 619c54f49a wined3d: Add max_rt_count field to d3d_info.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 17:34:40 +02:00
Józef Kucia 95a051b333 wined3d: Store max point size in d3d_info.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-23 20:12:33 +02:00
Henri Verbeet 7591c8b6e4 wined3d: Trace command stream opcodes.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-16 11:07:37 +02:00
Zebediah Figura 19f2c4473b d3d11: Implement depth clip control.
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>
2018-05-21 10:51:29 +02:00
Nikolay Sivov 23ea779d8f wined3d: Add new functions to set and get maximum frame latency for the device.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-30 20:41:59 +02:00
Józef Kucia 16517e4eea wined3d: Implement copying for 1D textures.
1D textures are handled by raw and CPU blitter.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-27 16:33:28 +02:00
Matteo Bruni df99c9b9f4 wined3d: Don't attach render targets on clears when unnecessary.
Otherwise we'd limit the cleared area to the size of the render target.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-27 16:32:00 +02:00
Józef Kucia 68e92f31c5 wined3d: Remove redundant size checks before memcpy().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-25 15:49:19 +02:00
Józef Kucia ca8e05154e wined3d: Add support for stream output with vertex shaders.
In Direct3D, a stream-output geometry shader can be created from a
vertex shader bytecode. We generate a pass-through geometry shader in
this case. Pass-through geometry shaders are helpful because they can
easily split outputs when rasterization is disabed. We could also add
another codepath in order to avoid geometry shaders when possible.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 00:25:15 +02:00
Nikolay Sivov 409497ee84 wined3d: Add support for setting multiple scissor rectangles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-24 00:25:15 +02:00
Nikolay Sivov 853f6538e4 wined3d: Add support for setting multiple viewports.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 20:42:56 +02:00
Matteo Bruni c830b0706b wined3d: Limit clears to the size of the framebuffer.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-29 16:06:04 +02:00
Józef Kucia 82ffc5b78d wined3d: Avoid superfluous wglSwapIntervalEXT() calls.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-23 16:23:21 +01:00
Józef Kucia 81459fb8a2 wined3d: Remove swap interval from swapchain description.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 18:14:55 +01:00
Józef Kucia 6aeb444e4c wined3d: Implement updating swap interval through wined3d_swapchain_present().
Based on a patch by Michael Müller.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 18:14:52 +01:00
Henri Verbeet 17c7f8e3c3 wined3d: Allow wined3d_texture_upload_data() to upload to WINED3D_LOCATION_TEXTURE_SRGB.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-20 12:59:00 +01:00
Henri Verbeet 8647966e9f wined3d: Pass independent source and destination coordinates to wined3d_texture_upload_data().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-20 12:58:58 +01:00
Henri Verbeet 37c516c957 wined3d: Pass a format to wined3d_texture_upload_data().
The goal here is to eventually get rid of wined3d_surface_upload_data().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-20 12:58:55 +01:00
Henri Verbeet b7ed6b9b8e wined3d: Get rid of the "container" field from struct wined3d_surface.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-14 15:27:59 +01:00
Henri Verbeet 991b1b77c8 wined3d: Pass a texture and sub-resource index to wined3d_surface_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 13:28:27 +01:00
Henri Verbeet 433ac881dd wined3d: Pass boxes instead of rectangles to wined3d_surface_blt().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-07 08:48:27 -06:00
Józef Kucia 1075b4615b wined3d: Limit number of supported render targets to 8.
Virtually all relatively modern GPUs support 8 render targets.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-26 16:40:23 +01:00
Henri Verbeet f08342f573 wined3d: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:06:58 +01:00
Henri Verbeet eb83a7c993 wined3d: Get rid of wined3d_get_draw_rect().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-09 09:19:15 +01:00
Józef Kucia 350a757e37 wined3d: Introduce blend state object.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 21:07:12 +01:00
Józef Kucia 0735c53138 wined3d: Simplify code paths in wined3d_cs_exec_update_sub_resource().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:07 +01:00
Matteo Bruni 5fb50c9a1c wined3d: Detect depth bias scale value per format.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-06 17:00:50 +01:00
Matteo Bruni 0daea6d2a0 wined3d: Implement manual mipmap generation.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-05 20:30:05 +01:00
Henri Verbeet ac689f0ac9 wined3d: Use raw blits in wined3d_device_copy_resource().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-15 23:35:04 +01:00
Józef Kucia f4aa2911a6 wined3d: Implement indirect draws.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 12:08:17 +01:00
Józef Kucia c736181da4 wined3d: Factor out acquire_graphics_pipeline_resources().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 12:08:09 +01:00
Matteo Bruni aac99bf2ce wined3d: Always initialize fx field in struct wined3d_cs_blt_sub_resource (Valgrind).
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 09:22:47 +02:00
Matteo Bruni 6ee7f90746 wined3d: Copy the module handle to a local variable in wined3d_cs_run().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 18:42:55 +02:00
Matteo Bruni cc8e873720 wined3d: Get rid of most of the redundant query flushes.
This way we avoid queueing up CS packets on each
wined3d_query_get_data() call, which has been seen in some degenerate
cases to starve other client threads that are trying to submit actual
work into the CS (sort-of a livelock).

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-11 18:42:35 +02:00
Józef Kucia b202586ee9 wined3d: Avoid potential NULL pointer dereference (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-31 18:55:11 +02:00
Stefan Dösinger 55eee0b9f1 wined3d: Do not call queue_is_empty in wined3d_cs_mt_finish.
Without an explicit volatile, aarch64 gcc will copy queue->tail into a
register outside the loop and then continuously compare two registers
against each other. The *(volatile LONG *)& forces gcc to re-read the
memory every iteration. Therefore, queue_is_empty as it is written will
only work from the CS thread.

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>
2017-08-28 14:38:17 +02:00
Stefan Dösinger 183ca56e11 wined3d: Avoid writing queue->head in the CS thread.
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>
2017-08-28 14:38:15 +02:00
Józef Kucia 2f66f1288f wined3d: Implement indirect compute dispatch.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-16 11:06:07 +09:00
Józef Kucia 2100e140ca wined3d: Change wined3d_buffer_copy() return type to void.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:02:03 +09:00
Józef Kucia e7f1559a8d wined3d: Add support for initial UAV counters values.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:02:01 +09:00
Józef Kucia 24c39103be wined3d: Implement copying UAV counters.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:01:54 +09:00
Henri Verbeet 6a5c372541 wined3d: Only flush valid contexts in wined3d_cs_exec_flush().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 20:19:50 +02:00
Henri Verbeet e0e4f9bbcd wined3d: Use WINED3D_CS_QUEUE_MAP for WINED3D_CS_OP_UPDATE_SUB_RESOURCE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:55:07 +02:00
Henri Verbeet 22bdde479f wined3d: Introduce a separate CS queue for resource maps.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:08 +02:00
Józef Kucia c675bf4e82 wined3d: Add support for patch list primitive type.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-19 14:01:35 +02:00
Józef Kucia f4a34acf17 wined3d: Implement clearing buffer unordered access views.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-12 16:11:24 +02:00
Sebastian Lackner 564170cbd0 wined3d: Shutdown CS thread before deallocating resources.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-11 10:17:48 -05:00
Henri Verbeet 73170152dc wined3d: Allow the command stream thread to run asynchronously.
For a modest performance improvement in CPU-limited scenarios, especially ones
where a significant amount of time is spent in the graphics driver. There's
certainly still more room for improvement, resource maps in particular will
currently cause stalls.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 15:38:48 +02:00
Sebastian Lackner 20adccf866 wined3d: Release resources on error in wined3d_cs_exec_blt_sub_resource.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-20 18:58:43 +02:00
Henri Verbeet b5d225e452 wined3d: Avoid unmapping the module while the CS thread is still running.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-20 09:51:25 +02:00