Commit Graph

472 Commits

Author SHA1 Message Date
Henri Verbeet ddddc60eb9 ddraw: Avoid enumerating display modes for formats that arent't supported anyway.
Some of these formats can't even be translated by ddraw.
2009-12-10 11:54:22 +01:00
Henri Verbeet 55f3c576d9 wined3d: Remove the effetively unused "state" field from the device. 2009-11-18 11:16:54 +01:00
Markus Stockhausen f222a1654e ddraw: Avoid memory overwrite in GetDeviceIdentifier(). 2009-10-30 16:32:53 +01:00
Markus Stockhausen dbb29993db ddraw: Set dwBackBufferCount=0 in CreateSurface for backbuffer. 2009-09-29 16:06:47 +02:00
Henri Verbeet 47c84f4f7f wined3d: Use the DXGI naming convention for all formats. 2009-09-25 15:15:44 +02:00
Henri Verbeet 66a7236590 wined3d: Don't free D3D vertex declarations until the wined3d vertex declaration is destroyed. 2009-09-23 12:36:28 +02:00
Henri Verbeet 93b0600829 wined3d: Don't free D3D buffers until the wined3d buffer is destroyed. 2009-09-18 08:55:25 -05:00
Henri Verbeet a8e8f763bf wined3d: Don't free D3D textures until the wined3d texture is destroyed. 2009-09-18 08:54:34 -05:00
Henri Verbeet de3bd86fb6 wined3d: Don't free D3D cube textures until the wined3d cube texture is destroyed. 2009-09-17 10:09:44 -05:00
Henri Verbeet a5214c306f wined3d: Don't free D3D surfaces until the wined3d surface is destroyed.
This prevents for example a d3d9 depth stencil from being destroyed when it
has no external references but is still in use by the device/stateblock. A
nice side effect is that it simplifies handling of "implicit" surfaces like
the frontbuffer and backbuffers, as well as the forwarding of reference counts
for surfaces that are part of a texture.
2009-09-16 13:04:32 -05:00
Henri Verbeet ee60e5fd71 ddraw: Remove trailing spaces. 2009-09-01 14:06:03 +02:00
Henri Verbeet 88162fabb8 wined3d: Get rid of the pointers in WINED3DSURFACE_DESC. 2009-06-15 13:42:29 +02:00
Henri Verbeet 4bc6b376e0 wined3d: Remove the useless "resource_type" parameter from IWineD3DDevice::CreateSurface(). 2009-06-12 17:33:15 +02:00
Henri Verbeet 6f33b97c94 wined3d: Get rid of the shared_handle parameter.
I don't expect us to support this in the near future, and right now it's just
dead code.
2009-04-23 14:22:06 +02:00
Henri Verbeet 0048a0373b d3d10core: Keep a reference to the wined3d device in the d3d10 device. 2009-02-23 12:20:29 +01:00
Henri Verbeet 8cefc47d81 wined3d: Add DXGI formats to WINED3DFORMAT. 2009-02-20 11:10:37 +01:00
Francois Gouget 96e81f0698 ddraw: Make some device_parent_*() functions static. 2009-01-26 15:13:26 +01:00
Henri Verbeet 9b5f3ed8f3 ddraw: Rename the main vtables to lpVtbl. 2009-01-22 15:28:22 +01:00
Henri Verbeet 802f9c7e29 ddraw: Get rid of ICOM_OBJECT. 2009-01-22 12:05:07 +01:00
Henri Verbeet 8c4cc2af46 ddraw: Get rid of ICOM_THIS_FROM. 2009-01-22 12:05:03 +01:00
Henri Verbeet 9a0c885e63 ddraw: Get rid of ICOM_INTERFACE. 2009-01-21 11:17:25 +01:00
Henri Verbeet ad171b143f ddraw: Get rid of ICOM_INIT_INTERFACE. 2009-01-21 11:16:51 +01:00
Henri Verbeet a966293f59 wined3d: Add an IWineD3DDeviceParent interface.
Other than being a bit nicer than passing function pointers all over the
place, this helps dxgi/d3d10. While the swapchain itself is created in dxgi,
its surfaces are constructed in d3d10core, which makes it impractical for dxgi
to pass the appropriate function pointers.
2009-01-16 13:29:32 +01:00
Michael Stefaniuc 5ee7a104c9 ddraw: Remove superfluous pointer casts. 2009-01-14 12:21:02 +01:00
Stefan Dösinger ae4e824423 ddraw[ex]: Show a caps handling difference. 2009-01-09 16:18:12 +01:00
Stefan Dösinger 6ef2b65531 ddraw: Reject IDirectDraw3 QI in ddraw.dll. 2009-01-03 15:14:51 +01:00
Christian Costa 3b64f895b1 ddraw: Display fixme only once in IDirectDrawImpl_WaitForVerticalBlank. 2009-01-02 11:51:29 +01:00
Nick Burns a537fb0a93 ddraw: Fix surface version setting. 2008-12-26 13:42:29 +01:00
Andrew Talbot dcbb91fc92 ddraw: Remove a superfluous semicolon. 2008-12-24 19:59:04 +01:00
Christian Costa 1632175b35 ddraw: Fix trace. 2008-12-08 12:02:36 +01:00
Christian Costa 9d3026ff40 ddraw: Fix some comments. 2008-12-03 09:49:24 +01:00
Francois Gouget fcfe436de5 ddraw: Remove WINAPI on static functions where not needed. 2008-11-24 14:25:09 +01:00
Henri Verbeet 092b51e82a wined3d: Rename CreateAdditionalSwapChain to CreateSwapChain. 2008-10-28 12:46:46 +01:00
Alexandre Julliard e1ced22db1 ddraw: Convert source files to utf-8. 2008-10-18 19:19:45 +02:00
Andrew Talbot a697d99d66 ddraw: Sign-compare warnings fix. 2008-09-29 17:32:17 -05:00
Stefan Dösinger c1eabc2ce7 ddraw: Catch attempts to opengl-render to the desktop window. 2008-09-02 14:56:35 +02:00
Stefan Dösinger d5f05c59c7 ddraw: Beware of the surface type when checking for format support. 2008-09-02 14:56:26 +02:00
Stefan Dösinger ec4955630e wined3d: Silence some format spam. 2008-08-28 11:24:49 +02:00
Stefan Dösinger 90e2a676e8 ddraw: Do not set the rendertarget flag just because of the backbuffer flag.
There are also overlay backbuffers, which aren't render targets. The
primarysurface and d3ddevice cap flags should be enough here.
2008-08-20 12:32:42 +02:00
Stefan Dösinger e10302d952 ddraw: Implement IDirectDraw7::GetFourCCCodes. 2008-08-19 12:25:37 +02:00
Stefan Dösinger c1bbab7c54 ddraw: Send the ddraw output to the clipper window, if any. 2008-08-19 12:25:31 +02:00
Stefan Dösinger 376944ebe4 wined3d: Remove the device-global fullscreen flag. 2008-08-19 12:24:57 +02:00
Stefan Dösinger 34b37fe241 d3d: Remove IWineD3DDevice::SetHwnd. 2008-08-19 12:22:05 +02:00
Stefan Dösinger e178ddd9e1 wined3d: Use a swapchain for GDI surfaces.
This is a long-needed cleanup aimed at removing the ddraw_primary,
ddraw_window, ddraw_width and ddraw_height members from
IWineD3DDeviceImpl, which just do not belong there.  Destination
window and screen handling is supposed to be done by swapchains.
2008-08-19 12:21:32 +02:00
Stefan Dösinger a47e7badb9 ddraw: Set ddraw caps in wined3d.
Currently the ddraw capabilities were almost static, except of D3D
support. When overlay support is added, the caps depend on certain
settings in WineD3D or capabilities available from OpenGL and Xv. So
set those caps in wined3d as well.
2008-08-04 13:10:11 +02:00
Alexander Dorofeyev 59fc5a75e0 ddraw: Force surfaces without memory flags to video memory on creation.
Also removes now redundant setting of vidmem flag on rendertargets, prevents 
adding vidmem flag when sysmem flag is present. Fixes missing textures in Forsaken.
2008-07-17 11:21:39 +02:00
Alexander Dorofeyev cb5e06c944 ddraw: Implement FPU mode fixup in d3d7 device.
As documented in DirectX7 SDK, d3d7 devices set FPU mode (control word) on every 
call and restore it back to original state before returning, if created in 
DDSCL_FPUPRESERVE cooperative mode. This allows games to work with FPU in a 
possibly incompatible mode and avoid resetting it all the time.
2008-06-23 19:59:33 +02:00
Michael Karcher 606186d4c5 ddraw: Ensure to load wined3d before attempting to create a clipper. 2008-06-23 14:11:58 +02:00
Alexander Dorofeyev 940ef7a9ff ddraw: Do not return modes differing only by refresh rate without DDEDM_REFRESHRATES. 2008-05-29 12:09:19 +02:00
Francois Gouget 42a61d7ed7 Assorted spelling fixes. 2008-05-06 16:10:20 +02:00
Roderick Colenbrander feb753c98d ddraw: Enable EnableAutoDepthStencil to receive depth support. 2008-05-02 11:33:38 +02:00
Austin English 825baa23a2 ddraw: Spelling fixes. 2008-04-03 11:39:45 +02:00
Denver Gingerich 248ae8f112 ddraw: Implement ForceRefreshRate registry entry for overriding DirectX refresh rate. 2008-03-11 15:30:37 +01:00
James Hawkins 26ad93947b janitorial: Remove links to any microsoft site. 2008-03-01 12:04:09 +01:00
Peter Dons Tychsen 6e8b7c4cef ddraw: Add missing pitch in callback from EnumDisplayModes(). 2008-01-04 13:55:12 +01:00
Stefan Dösinger f29d947f6a ddraw: Set X8R8G8B8 for 32 bpp. 2007-12-07 16:26:31 +01:00
Francois Gouget 90834020da ddraw: Modify DDRAW_dump_(DWORD|PTR|DDCOLORKEY|DDSCAPS2|pixelformat)() to print a trailing '\n'. 2007-12-07 14:52:56 +01:00
Andrew Talbot 1f73a97a5a ddraw: Remove unneeded casts. 2007-12-06 12:07:41 +01:00
Stefan Dösinger 848650d908 ddraw: Downgrade the SetCooperativeLevel FIXME to a TRACE. 2007-10-10 11:59:33 +02:00
Stefan Dösinger c5055fb3eb ddraw: Cope with Init3D failures. 2007-10-10 11:58:37 +02:00
David Hedberg c53487b599 ddraw: Fix and test case for situation where DDSD_MIPMAPCOUNT is set and dwMipMapCount is 0. 2007-09-10 15:29:46 +02:00
Francois Gouget 5b375aec71 ddraw: Better match the PSDK types and fix the winapi_check warnings. 2007-08-08 15:32:03 +02:00
Stefan Dösinger df75a7e007 ddraw: SetDisplayMode may fail. 2007-08-03 12:30:21 +02:00
Robert Millan 47c847663e ddraw: Remove thread safety FIXMEs. 2007-07-30 12:59:47 +02:00
Stefan Dösinger 430239b470 ddraw: Some d3d-only code fixes.
Vertex declarations are a d3d feature, thus they should be destroyed
before d3d is shut down in wined3d. The surface type should be reset
afterwards to prevent avoid gl surface afterwards and before a new
render target is created.
2007-07-24 13:40:29 +02:00
Stefan Dösinger 83ba2c762d ddraw: Hold the dll lock in IDirectDraw methods. 2007-05-21 19:12:19 +02:00
Stefan Dösinger bfe631dfb9 ddraw: Hold the lock in creation functions. 2007-05-21 19:11:34 +02:00
Francois Gouget 0acb5810bf Assorted spelling fixes. 2007-05-15 18:09:16 +02:00
Stefan Dösinger df891b823a ddraw: Always set fullscreen mode in wined3d.
DDSCL_NORMAL is not set at initialization. Instead of making this a
& DDSCL_NORMAL || == 0 check just set fullscreen mode always. WineD3D
will catch NOP changes anyway.
2007-05-10 11:40:40 +02:00
Stefan Dösinger bed50115ee ddraw: More tests and fixes on surface attachments. 2007-05-09 12:07:46 +02:00
Stefan Dösinger 0fb41a8845 wined3d: Make the blit -> flip work for windowed rendering. 2007-05-08 18:28:08 +02:00
Stefan Dösinger d93e161b1f d3d: Move clippers from DDraw to wined3d. 2007-05-08 18:27:44 +02:00
Stefan Dösinger 00e37a81b2 ddraw: Primary surfaces always have screen size. 2007-05-07 21:43:09 +02:00
Stefan Dösinger 2ecacc619f ddraw: Fix reported caps on compressed surfaces.
Compressed surfaces in ddraw do not have a pitch, instead the full
surface size is reported. Also adds tests for the extact behavior and
surface flags set.
2007-05-07 21:42:33 +02:00
Stefan Dösinger cdaf29f64e ddraw: Cube texture support. 2007-05-01 11:42:25 +02:00
Stefan Dösinger 94b3fddec8 d3d: Pass the cube face to Create*Texture's surface creation callback. 2007-05-01 11:42:25 +02:00
Stefan Dösinger 7ca369d9b6 ddraw: Store a WineD3DBaseTexture instead of a WineD3DTexture. 2007-05-01 11:42:24 +02:00
Andrew Talbot 0629946e65 ddraw: Exclude unused headers. 2007-05-01 11:42:24 +02:00
Francois Gouget 5a8fc34033 Assorted spelling fixes. 2007-04-30 12:35:11 +02:00
Stefan Dösinger 9e3e799ca3 ddraw: Complex surfaces form a tree. 2007-04-30 12:22:06 +02:00
Stefan Dösinger 87544190a5 ddraw: Move the additional surface creation into a seperate function. 2007-04-30 12:21:21 +02:00
Stefan Dösinger b4d48c7fce ddraw: Search for d3d primary a bit differently. 2007-04-30 12:20:56 +02:00
Stefan Dösinger a46012eff2 ddraw: Search for texture sublevels with GetAttachedSurface. 2007-04-27 11:43:36 +02:00
Stefan Dösinger c2ffffe1ff ddraw: Use EnumAttachedSurfaces to search for a render target. 2007-04-27 11:43:27 +02:00
Stefan Dösinger 0386eed91f ddraw: Get rid of FVFs.
Remove all IWineD3DDevice::SetFVF calls and instead create converted
vertex declarations and use them. The idea is to remove the FVF paths
from wined3d to simplify the code, and optimize the vertex declaration
codepath.
2007-04-26 14:54:17 +02:00
Stefan Dösinger 725057da47 d3d: Remove dependency on ddraw.h header. 2007-04-16 13:20:15 +02:00
Stefan Dösinger 8a5b6df483 d3d: Enumerate palettized formats for ddraw. 2007-04-16 12:12:34 +02:00
Stefan Dösinger 022e884342 wined3d/ddraw: Forward DDSCL_MULTITHREADED to wined3d. 2007-03-19 12:17:18 +01:00
Stefan Dösinger 27113156d9 wined3d: Remove IWineD3DDevice::EnumDisplayModes. 2007-02-20 11:47:46 +01:00
H. Verbeet a4bc52a89c wined3d: Fix WINED3DPRESENT_PARAMETERS and use it instead of D3DPRESENT_PARAMETERS. 2007-02-16 12:31:03 +01:00
Stefan Dösinger 388499ff28 wined3d: More fullscreen window fixes. 2007-02-14 20:46:51 +01:00
H. Verbeet 6112522122 wined3d: Move SetupFullscreenWindow() and RestoreWindow() from IDirectDrawImpl to IWineD3DDeviceImpl. 2007-01-19 12:28:58 +01:00
Michael Stefaniuc 33af3c5c83 janitorial: Use the C standard for multiline strings. 2007-01-10 12:28:19 +01:00
Stefan Dösinger 4e8e47fc6c ddraw: Forward the DDSCAPS2_TEXTUREMANAGE flag to wined3d. 2007-01-08 20:59:29 +01:00
Michael Stefaniuc c7e00c9f49 janitorial: In multiline strings there is no need for '\' at the end of the lines. 2006-12-27 13:10:13 +01:00
Markus Amsler 5e0fc62135 d3d: Callback infrastructure for implicit swap chain destruction in IWineD3DDevice. 2006-12-18 12:07:26 +01:00
Ulrich Czekalla 398886799e ddraw: Add IDirectDraw3 interface. 2006-12-14 20:33:49 +01:00
Markus Amsler 3fd04308ab d3d: Callback infrastructure for implicit depth stencil surface destruction in IWineD3DDevice. 2006-12-06 12:39:30 +01:00
Markus Amsler a60d4b2d2f d3d: Pass the superior creating object down to the callback functions. 2006-12-04 12:40:38 +01:00
Markus Amsler f8e7ddd798 Revert "d3d: Remove AddRef from IWineD3DDevice_GetBackBuffer.".
This reverts commit 478a414e58.
2006-11-30 16:04:00 +01:00
Markus Amsler 478a414e58 d3d: Remove AddRef from IWineD3DDevice_GetBackBuffer. 2006-11-22 11:39:52 +01:00
Stefan Dösinger 2e5628df3f ddraw: Make the surface list a standard wine list. 2006-10-16 12:06:43 +02:00
Stefan Dösinger 75c67f6b45 ddraw: Do not let the a surface dimension fall to 0. 2006-10-13 11:06:28 +02:00
Stefan Dösinger b4afa19272 ddraw: Remove an incorrect size check. 2006-10-13 11:06:15 +02:00
H. Verbeet 2465fcb368 ddraw: Win64 printf format warning fixes. 2006-10-11 12:08:28 +02:00
Jesse Allen 52296dbdbf ddraw: Fix for DDSURFACEDESC param in CreateSurface. 2006-10-10 19:33:15 +02:00
Stefan Dösinger 09e794aff8 ddraw: Make the ddraw list a wine list. 2006-10-09 20:38:15 +02:00
Stefan Dösinger 48b550c9db ddraw: Set the DDSCAPS2_MIPMAPSUBLEVEL flag on sublevels. 2006-10-09 12:54:38 +02:00
Stefan Dösinger 3529560cd7 wined3d: Add WINED3DUSAGE_OVERLAY. 2006-10-06 12:53:24 +02:00
Stefan Dösinger 6286c4e70d ddraw: Pass the fullscreen flag to wined3d. 2006-09-10 10:18:45 +02:00
Stefan Dösinger 2d5b19c182 ddraw: Double buffered primary surfaces can only be created in EXLUSIVE mode. 2006-09-10 10:18:23 +02:00
Stefan Dösinger 06106e2810 ddraw: Support using an application-provided surface pointer. 2006-07-26 15:17:59 +02:00
Stefan Dösinger 915174d8d9 ddraw: Palette refcounting fix.
Do not AddRef the DirectDraw interfaces in CreatePalette of older
interface version, and add a test for that.
2006-07-11 17:10:53 +02:00
Stefan Dösinger 0a81295782 ddraw: Split up the ddraw refcount. 2006-07-11 17:10:17 +02:00
Piotr Caban 2abfc391b4 ddraw: Added missing '\n' in debug traces. 2006-06-30 20:44:14 +02:00
Stefan Dösinger 92e48bcea5 ddraw: Assign the surface descriptions height to the height. 2006-06-27 11:14:13 +02:00
Francois Gouget 9bfbfcbeb4 Assorted spelling, case and grammar fixes. 2006-06-26 13:06:11 +02:00
Stefan Dösinger 36a8a8e6f3 ddraw: Set the video memory and visible flag on render targets. 2006-06-26 13:04:27 +02:00
Stefan Dösinger 546a60ff2f ddraw: Enumerate the reference d3ddevice. 2006-06-26 13:04:13 +02:00
Stefan Dösinger 01273e7eb6 ddraw: Palette refcounting fixes + tests. 2006-06-19 10:29:56 +02:00
Alexandre Julliard 7f8c29a407 ddraw: Make some functions static. 2006-06-15 17:14:37 +02:00
Stefan Dösinger c8901d6f62 ddraw: Rewrite most of ddraw using WineD3D. 2006-06-15 16:51:16 +02:00