Matteo Bruni
e4365e5ba3
wined3d: Accept creation flags for 3D textures.
...
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-21 19:52:56 +02:00
Matteo Bruni
5b7a6d424e
wined3d: Add ARB_texture_filter_anisotropic extension.
...
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:49 +02:00
Henri Verbeet
0726d7e82f
wined3d: Fix "sysmem_count" accounting in wined3d_texture_invalidate_location().
...
Only increase it if the sub-resource wasn't already exclusively in system
memory.
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
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
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
Henri Verbeet
62ca4f3826
wined3d: Introduce context functions to map/unmap a wined3d_bo_address.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-21 10:53:53 +02:00
Henri Verbeet
d6557e8129
wined3d: Send texture dirty region updates through the command stream.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 09:46:27 +02:00
Henri Verbeet
6a307598b1
wined3d: Invalidate sub-levels in wined3d_texture_add_dirty_region().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:59:01 +02:00
Henri Verbeet
e19e15d317
wined3d: Remove WINED3D_BLT_DEPTH_FILL support from wined3d_texture_blit().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:02:02 +02:00
Henri Verbeet
aec8015c3b
wined3d: Remove WINED3D_BLT_COLOR_FILL support from wined3d_texture_blit().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-30 09:01:59 +02:00
Henri Verbeet
067f323844
wined3d: Do not return GL_COLOR_ATTACHMENT0 for the back-buffer in wined3d_texture_get_gl_buffer().
...
This should no longer be needed.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-23 17:07:59 +01:00
Henri Verbeet
0d0f3c940f
wined3d: Check for GL_FRONT before GL_BACK in wined3d_texture_get_gl_buffer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:52:04 +01:00
Henri Verbeet
ad46b67674
wined3d: Create and destroy surface DCs through the CS.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:25 +01:00
Henri Verbeet
d9d5dcee2b
wined3d: Avoid device_invalidate_state() in wined3d_texture_set_lod().
...
It's not safe to call device_invalidate_state() outside the CS.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:22 +01:00
Józef Kucia
1865352e3f
wined3d: Allow using more than MAX_COMBINED_SAMPLERS texture image units.
...
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-14 17:14:36 +01:00
Matteo Bruni
630ba97900
wined3d: Fix the TRACE in wined3d_texture_remove_buffer_object().
...
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-03-14 17:14:13 +01:00
Henri Verbeet
87192548ed
wined3d: Send blits through the command stream.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-08 15:30:27 +01:00
Henri Verbeet
54c3f5c0bc
wined3d: Validate blit parameters in wined3d_texture_blt().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-07 09:00:54 +01:00
Henri Verbeet
c51537ba9f
wined3d: Merge wined3d_texture_check_block_align() into wined3d_texture_check_box_dimensions().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-06 19:44:03 +01:00
Henri Verbeet
7b18ff5abb
wined3d: Get rid of some redundant "texture" accesses in texture_resource_sub_resource_map().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-27 09:57:35 +01:00
Henri Verbeet
e3f55717e2
wined3d: Get rid of the depth/stencil FIXME in texture_resource_sub_resource_unmap().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-24 09:36:37 +01:00
Józef Kucia
a16a4931b6
wined3d: Introduce wined3d_device_set_cs_resource_view().
...
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-22 17:25:02 +01:00
Józef Kucia
c808748bcf
wined3d: Do not read rev_tex_unit_mapping for texture units >= MAX_COMBINED_SAMPLERS.
...
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-22 17:24:51 +01:00
Henri Verbeet
8de7e5ccef
wined3d: Return a BOOL from surface_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-22 11:31:50 +01:00
Henri Verbeet
a7e5d4038c
wined3d: Handle system memory copies in wined3d_texture_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-17 20:54:06 +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
Henri Verbeet
25188eb71f
wined3d: Merge common code between texture3d_load_location() and surface_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-13 18:50:10 +01:00
Akihiro Sagawa
6cf2dc67e1
wined3d: Upload textures if NO_DIRTY_UPDATE flag is set when locking dynamic textures.
...
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-06 14:47:17 +01:00
Matteo Bruni
69006a7cc6
wined3d: If the format is not FBO attachable disable sRGB writes only.
...
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-01-30 21:38:49 +01:00
Henri Verbeet
ff85cd5f4a
wined3d: Get rid of the "AlwaysOffscreen" setting.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:42 +01:00
Francois Gouget
551705d65f
wined3d: Make some functions static.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-09 20:49:10 +01:00
Józef Kucia
a02fd72965
wined3d: Use depth/stencil formats for typeless resources only when WINED3DUSAGE_DEPTHSTENCIL is set.
...
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>
2016-12-12 19:40:33 +01:00
Henri Verbeet
1a02c676fb
wined3d: The drawable is a valid location for offscreen textures when "AlwaysOffscreen" is disabled.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-23 22:36:40 +01:00
Józef Kucia
685246b4a1
wined3d: Implement wined3d_update_sub_resource() for 3D textures.
...
Fixes a regression introduced by commit
e58689a398
.
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>
2016-11-15 13:45:37 -06:00
Józef Kucia
e0d30e8e03
wined3d: Extend wined3d_texture_upload_data() to support partial uploads.
...
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>
2016-11-15 13:45:33 -06:00
Henri Verbeet
9cfaa83e92
wined3d: Wait for the texture to become idle before modifying it in wined3d_texture_update_desc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 22:53:51 +09:00
Henri Verbeet
6fc546114b
wined3d: Wait for the resource to become idle when destroying user memory textures.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 22:53:48 +09:00
Henri Verbeet
e58689a398
wined3d: Implement the initial texture data upload on top of wined3d_device_update_sub_resource().
...
The idea is that wined3d_device_update_sub_resource() would get sent through
the command stream, while the current implementation wouldn't.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-20 22:53:34 +09:00
Nikolay Sivov
53b7a2a1a1
wined3d: Add texture flag to indicate GetDC() capability.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 23:34:25 +09:00
Henri Verbeet
8232f371d8
wined3d: Sanitise resource map flags in wined3d_resource_map().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-02 11:27:28 +09:00
Henri Verbeet
53165034ba
wined3d: Unify resource preloads.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 12:08:58 +09:00
Henri Verbeet
850d38efb4
wined3d: Synchronise texture LOD updates with the command stream.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 12:08:46 +09:00
Henri Verbeet
565cd2b84c
wined3d: Use wined3d_cs_emit_unload_resource() in wined3d_texture_update_desc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-11 12:08:39 +09:00
Henri Verbeet
29d50a21b9
wined3d: Use wined3d_texture_load_location() in wined3d_texture_get_dc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-05 09:08:46 -05:00
Henri Verbeet
3160eabf24
wined3d: Use wined3d_texture_load_location() in context_validate_onscreen_formats().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 06:08:56 -05:00
Michael Stefaniuc
0d001e3e1c
wined3d: Use SetRect() instead of open coding it.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 09:57:45 -05:00
Henri Verbeet
3b61af6306
wined3d: Introduce wined3d_texture_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:57:17 -05:00
Henri Verbeet
9b7ff40d7e
wined3d: Merge wined3d_volume_upload_data() into texture3d_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:56:15 -05:00
Henri Verbeet
61fa6ea2c5
wined3d: Use texture3d_upload_data() in texture3d_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:52:00 -05:00
Henri Verbeet
0bf35ec975
wined3d: Use texture3d_upload_data() in texture3d_srgb_transfer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:51:56 -05:00
Henri Verbeet
1cc4d8486b
wined3d: Use wined3d_texture_upload_data() in wined3d_device_update_texture_3d().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-01 05:51:52 -05:00
Henri Verbeet
d72ff80a46
wined3d: Upload only a single sub-resource in wined3d_texture_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 20:17:47 +09:00
Henri Verbeet
90cff7284a
wined3d: Pass a wined3d_const_bo_address structure to wined3d_texture_ops.texture_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 20:17:43 +09:00
Henri Verbeet
50af9acb48
wined3d: Get rid of struct wined3d_volume.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-29 20:17:41 +09:00
Henri Verbeet
2337c50ed7
wined3d: Merge wined3d_volume_load_location() into texture3d_load_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-28 21:38:12 +09:00
Henri Verbeet
cc9c18a46d
wined3d: Synchronise resource destruction with the command stream.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-08 22:35:02 +09:00
Henri Verbeet
1184237640
wined3d: Send texture destruction through the command stream.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-08 22:35:01 +09:00
Henri Verbeet
229616a5fa
wined3d: Call the sub-resource destruction callbacks in wined3d_texture_cleanup().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-08 22:35:01 +09:00
Francois Gouget
ba3509265d
wined3d: Spelling fixes.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-30 19:49:21 +09:00
Józef Kucia
4f9642d0e9
wined3d: Use immutable storage for 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>
2016-05-26 22:14:53 +09:00
Józef Kucia
1ddf2e47e2
wined3d: Use immutable storage for 2D 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>
2016-05-26 22:14:53 +09:00
Henri Verbeet
8ae3a9b624
wined3d: Introduce a helper function to allocate arrays.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 16:19:01 +09:00
Stefan Dösinger
3a72716556
wined3d: Use wined3d_texture_prepare_location() in wined3d_texture_update_desc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-18 01:06:16 +09:00
Francois Gouget
08736f5048
wined3d: Make wined3d_texture_set_dirty() static.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-17 21:01:51 +09:00
Józef Kucia
64da6b0526
wined3d: Implement creating 2D array 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>
2016-04-26 21:35:36 +09:00
Józef Kucia
64014ae3ed
wined3d: Add "layer_count" parameter to wined3d_texture_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>
2016-04-26 21:35:31 +09:00
Henri Verbeet
364701db60
wined3d: Clear the renderbuffer IDs on unload.
...
This got lost in commit feb86895b4
.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 14:47:58 +09:00
Henri Verbeet
aaca15f172
wined3d: Pass a texture and sub-resource index to wined3d_volume_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 12:22:35 +09:00
Henri Verbeet
17768e567b
wined3d: No longer make sub-resources full resources.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-22 12:22:33 +09:00
Henri Verbeet
81b2ed4f0a
wined3d: Store sub-resource parents in struct wined3d_texture_sub_resource().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 15:34:43 +09:00
Henri Verbeet
58a1796d83
wined3d: Don't enumerate sub-resources in wined3d_device_reset().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 15:34:43 +09:00
Henri Verbeet
3b96ac290d
wined3d: Allocate system memory for complete textures.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 14:09:39 +09:00
Henri Verbeet
e6780a5e05
wined3d: Evict system memory for complete textures.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 14:09:39 +09:00
Henri Verbeet
62a766f75c
wined3d: Use the texture dimensions in swapchain_blit().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 14:02:38 +09:00
Henri Verbeet
70f1d0efdc
wined3d: Use the texture dimension helpers in texture2d_prepare_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 14:02:36 +09:00
Stefan Dösinger
1462f66d5d
wined3d: Merge wined3d_surface_prepare() and wined3d_volume_prepare_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:56:17 +09:00
Henri Verbeet
9cdcc3e120
wined3d: Merge surface_unload() and volume_unload().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:56:07 +09:00
Henri Verbeet
16ff4e7cf6
wined3d: Track the map binding per-texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:56:05 +09:00
Henri Verbeet
feb86895b4
wined3d: Store renderbuffer IDs in struct wined3d_texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:56:02 +09:00
Henri Verbeet
5eedb704f1
wined3d: Check texture usage/pool in volumetexture_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:40 +09:00
Henri Verbeet
ecee205f6c
wined3d: Check texture usage/pool/flags in texture_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:37 +09:00
Henri Verbeet
4896cda6c5
wined3d: Track SFLAG_DISCARD per-texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:32 +09:00
Henri Verbeet
82a7f1ebf2
wined3d: Implement texture DC creation on top of D3DKMTCreateDCFromMemory().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:25 +09:00
Henri Verbeet
b08c430c51
wined3d: Introduce a helper function to map a wined3d_bo_address.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:18 +09:00
Henri Verbeet
1e0603eb58
wined3d: Store the power-of-two dimensions in the texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-14 13:13:43 +09:00
Henri Verbeet
9e763ab92b
wined3d: Be more strict with wined3d_texture_get_dc() calls from d3d9.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-13 23:01:06 +09:00
Henri Verbeet
c3d74913b7
wined3d: Be more lenient with wined3d_texture_get_dc() calls from ddraw.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-13 23:01:06 +09:00
Henri Verbeet
0be7f5deb1
wined3d: Use the texture dimension helpers in wined3d_texture_update_overlay().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-12 12:03:36 +09:00
Henri Verbeet
044b330ae1
wined3d: Use the texture dimension helpers in texture3d_prepare_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-12 12:03:34 +09:00
Henri Verbeet
2a2554ee59
wined3d: Store sub-resource map counts in the sub-resource structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-11 11:36:04 +09:00
Henri Verbeet
bcb1ee8244
wined3d: Don't evict mapped resources in wined3d_device_evict_managed_resources().
...
We would skip evicting the specific mapped sub-resource, but then go on
to evict the texture itself.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-11 11:35:59 +09:00
Stefan Dösinger
b284f13836
wined3d: Pass a texture and sub-resource index to wined3d_texture_ops.texture_sub_resource_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-08 12:29:37 +09:00
Stefan Dösinger
7d23c8a4d8
wined3d: Get rid of wined3d_texture_ops.texture_sub_resource_load().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 12:57:39 +09:00
Henri Verbeet
639dd9b9e3
wined3d: Return a wined3d_texture_sub_resource structure from wined3d_texture_get_sub_resource().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 12:52:33 +09:00
Stefan Dösinger
a2c5afe61e
wined3d: Introduce wined3d_texture_get_memory().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-01 12:48:41 +09:00
Stefan Dösinger
984934f685
wined3d: Introduce wined3d_texture_invalidate_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-31 10:40:07 +09:00
Stefan Dösinger
5a29cc8787
wined3d: Introduce wined3d_texture_validate_location().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:23 +09:00
Henri Verbeet
97f4034e58
wined3d: Get rid of the d3d_surface and d3d_texture debug channels.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-30 11:54:20 +09:00
Stefan Dösinger
5e27e6b5d8
wined3d: Store sub-resource locations in the sub-resource structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 10:39:31 +09:00
Matteo Bruni
0ed39ad13d
wined3d: Use ARB_texture_swizzle for color fixups when possible.
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-24 22:09:37 +09:00
Henri Verbeet
b46ef08c9c
wined3d: Introduce wined3d_texture_get_gl_buffer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-24 11:51:03 +09:00
Francois Gouget
272b8bc190
wined3d: Make wined3d_texture_force_reload() static.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 23:51:31 +09:00
Henri Verbeet
55b9724570
wined3d: Check for compressed and height scaled formats in texture_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 12:19:36 +09:00
Henri Verbeet
ab53ef0651
wined3d: Validate (2D) texture dimensions in texture_init().
...
Instead of for each surface individually.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 12:19:32 +09:00
Stefan Dösinger
a7f7532de3
wined3d: Get rid of texture_ops.texture_sub_resource_add_dirty_region().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 12:11:34 +09:00
Stefan Dösinger
2efaddc74e
wined3d: Merge wined3d_surface_update_desc() into wined3d_texture_update_desc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 10:14:54 +09:00
Stefan Dösinger
bad4849257
wined3d: Introduce wined3d_texture_use_pbo().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-15 10:14:51 +09:00
Stefan Dösinger
aeefbdffba
wined3d: Merge wined3d_surface_map() and wined3d_volume_map().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-13 15:41:53 +09:00
Stefan Dösinger
beb8986e48
wined3d: Merge wined3d_surface_unmap() and wined3d_volume_unmap().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-10 11:26:06 +09:00
Henri Verbeet
06b5114342
wined3d: Introduce helpers functions to calculate texture level dimensions.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-10 11:25:58 +09:00
Michael Stefaniuc
b3790bf803
wined3d: Use SetRect() instead of open coding it.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-09 18:39:40 +09:00
Stefan Dösinger
0771244873
wined3d: Call wined3d_surface_prepare() in surface_load_sysmem().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-08 11:11:21 +09:00
Stefan Dösinger
ecba38d5bd
wined3d: Merge surface_prepare_map_memory() into wined3d_surface_prepare().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-07 13:22:32 +09:00
Michael Stefaniuc
a29a3c8a0b
wined3d: Use SetRectEmpty() instead of open coding it.
...
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 22:29:02 +09:00
Stefan Dösinger
5141c082ca
wined3d: Merge surface_remove_pbo() and wined3d_volume_free_pbo().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:48 +09:00
Stefan Dösinger
87143e60ed
wined3d: Merge surface_prepare_buffer() and wined3d_volume_prepare_pbo().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:48 +09:00
Stefan Dösinger
45fa5b6471
wined3d: Cleanup sub-resource buffer objects in wined3d_texture_cleanup().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:48 +09:00
Henri Verbeet
fbe2737537
wined3d: Store surface/volume buffer objects in the sub-resource structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:48 +09:00
Henri Verbeet
09c862b6a2
wined3d: Avoid volume_from_resource() in texture3d_prepare_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:47 +09:00
Henri Verbeet
b309b831de
wined3d: Avoid surface_from_resource() in texture2d_prepare_texture().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:47 +09:00
Henri Verbeet
aad8f74cc8
wined3d: Avoid surface_from_resource() in wined3d_texture_update_desc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:47 +09:00
Henri Verbeet
e3e5dcd2cd
wined3d: Use a single allocation for texture sub-resource objects.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:47 +09:00
Henri Verbeet
9f51e8f77e
d3d9: Use wined3d_texture_get_sub_resource_desc() in d3d9_texture_3d_GetLevelDesc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-03 13:00:47 +09:00
Sebastian Lackner
210069d9dc
wined3d: Fix TRACE in wined3d_texture_update_desc function.
...
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>
2016-03-01 01:50:11 +09:00
Henri Verbeet
0287d75ce7
wined3d: Introduce wined3d_texture_get_sub_resource_desc().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:11 +09:00
Henri Verbeet
5c1976c43b
wined3d: Introduce wined3d_texture_set_sub_resource_parent().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 01:50:10 +09:00
Stefan Dösinger
5dac6e49d8
wined3d: Simplify FBO cleanup on resource destruction.
...
Signed-off-by: Stefan Dösinger <stefandoesinger@gmx.at>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-24 10:32:33 +09:00
Stefan Dösinger
cdefb5ccb7
wined3d: Track SFLAG_NONPOW2 per-texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-19 15:10:21 +09:00
Stefan Dösinger
58719f60d5
wined3d: Introduce wined3d_texture_check_block_align().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-18 21:05:49 +09:00
Henri Verbeet
691086eac1
wined3d: Introduce wined3d_texture_get_sub_resource_parent().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-17 13:05:57 +09:00
Stefan Dösinger
4f909e980f
wined3d: Store texture sub-resources as structures containing resource pointers.
...
The idea being that the resource pointer will eventually go away.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-17 13:05:50 +09:00
Henri Verbeet
273e4ae737
wined3d: Allocate the sub_resources array as part of the texture.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-17 13:05:48 +09:00
Henri Verbeet
9d7221b51d
wined3d: Replace WINEDDBLTFX with a new structure that only includes the used fields.
...
It's a happy coincidence that none of the surface pointers are actually used.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:37 +09:00
Henri Verbeet
05b84945d5
wined3d: Get rid of the unused _WINEDDOVERLAYFX structure.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-16 12:09:36 +09:00
Henri Verbeet
553149a049
wined3d: Ignore wined3d_sampler_desc.srgb_decode if WINED3D_SRGB_READ_WRITE_CONTROL is not set.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:28 +09:00
Henri Verbeet
6e5fa92299
ddraw: Use wined3d_texture_get_pitch() in ddraw_surface_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:28 +09:00
Henri Verbeet
a945266d25
wined3d: Use wined3d_texture_get_pitch() in texture3d_sub_resource_upload_data().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-10 13:45:28 +09:00
Stefan Dösinger
65c04ce040
wined3d: Introduce wined3d_texture_get_pitch().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-10 13:45:25 +09:00
Henri Verbeet
195d16c826
wined3d: Store custom pitches in the texture instead of the surface.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 12:19:33 +09:00
Henri Verbeet
77088e3faa
wined3d: Store the "user_memory" pointer in the texture instead of the surface.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 12:19:30 +09:00
Henri Verbeet
02008a6f2e
wined3d: Introduce wined3d_texture_update_overlay().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-09 12:19:14 +09:00
Józef Kucia
1769ea38e6
wined3d: Add support for separate sRGB formats.
...
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>
2016-02-09 00:37:25 +09:00
Henri Verbeet
ea85a1ca59
wined3d: Introduce wined3d_texture_set_overlay_position().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:25:53 +09:00
Henri Verbeet
6e30b042e1
wined3d: Introduce wined3d_texture_get_overlay_position().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-06 12:25:40 +09:00
Henri Verbeet
24b95aaff4
wined3d: Make the "texture" parameter to wined3d_texture_get_sub_resource() const.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-05 13:52:51 +09:00
Henri Verbeet
36b38b8a20
wined3d: Introduce a debug function for struct wined3d_box.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 14:41:49 +09:00
Henri Verbeet
46317e0cb1
wined3d: Merge cubetexture_init() into texture_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-04 14:41:47 +09:00
Henri Verbeet
9bdab23bf7
wined3d: Use wined3d_texture_get_dc() in device_load_logo().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-02 14:38:58 +09:00
Henri Verbeet
535873cc00
wined3d: Require non-NULL rectangles in wined3d_texture_blt().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-29 21:25:14 +09:00