Commit Graph

134 Commits

Author SHA1 Message Date
Henri Verbeet 035d9792ad d3d8: Translate E_INVALIDARG to D3DERR_INVALIDCALL in d3d8_surface_LockRect().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 19:04:03 +01:00
Henri Verbeet 7cba915710 wined3d: Pass correct bind flags to texture creation functions.
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 8a1a94cd20 d3d8: Explicitly translate resource map flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-16 14:25:01 +01:00
Henri Verbeet 4b08687757 d3d8: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 09:42:06 +01:00
Henri Verbeet 916c13c6c1 wined3d: Replace the pool in struct wined3d_sub_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:42 +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
Henri Verbeet df6120274d wined3d: Introduce a helper function to assign wined3d_box values.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-07 11:37:28 +02:00
Józef Kucia 2b921fed4b d3d8: Do not decrease swapchain surface refcount when it is already 0.
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-13 18:50:12 +01:00
Józef Kucia 8f8c2a8ade d3d8: Return D3D_OK from UnlockRect() for not locked 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>
2017-01-13 16:27:42 +01:00
Józef Kucia 62f43eeb02 d3d8: Do not create render target view while surface refcount is equal to 0.
This fixes a regression introduced by commit
b005ad6f90.

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-01-06 16:29:11 +01:00
Józef Kucia 176e60074b d3d8: Reject render target surfaces created for other devices.
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-01-03 16:18:44 +01:00
Henri Verbeet 9a6ee515ed d3d8: Use wined3d_texture_get_sub_resource_desc() in d3d8_surface_GetDesc().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-01 12:06:29 +09:00
Stefan Dösinger a2d3b3a5a5 d3d8: Don't validate 2D texture lock coordinates.
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-01-20 21:18:07 +09:00
Józef Kucia b8dc15da58 d3d8: Use wined3d_resource_{map, unmap}() instead of wined3d_texture_{map, 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-05 22:02:17 +09:00
Riccardo Bortolato c43b290fa5 d3d8: Use wined3d_rendertarget_view_create_from_sub_resource() in d3d8_surface_get_rendertarget_view().
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-28 22:31:28 +09:00
Riccardo Bortolato 6241ce5637 wined3d: Introduce a new wined3d_texture_blt function.
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-20 00:30:38 +09:00
Riccardo Bortolato 7fc43d3c09 d3d8: Use wined3d_rendertarget_view_create instead of wined3d_rendertarget_view_create_from_surface in d3d8_surface_get_rendertarget_view.
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-15 19:19:39 +09:00
Riccardo Bortolato 2a51e695a1 d3d8: Replace surface refcounting with parent texture refcounting.
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-13 22:23:32 +09:00
Riccardo Bortolato ea51e1f107 d3d8: Don't use a wined3d_surface in d3d8_surface_GetDesc.
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-12 23:34:56 +09:00
Riccardo Bortolato 2f1b6114da d3d8: Use wined3d_texture_unmap instead of wined3d_surface_unmap in d3d8_surface_UnlockRect.
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-12 23:34:56 +09:00
Riccardo Bortolato 9c00f968d6 d3d8: Make use of wined3d_texture_map in d3d8_surface_LockRect.
Pass wined3d_texture and sub_resource idx to device_parent_surface_created callback.
Store wined3d_texture and sub_resource in d3d8_surface.
Also updated d3d9, d3d11, ddraw callbacks accordingly.

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-12 23:34:56 +09:00
Riccardo Bortolato 1d1487105d wined3d: Pass a wined3d_box to wined3d_surface_map..
Introduced a new surface_check_block_align function that accepts a
wined3d_box, eventually the old _rect version will be completely
replaced.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
2015-10-07 21:28:51 +09:00
Andrey Gusev f0c52fe0f5 d3d8: TRACE fixes. 2015-09-18 14:57:35 +02:00
Henri Verbeet b005ad6f90 wined3d: Use rendertarget views for color output instead of surfaces. 2014-08-21 12:24:42 +02:00
Henri Verbeet 599f018c81 d3d8: The "forwardReference" field in struct d3d8_surface is always a texture, if set. 2014-08-15 17:04:13 +02:00
Stefan Dösinger 9a795c528f d3d8: Use the private store api for surfaces. 2014-03-21 17:36:30 +01:00
Stefan Dösinger 97b5525888 d3d8: Introduce a resource structure. 2014-03-21 17:36:17 +01:00
Henri Verbeet afc3d2ab70 wined3d: Create surfaces inside wined3d. 2013-11-15 12:00:26 +01:00
Henri Verbeet b83a0b9d3e d3d8: Clear pBits and Pitch when d3d8_surface_LockRect() fails.
This is a only slightly modified version of a patch by Lasse Rasinen.
2013-11-12 14:15:01 +01:00
Henri Verbeet 7475944454 d3d8: Don't mask out internal wined3d usage flags in surface_init(). 2013-10-02 11:05:37 +02:00
Henri Verbeet d6bc4fe71a wined3d: Allow surface flags to be passed to texture creation functions. 2013-06-06 11:47:19 +02:00
Henri Verbeet ce912d5149 wined3d: Get rid of the surface_type parameter to wined3d_surface_create(). 2013-01-17 12:21:55 +01:00
Henri Verbeet ddbe791d37 wined3d: Set texture_level in surface_set_texture_target() as well. 2012-10-24 11:24:22 +02:00
Jacek Caban 1524cc2ab7 d3d8: Use proper helpers for iface calls. 2012-08-27 19:45:59 +02:00
Henri Verbeet ec466ff3b7 d3d8: Get rid of IDirect3DSurface8Impl. 2012-05-23 18:24:57 +02:00
Henri Verbeet 9b085a9260 d3d8: Get rid of IDirect3DDevice8Impl. 2012-05-21 21:31:10 +02:00
Henri Verbeet 83761d20a8 d3d8: Get rid of IDirect3DBaseTexture8Impl. 2012-04-19 12:01:47 +02:00
Henri Verbeet 8cef8b3587 wined3d: Unify the wined3d_mapped_rect and wined3d_mapped_box structures. 2012-04-13 10:48:51 +02:00
Henri Verbeet 30c3e84ee5 d3d8: Don't return a pointer to the implementation in IDirect3DSurface8Impl_QueryInterface(). 2012-03-26 18:15:05 +02:00
Henri Verbeet 3769afa33d wined3d: Get rid of the WINED3DSURFTYPE typedef. 2012-01-20 13:31:33 +01:00
Henri Verbeet e53a277305 wined3d: Get rid of the WINED3DPOOL typedef. 2012-01-18 12:37:38 +01:00
Henri Verbeet ef9be113e2 d3d8: Don't expose wined3d internal flags to the application. 2012-01-11 17:47:13 +01:00
Henri Verbeet eafebc0491 wined3d: Get rid of the WINED3DLOCKED_RECT typedef. 2011-12-06 15:50:58 +01:00
Henri Verbeet 3430e11605 wined3d: Add a flags parameter to wined3d_surface_create(). 2011-11-30 11:50:48 +01:00
Michael Stefaniuc 99f770e4ef d3d8: Remove pointless casts to the type of the casted expression. 2011-09-15 19:13:15 +02:00
Michael Stefaniuc d615be8eea d3d8: COM cleanup for the IDirect3DSurface8 iface. 2011-07-05 13:47:30 +02:00
Michael Stefaniuc cce8294f39 d3d8: Use unsafe_impl_from_IDirect3DSurface8 for app provided ifaces. 2011-07-05 13:47:26 +02:00
Henri Verbeet f6bfdd47c9 d3d8: Implement IDirect3DSurface8 private data handling on top of wined3d_resource. 2011-06-22 11:25:22 +02:00
Henri Verbeet 8d4ca1f815 wined3d: Remove COM from the device implementation. 2011-05-17 10:06:18 +02:00
Henri Verbeet 00a5f38595 wined3d: Remove object creation methods from the IWineD3DDevice interface. 2011-05-11 14:56:48 +02:00