Commit Graph

199 Commits

Author SHA1 Message Date
Henri Verbeet 4287054943 wined3d: Get rid of GL_APPLE_client_storage support.
Once upon a time this extention helped reduce address space usage on MacOS,
although at the cost of obscure driver bugs. These days it just seems to make
things worse.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-05 15:45:26 +01:00
Józef Kucia 7b9d06b494 wined3d: Introduce wined3d_resource_unmap().
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>
2015-11-04 14:41:37 +09:00
Józef Kucia 535b3fe029 wined3d: Introduce wined3d_resource_map().
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>
2015-11-04 14:41:37 +09:00
Riccardo Bortolato cee9409ab8 wined3d: Merge wined3d_volume_{inc, dec}ref in their respective caller.
Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 21:00:17 +09:00
Riccardo Bortolato 33bb9e9610 wined3d: Don't pass a wined3d_volume to device_volume_created callback anymore.
Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 21:00:07 +09:00
Riccardo Bortolato fca636a01c d3d9: Don't use a wined3d_volume in d3d9_volume_GetDesc.
finally removed the wind3d_volume pointer from d3d9_volume.
Also removed wined3d_volume_get_resource.

Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 20:59:58 +09:00
Riccardo Bortolato 8dd86823fd d3d9: Make use of wined3d_texture_unmap in d3d9_volume_UnlockBox.
Also removed wined3d_volume_unmap from wined3d public api.

Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 20:59:46 +09:00
Riccardo Bortolato b9cc2859fe d3d9: Make use of wined3d_texture_map in d3d9_volume_LockBox.
Also removed wined3d_volume_map from wined3d public api.

