Commit Graph

286 Commits

Author SHA1 Message Date
Henri Verbeet 2c109d2df1 ddraw: Move the DDSD_CAPS fixup from CreateSurface() to ddraw_surface_create_texture(). 2013-11-28 11:19:11 +01:00
Henri Verbeet 06f393dc7d ddraw: Move the DDSD_LPSURFACE fixups from CreateSurface() to ddraw_surface_create_texture(). 2013-11-28 11:19:06 +01:00
Henri Verbeet 5889f822f1 ddraw: Move the flippable validation from CreateSurface() to ddraw_surface_create_texture(). 2013-11-27 11:30:23 +01:00
Henri Verbeet 3139249a2e ddraw: Move the primary surface validation from CreateSurface() to ddraw_surface_create_texture(). 2013-11-27 11:30:22 +01:00
Henri Verbeet 2105b4493f ddraw: Create back buffers in ddraw_surface_create_texture(). 2013-11-27 11:30:20 +01:00
Henri Verbeet 559229aa10 ddraw: Move the location validation from CreateSurface() to ddraw_surface_create_texture(). 2013-11-27 11:30:18 +01:00
Henri Verbeet 4b3db52b53 wined3d: Merge the texture creation functions. 2013-11-27 11:30:15 +01:00
Henri Verbeet 995ff1d3f8 ddraw: Move the cube map validation from CreateSurface() to ddraw_surface_create_texture(). 2013-11-26 13:52:06 +01:00
Henri Verbeet f0f38d9b8d ddraw: Move the TEXTUREMANAGE validation from CreateSurface() to ddraw_surface_create_texture(). 2013-11-26 13:52:04 +01:00
Henri Verbeet 8ce73e2ad6 ddraw: Only reset the device when creating an exclusive mode front buffer in ddraw_surface_create_texture(). 2013-11-25 15:15:54 +01:00
Henri Verbeet 42f6ca821c wined3d: Set the surface container in surface_init(). 2013-11-15 12:00:32 +01:00
Henri Verbeet afc3d2ab70 wined3d: Create surfaces inside wined3d. 2013-11-15 12:00:26 +01:00
Henri Verbeet 9443c95a89 ddraw: Move the display mode related surface desc fixups from CreateSurface() to ddraw_surface_create_texture(). 2013-11-15 12:00:17 +01:00
Henri Verbeet 063a6c8d2d ddraw: Move the mipmap count fixup from CreateSurface() to ddraw_surface_create_texture(). 2013-11-15 12:00:15 +01:00
Henri Verbeet 9e44fadbfe ddraw: Set the cube map flags for the root surface in ddraw_surface_create_texture() as well. 2013-11-14 16:21:00 +01:00
Henri Verbeet 80055e1fcd ddraw: Pass the ddraw texture to ddraw_surface_init(). 2013-11-14 16:20:58 +01:00
Henri Verbeet 10411fb2a1 ddraw: Move the surface desc fixups from ddraw_surface_init() to ddraw_surface_create_texture(). 2013-11-14 16:20:56 +01:00
Henri Verbeet 45d37313b8 ddraw: Set WINED3D_SURFACE_PIN_SYSMEM directly in ddraw_surface_create_texture(). 2013-11-14 16:20:49 +01:00
Henri Verbeet 6ea9afe701 ddraw: Create textures for "standalone" surfaces. 2013-11-13 11:27:32 +01:00
Henri Verbeet 3d452ed95a ddraw: Create wined3d textures before ddraw surfaces. 2013-11-12 14:15:17 +01:00
Henri Verbeet 80dbeb9699 ddraw: Introduce a ddraw_texture structure as parent for textures. 2013-11-12 14:15:10 +01:00
Stefan Dösinger 9e0ba3eab0 ddraw: Make default pool resources dynamic.
To make DDLOCK_DISCARDCONTENTS actually do anything. The MAPPABLE flag
is now redundant.
2013-10-24 19:01:56 +02:00
Stefan Dösinger db68ffcba1 ddraw: Treat D3DTEXTUREMANAGE like TEXTUREMANAGE.
Sim City 4 uses this flag. The main problem I noticed was with
WINED3D_MAP_DISCARD handling introduced for surfaces in patches that
aren't yet in the tree, but the difference already matters for older
cards because of video memory accounting.
2013-10-23 17:02:57 +02:00
Henri Verbeet 3fb53e21fb ddraw: Don't set render target / depth stencil usage on sysmem surfaces.
Setting render target usage on a P8 surface for example would fail surface
creation, while such surfaces can't be used for actual rendering anyway. Tests
confirm that surface creation is supposed to succeed for P8 surfaces with both
DDSCAPS_SYSTEMMEMORY and DDSCAPS_3DDEVICE set.
2013-09-17 12:01:21 +02:00
Henri Verbeet df01e8d6cc ddraw: Fix render target refcount handling.
Similar to AddAttachedSurface() / DeleteAttachedSurface(), we should Release
the interface version that we stored. (And actually store the interface that
we AddRef.)
2013-09-17 12:01:18 +02:00
Stefan Dösinger f69ba15a92 ddraw/tests: Test blocked texture creation restrictions. 2013-09-06 17:25:08 +02:00
Stefan Dösinger 80638b6d2f wined3d: Enforce texturing capability format restrictions on resource creation. 2013-09-06 17:25:08 +02:00
Stefan Dösinger b88daee3bc ddraw: Create managed pool textures.
The surfaces are already in WINED3D_POOL_MANAGED.
2013-09-05 17:56:17 +02:00
Henri Verbeet 6f321ff2f9 ddraw: Don't imply WINED3DUSAGE_RENDERTARGET on primary surfaces.
If the application actually wants to do 3D rendering on the primary surface,
it should set DDSCAPS_3DDEVICE as well.
2013-09-05 13:18:23 +02:00
Henri Verbeet 4de77fa23f wined3d: Allow a custom pitch to be specified in wined3d_surface_set_mem(). 2013-06-14 11:46:20 +02:00
Henri Verbeet 86eb211159 ddraw: Rename PixelFormat_DD2WineD3D() to wined3dformat_from_ddrawformat().
For consistency with the other D3D dlls.
2013-06-07 11:58:27 +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 b23739316c wined3d: Pass a wined3d_resource_desc structure to wined3d_texture_create_cube(). 2013-06-05 17:31:39 +02:00
Henri Verbeet 9d4cbd6195 wined3d: Pass a wined3d_resource_desc structure to wined3d_texture_create_2d(). 2013-06-05 17:31:39 +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 191db92fd5 ddraw: Move the mipmap desc fixup code to ddraw_surface_create_texture() from device_parent_create_texture_surface(). 2012-10-25 11:48:19 +02:00
Henri Verbeet ddbe791d37 wined3d: Set texture_level in surface_set_texture_target() as well. 2012-10-24 11:24:22 +02:00
Henri Verbeet 9d127a4d36 wined3d: wined3d_surface_set_palette() never fails. 2012-10-09 09:59:38 +02:00
Henri Verbeet 82282db65e ddraw: Properly release the ddraw reference when the last interface is released in ddraw_surface_release_iface(). 2012-10-01 12:11:09 +02:00
Jacek Caban 4551135f7a ddraw: Use proper helpers for iface calls. 2012-08-27 19:46:03 +02:00
Henri Verbeet e5bb2e7d8b ddraw: Create texture surfaces from device_parent_create_texture_surface().
Instead of creating them in advance and hoping we can find them back later.
2012-07-13 10:29:35 -05:00
Henri Verbeet d4fa0d8de2 ddraw: Get rid of some redundant TRACE_ON invocations. 2012-07-13 10:29:25 -05:00
Henri Verbeet c722f2d31e ddraw: Merge ddraw_surface_destroy() into ddraw_surface_cleanup(). 2012-06-13 21:35:38 +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 daedd0077d ddraw: Get rid of IDirect3DDeviceImpl. 2012-04-10 16:21:25 +02:00
Henri Verbeet 9d317e632f ddraw: Properly retrieve an interface pointer in ddraw_surface7_GetPalette(). 2012-04-09 12:02:55 +02:00
Henri Verbeet 02b9988f48 ddraw: Simplify updating palette entries in d3d_texture2_Load(). 2012-04-09 12:02:51 +02:00
Henri Verbeet cf30899f1a ddraw: Version 1 devices are aggregated by the surface that created them. 2012-04-06 20:11:17 +02:00
Henri Verbeet 4f91eb3fe1 ddraw: Keep track of the ddraw version used to create a device.
This also obsoletes the "from_surface" device field.
2012-04-04 17:22:19 +02:00
Henri Verbeet ecd1c78c48 ddraw: Surface versions before 7 return E_INVALIDARG on failure in QueryInterface(). 2012-04-03 12:00:13 +02:00