Commit Graph

401 Commits

Author SHA1 Message Date
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 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
Henri Verbeet dbdde3bd4b ddraw: Take surface usage into account when checking format capabilities in CreateSurface(). 2013-09-16 12:51:13 +02:00
Stefan Dösinger f69ba15a92 ddraw/tests: Test blocked texture creation restrictions. 2013-09-06 17:25:08 +02:00
Stefan Dösinger b464067313 ddraw: Create a sysmem surface if the format is not supported. 2013-09-06 17:25:08 +02:00
Henri Verbeet 4735690dc2 ddraw: Introduce a helper function for initializing a D3DDEVICEDESC structure from a D3DDEVICEDESC7 structure. 2013-09-06 12:00:22 +02:00
Stefan Dösinger 8da09ba196 ddraw/tests: Test DDCAPS2_TEXTUREMANAGE compatibility, with other flags. 2013-09-05 17:56:06 +02:00
Stefan Dösinger 769dd6d158 ddraw: Gracefully handle recursive SetCooperativeLevel calls. 2013-09-02 18:07:14 +02:00
Henri Verbeet 43ecaf29c3 wined3d: Get rid of the DDRAW_PITCH_ALIGNMENT and D3D8_PITCH_ALIGNMENT constants. 2013-08-29 19:56:17 +02:00
Stefan Dösinger ac871305f8 wined3d: Store the mipmap level in the volume. 2013-08-22 20:15:18 +02:00
Francois Gouget 3cefe77667 ddraw: Remove WINAPI on static functions where not needed. 2013-06-10 11:49:43 +02:00
Henri Verbeet 29c43e2efc ddraw: Rename PixelFormat_WineD3DtoDD() to ddrawformat_from_wined3dformat(). 2013-06-07 11:58:29 +02:00
Henri Verbeet d6bc4fe71a wined3d: Allow surface flags to be passed to texture creation functions. 2013-06-06 11:47:19 +02:00
Stefan Dösinger 410151ca6a ddraw: Update the SetCooperativeLevel comment. 2013-06-06 10:45:44 +02:00
Stefan Dösinger 4e51195e0b ddraw: Restore resolution on EXCLUSIVE->NORMAL switch. 2013-06-06 10:45:38 +02:00
Stefan Dösinger 6560135c64 ddraw: Update the focus window after recreating the swapchain. 2013-06-06 10:45:34 +02:00
Henri Verbeet 13a38e8d5e wined3d: Pass a wined3d_resource_desc structure to device_parent_create_swapchain_surface(). 2013-06-04 10:14:28 +02:00
Henri Verbeet a4d2660c9b wined3d: Pass a wined3d_resource_desc structure to device_parent_create_texture_surface(). 2013-06-04 10:14:26 +02:00
Henri Verbeet e4816996c3 ddraw: Handle the "DirectDrawRenderer" registry key in wined3d. 2013-05-30 10:57:08 +02:00
Henri Verbeet b886d06737 ddraw: Replace the various BOOLs in struct ddraw with a flags field. 2013-05-30 10:56:51 +02:00
Stefan Dösinger 9287bb80dc d3d: d3d9ex does not do video memory accounting for D3DPOOL_DEFAULT resources. 2013-05-20 19:08:28 +02:00
Alexandre Julliard 74f496d9bb ddraw: De-duplicate display modes even when returning the refresh rate. 2013-04-09 21:27:57 +02:00
Henri Verbeet 1249976eb6 wined3d: Get rid of the surface_type parameter to wined3d_check_device_format(). 2013-01-17 12:22:01 +01: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 31e8976910 wined3d: Get rid of the surface_type parameter to wined3d_swapchain_create(). 2013-01-16 12:22:57 +01:00
Henri Verbeet 56b256cb77 ddraw: Update DefaultSurfaceType if we had to fallback to a wined3d object without 3D support. 2013-01-16 12:22:48 +01:00
Henri Verbeet a7f4ac283b ddraw: Get rid of the local "window" variable in ddraw7_SetCooperativeLevel().
Having both a "hwnd" and a "window" here doesn't exactly make things much
easier to follow.
2013-01-15 12:13:08 +01:00
Henri Verbeet 292522c4ad ddraw: Only modify the ddraw destination window at the end of ddraw7_SetCooperativeLevel().
We want this to happen after ddraw_destroy_swapchain() in particular, because
dest_window being different from d3d_window will cause it to destroy
d3d_window, but this seems like a good idea in general.
2013-01-15 12:13:04 +01:00
Henri Verbeet 7595a58085 ddraw: Explicitly create a wined3d object without 3D capabilities when creating a normal wined3d object fails. 2013-01-14 11:01:53 +01:00
Henri Verbeet 6ba9f27c16 ddraw: Cleanup ddraw7_QueryInterface() a bit. 2013-01-08 12:49:06 +01:00
Henri Verbeet da817d8e91 ddraw: Get rid of some redundant code in IDirect3DImpl_GetCaps().
dwTextureBlendCaps is overwritten later, and (potentially) uninitialized here.
2013-01-07 11:12:28 +01:00
Henri Verbeet fb37ac56d9 ddraw: Avoid LPDDSURFACEDESC2. 2012-12-07 10:35:36 +01:00
Andrew Talbot 9c3722ec40 ddraw: Remove unused variable. 2012-11-21 13:24:47 +01:00
Henri Verbeet 79f0b4d977 d3d9: Avoid resetting device state for d3d9ex resets. 2012-11-20 11:44:27 +01:00
Henri Verbeet 2bf46c60fb wined3d: Replace the face and level parameters to device_parent_create_texture_surface() with the sub-resource index. 2012-10-25 11:48:25 +02: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 698ff9ba4e ddraw: When restoring the display mode, use the mode set before the first mode change on any ddraw object. 2012-10-17 11:45:20 +02:00
Henri Verbeet bc3d767fda ddraw: Only restore the display mode if we changed it. 2012-10-17 11:45:14 +02:00
Henri Verbeet 40d3a34004 ddraw: Prevent mode changes when a different ddraw object is in exclusive mode. 2012-10-17 11:45:08 +02:00
Henri Verbeet 1fab14af9e ddraw: Just implement ddraw7_RestoreDisplayMode() on top of wined3d_set_adapter_display_mode(). 2012-10-16 11:37:10 +02:00
Henri Verbeet 4a5ed44d79 ddraw: Get rid of some fallback code in CreateSurface(). 2012-10-16 11:36:55 +02:00
Henri Verbeet 8e24dbb60a wined3d: wined3d_stateblock_apply() never fails. 2012-10-08 11:28:37 +02:00
Henri Verbeet b69545c7da wined3d: wined3d_stateblock_capture() never fails. 2012-10-08 11:28:32 +02:00
Henri Verbeet adddf10cd8 wined3d: wined3d_swapchain_get_desc() never fails. 2012-10-04 14:09:55 +02:00
Henri Verbeet 50c61959eb wined3d: Just return the surface from wined3d_device_get_surface_from_dc(). 2012-10-03 11:19:41 +02:00
Henri Verbeet 95b4207c7f wined3d: Just return the surface from wined3d_device_get_depth_stencil(). 2012-10-01 12:11:02 +02:00
Henri Verbeet 972217fd6a wined3d: Just return the surface from wined3d_device_get_render_target(). 2012-10-01 12:10:55 +02:00