Signed-off-by: Riccardo Bortolato <rikyz619@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-08 20:59:32 +09:00
Riccardo Bortolato 9621737c8e wined3d: Pass wined3d_texture and sub_resource idx to device_volume_created callback.
Store wined3d_texture and sub_resource in d3d8_volume.
Updated the d3d8_volume_LockBox to make use of wined3d_texture_map.
Also updated d3d9, d3d11, ddraw callbacks accordingly.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
2015-10-07 21:28:52 +09:00
Riccardo Bortolato eac95d30b6 wined3d: Introduce new wined3d_texture_(un)map functions.
Initial usage in d3d11.
Also removed wined3d_volume_from_resource.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
2015-10-07 21:28:52 +09:00
Riccardo Bortolato 9eb47678de wined3d: Remove volume reference counting from public interface. 2015-09-10 20:00:32 +09:00
Riccardo Bortolato 5cba355a83 wined3d: Remove wined3d_volume_get_parent. 2015-09-10 20:00:23 +09:00
Riccardo Bortolato 02ce14b3ef wined3d: Remove wined3d_volume_preload. 2015-09-10 20:00:15 +09:00
Stefan Dösinger c8d1a70804 wined3d: Set the gl resource type in resource_init. 2015-06-08 18:51:24 +09:00
Stefan Dösinger 4451bf477a wined3d: Read format flags from the volume container. 2015-06-08 18:51:13 +09:00
Stefan Dösinger 072e1a3fb2 wined3d: Move the EXT_texture3D check to init_format_texture_info. 2015-04-24 19:08:45 +09:00
Stefan Dösinger 3c0ed9ce0a wined3d: Introduce resource-type specific format flags. 2015-04-24 19:08:35 +09:00
Stefan Dösinger 9076612e2d wined3d: Shadow format flags in the resource. 2015-04-22 23:24:41 +09:00
Henri Verbeet 52478e3809 wined3d: Bind the texture before calling wined3d_volume_upload_data() in wined3d_volume_load_location(). 2015-04-16 20:44:31 +09:00
Matteo Bruni 78ae4f66d7 wined3d: Set GL_UNPACK_ALIGNMENT to 1.
Alignment should be taken care by the surface pitch and
GL_UNPACK_ROW_LENGTH alone just fine, as long as the pitch is a
multiple of the pixel size. Client APIs respect that,
internally we need to do the same and the changes to
surface_load_texture and wined3d_volume_upload_data are there
for this reason (e.g. WINED3DFMT_R16G16_SNORM is emulated with
GL_RGB16 when NV_texture_shader isn't supported).
2015-02-20 22:53:09 +09:00
Matteo Bruni 1aa5015467 wined3d: Directly use the core version of glTex[Sub]Image3D. 2015-02-09 22:05:32 +09:00
Matteo Bruni 79a0dece8b wined3d: Use the core version of the gl*Buffer* functions. 2015-01-15 11:44:20 +01:00
Henri Verbeet ea534c9ab4 wined3d: Allow initial texture contents to be specified with wined3d_texture_create(). 2015-01-05 20:15:35 +01:00
Stefan Dösinger aad1997dff wined3d: Remove texture locations after downloading all subresources. 2014-10-23 18:48:25 +09:00
Henri Verbeet ee8a5b7dd1 wined3d: Track texture allocation per-texture. 2014-10-08 13:13:37 +02:00
Henri Verbeet 0c0a2adc71 wined3d: Handle GL texture allocation in the texture code. 2014-10-08 13:13:37 +02:00
Stefan Dösinger ee0ac3663b wined3d: Initialize the map binding in resource_init. 2014-08-26 14:46:55 +02:00
Stefan Dösinger b52214a288 wined3d: Move volume flags to volume.c. 2014-08-26 14:46:53 +02:00
Stefan Dösinger 7a1533a41c wined3d: Replace VFLAG_PBO with resource->map_binding. 2014-08-26 14:46:51 +02:00
Henri Verbeet eb24c9578c wined3d: Keep a reference to the resource in rendertarget views. 2014-08-21 12:24:21 +02:00
Henri Verbeet 64a1fde181 wined3d: Explicitly destroy the volume in texture3d_sub_resource_cleanup().
The texture always has the only reference to its subresources. This also means
we never have to set the container to NULL.
2014-08-19 14:49:30 +02:00
Stefan Dösinger 086545cdd3 wined3d: Remove wined3d_volume_set/get_priority. 2014-07-16 16:09:56 +02:00
Henri Verbeet 36dbac6cb8 wined3d: Set the volume container in volume_init(). 2013-12-06 13:14:52 +01:00
Henri Verbeet 5db26f7b45 wined3d: Pass a wined3d_resource_desc structure to volume_init(). 2013-12-06 13:14:52 +01:00
Henri Verbeet 15c1a26b55 wined3d: Create volumes inside wined3d. 2013-12-06 13:14:52 +01:00
Henri Verbeet f91eab6d3e wined3d: Merge surface_bind_and_dirtify() and volume_bind_and_dirtify() into wined3d_texture_bind_and_dirtify(). 2013-11-21 13:36:35 +01:00
Henri Verbeet 6b90248aec wined3d: Merge texture2d_bind() and texture3d_bind() into wined3d_texture_bind(). 2013-11-21 13:36:29 +01:00
Stefan Dösinger 556e3e0c76 wined3d: Use GL_APPLE_client_storage for volumes if available. 2013-09-23 20:32:36 +02:00
Stefan Dösinger 5e89689bcd wined3d: Make format conversion functions work on volumes. 2013-09-23 20:32:32 +02:00
Stefan Dösinger bb172d2a38 wined3d: Add support for converted volumes. 2013-09-23 20:32:31 +02:00
Stefan Dösinger d15042837a wined3d: Pass a correct access flag to glMapBufferARB. 2013-09-19 19:49:49 +02:00
Stefan Dösinger e9b4f154dd wined3d: Don't use volume->resource.allocatedMemory.
Depending on the location flags, the buffer or heap_memory should be
used.
2013-09-19 19:49:43 +02:00
Stefan Dösinger 2680f33015 wined3d: Check box dimensions in volume_map. 2013-09-18 15:47:00 +02:00
Stefan Dösinger ac37f7a2ac wined3d: Implement locking of block-based volume textures. 2013-09-18 15:46:56 +02:00
Stefan Dösinger 83b404879c wined3d: Mapping a mapped volume is an error. 2013-09-18 15:46:49 +02:00
Stefan Dösinger 112617f00b wined3d: Move tex_unit_map and friends into the context. 2013-09-16 13:05:58 +02:00
Henri Verbeet d1e44ff775 wined3d: Pass a resource to wined3d_resource_free_sysmem(). 2013-09-16 12:51:13 +02:00
Henri Verbeet 261246ef21 wined3d: Pass a resource to wined3d_resource_allocate_sysmem(). 2013-09-16 12:51:13 +02:00
Henri Verbeet c44012f0c1 wined3d: Get rid of the "dirty" flag to wined3d_texture_set_dirty(). 2013-09-09 22:09:57 +02:00
Henri Verbeet b5e0c5d052 wined3d: Get rid of some leftover comments referring to the GL lock. 2013-09-02 18:02:26 +02:00