Commit Graph

306 Commits

Author SHA1 Message Date
Henri Verbeet 7d83ebeed2 wined3d: Pass bind flags to wined3d_get_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet 45bf95278d wined3d: Store resource bind flags in the wined3d_resource structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:54:06 +01:00
Henri Verbeet 22b3a4f044 wined3d: Get rid of the "desc" field in struct wined3d_buffer.
Most of the information in "desc" is already stored in the wined3d_resource
structure.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:54:04 +01:00
Henri Verbeet b579afd30a wined3d: Move the "buffer_object" field from struct wined3d_buffer to struct wined3d_buffer_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 10:11:37 +01:00
Henri Verbeet fc9c8e4758 wined3d: Move the "buffer_object_usage" field from struct wined3d_buffer to struct wined3d_buffer_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00
Henri Verbeet 12b5c91485 wined3d: Move the "buffer_type_hint" field from struct wined3d_buffer to struct wined3d_buffer_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00
Henri Verbeet 15962381e2 wined3d: Introduce a separate structure for OpenGL buffer information.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 21:18:27 +02:00
Henri Verbeet 944e92ba06 wined3d: Pass the wined3d_buffer_desc structure directly to buffer_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:37 +02:00
Henri Verbeet 1ae45f47cd wined3d: Get rid of the "format_id" parameter to buffer_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 13:55:35 +02:00
Matteo Bruni 097c4b135b wined3d: Dump buffer descriptor in wined3d_buffer_create().
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-10-13 00:30:51 +02:00
Henri Verbeet ccbee769a4 wined3d: Get rid of the "attribute_size" field in struct wined3d_format.
Note that "byte_count" is 4 for R10G10B10X2_UINT/R10G10B10X2_SNORM, while
"attribute_size" is 6. I think 4 is correct.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 12:31:38 +02:00
Józef Kucia eec2f1db5d wined3d: Try to avoid allocating sysmem for GPU buffers with initial data.
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-09-07 18:18:55 +02:00
Józef Kucia 3cd28caf17 wined3d: Fix initial data for non-GPU buffers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44655
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-09-07 18:18:51 +02:00
Józef Kucia 9320424105 wined3d: Pass wined3d_adapter to wined3d_get_format().
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:29 +02:00
Henri Verbeet 8a321bba69 wined3d: Clarify a TRACE in buffer_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:16:00 +02:00
Józef Kucia bb535b1a2d wined3d: Call wined3d_cs_emit_update_sub_resource() directly in buffer_init().
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-06-20 16:02:42 +02:00
Józef Kucia 537007525a wined3d: Use WINED3D_LOCATION_DISCARDED before initializing buffers with data.
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-06-20 16:02:40 +02:00
Pablo Martin b7d21a669d wined3d: Add unimplemented flags parameter to wined3d_device_update_sub_resource.
Signed-off-by: Pablo Martin <pmart-wine@riseup.net>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-23 17:33:01 +02:00
Józef Kucia 409f32ffa3 wined3d: Do not allocate system memory for resources by default.
Avoids allocating system memory for depth/stencil and 3D textures.

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-10 18:10:49 +02:00
Henri Verbeet 70f017ac4d wined3d: Get rid of the "StrictDrawOrdering" setting.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-22 11:41:50 +01:00
Henri Verbeet acc0f49aae wined3d: Introduce separate read and write resource map flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-19 13:43:52 +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 96432c4cc2 d3d9: Use wined3d_buffer_create() in d3d9_device_prepare_vertex_buffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-09 09:19:12 +01:00
Henri Verbeet f181da61a0 d3d9: Use wined3d_buffer_create() in d3d9_device_prepare_index_buffer().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-07 10:05:42 +01:00
Henri Verbeet c0f92bd318 wined3d: Implement wined3d_buffer_create_ib() on top of wined3d_buffer_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:00:07 +01:00
Henri Verbeet 1377e7a608 wined3d: Implement wined3d_buffer_create_vb() on top of wined3d_buffer_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:00:07 +01:00
Henri Verbeet 8623bd3b6b wined3d: Replace the CPU access flags in struct wined3d_buffer_desc with resource access flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-05 10:00:07 +01:00
Henri Verbeet 9275b06cc0 wined3d: Replace the pool in struct wined3d_resource_desc with resource access flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-02 18:36:45 +01:00
Henri Verbeet c26c9badc4 wined3d: Use the resource access flags in buffer_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-30 20:42:06 +01:00
Henri Verbeet 2abf1dd323 wined3d: Get rid of WINED3D_POOL_SCRATCH.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-29 20:29:00 +01: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 5d71c48cb3 wined3d: Factor out context_copy_bo_address() function.
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:49 +09:00
Józef Kucia c45b908abc wined3d: Introduce wined3d fence objects.
Use fences for the APPLESYNC codepath, and implement event queries
on top of fences.

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-07-10 20:51:10 +02:00
Józef Kucia 11c902ebc7 wined3d: Clean up buffer_sync_apple().
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-07-10 20:51:10 +02:00
Józef Kucia 0edb71a35f wined3d: Avoid creating event queries manually.
Fixes a regression introduced by commit
be20ddc38b.

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-07-10 20:51:10 +02:00
Józef Kucia be20ddc38b wined3d: Introduce query operation to destroy queries.
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-30 11:03:55 +02:00
Henri Verbeet cb77e188d1 wined3d: Validate constant buffer alignment.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:45 +02:00
Henri Verbeet 3311ea9859 wined3d: Use context_map_bo_address() in wined3d_buffer_copy().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 10:53:55 +02:00
Henri Verbeet 49da36a501 wined3d: Introduce a context function to bind a buffer object.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-20 09:51:32 +02:00
Józef Kucia 3ca84a348e wined3d: Pause transform feedback between draw calls.
In order to avoid recording vertices generated by other operations, e.g.
blits.

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-03-30 22:06:31 +02:00
Józef Kucia 2e3300fa59 wined3d: Enable transform feedback if geometry shader with stream output is active.
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-03-30 22:06:31 +02:00
Henri Verbeet cd4223b0a4 wined3d: Only drop WINED3D_MAP_DISCARD right before mapping the buffer object in wined3d_buffer_map().
Dropping WINED3D_MAP_DISCARD too early means we go through the system memory
path unnecessarily. Worse, as mentioned in an earlier comment, Darkstar One
depends on the entire buffer being uploaded in case of WINED3D_MAP_DISCARD
maps, and dropping the flag too early prevents that as well. This fixes a
regression introduced by commit 15d53761a5.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:01:47 +02:00
Józef Kucia 96570c5216 wined3d: Bind transform feedback buffers.
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-03-29 20:54:05 +02:00
Józef Kucia 3d459c6152 wined3d: Handle stream output buffer bind flag.
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-03-23 15:14:26 +01:00
Józef Kucia 36b9bc946b wined3d: Introduce helper function to reserve memory for arrays.
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-02-28 20:40:02 +01:00
Józef Kucia d867c6aa1e wined3d: Pass structure byte stride to wined3d_buffer_create().
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-02-23 20:13:07 +01:00
Henri Verbeet 4aea36184d wined3d: Validate WINED3D_LOCATION_BUFFER on WINED3D_MAP_DISCARD buffer maps.
Usually when doing a WINED3D_MAP_DISCARD map on a buffer with a buffer object
WINED3D_LOCATION_BUFFER will already be current. However, if the previous map
on that buffer loaded WINED3D_LOCATION_SYSMEM, that's not necessarily true.
This also brings the code further in line with the corresponding code for
textures.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-23 08:55:47 +01:00
Sebastian Lackner d3c11f507f wined3d: Remove duplicate assignment of NULL to map_ptr in wined3d_buffer_map.
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-02-17 20:54:05 +01:00
Henri Verbeet 9e2498f25e wined3d: Send sampler GL initialisation through the command stream.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-16 08:30:56 +01:00
Henri Verbeet 2641c5c28f wined3d: Pass a texture and sub-resource index to context_acquire().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-15 16:16:20 +01:00