Commit graph

250 commits

Author SHA1 Message Date
Henri Verbeet
2465b4cf01 d3d9: Move device functions to device.c. 2010-09-01 14:01:02 +02:00
Henri Verbeet
6c4c351791 wined3d: Don't require wined3d object parents to be COM objects. 2010-09-01 14:01:02 +02:00
Henri Verbeet
2ef400901d wined3d: Devices don't need parents. 2010-09-01 12:40:07 +02:00
Henri Verbeet
c568916f9e wined3d: Implicit depth/stencil surfaces don't have a container.
They're owned by the device instead of the swapchain.
2010-08-31 14:23:47 +02:00
Henri Verbeet
4005eb2a18 wined3d: Get rid of WINED3DRECT. 2010-08-31 14:23:47 +02:00
Austin English
243771deb1 d3d8/d3d9: Fix a compiler warning on non-i386/x86_64. 2010-08-24 12:25:14 +02:00
Henri Verbeet
cc5271d1b7 wined3d: Rename WINED3DFORMAT to wined3d_format_id. 2010-08-24 12:25:01 +02:00
Henri Verbeet
0df144164b wined3d: Pass floating point colors to IWineD3DDeviceImpl_ColorFill(). 2010-08-24 12:24:43 +02:00
Henri Verbeet
e6611e22fb d3d9: Set the FPU control word on device creation. 2010-05-26 17:36:32 +02:00
Henri Verbeet
914c8cb8ea ddraw: Acquire/release the focus window from the correct location. 2010-03-18 10:24:15 +01:00
Henri Verbeet
7f8ccf0342 d3d9: Add a separate function for stateblock initialization. 2010-01-20 15:32:15 +01:00
Henri Verbeet
bfb63a8634 d3d9: Add a separate function for query initialization. 2010-01-18 14:37:21 +01:00
Henri Verbeet
76804fa711 d3d9: Add a separate function for swapchain initialization. 2009-12-21 15:01:25 +01:00
Henri Verbeet
55f3c576d9 wined3d: Remove the effetively unused "state" field from the device. 2009-11-18 11:16:54 +01:00
Henri Verbeet
434a23d90d d3d9: Move D3D9CB_DestroySwapChain() to device.c. 2009-11-18 11:16:35 +01:00
Henri Verbeet
b9243b721a d3d9: Add a separate function for device initialization. 2009-11-18 11:16:31 +01:00
Stefan Dösinger
90e443758a wined3d: Add a parameter for SetRenderTarget viewport setup. 2009-11-03 21:21:30 +01:00
Henri Verbeet
bf10dbe8a6 wined3d: Map D3DFMT_D24S8 to WINED3DFMT_D24_UNORM_S8_UINT.
The internal order of the depth and stencil bits is unspecified since the
format isn't lockable.
2009-10-30 11:28:52 +01:00
Henri Verbeet
4dbf1c4900 d3d9: Add traces. 2009-10-20 14:00:36 +02:00
Henri Verbeet
44aead2e1c d3d9: Fix some IDirect3DDevice9Ex methods. 2009-10-19 11:45:25 +02:00
Stefan Dösinger
e80144c403 d3d: Make EndScene calls hookable. 2009-10-14 12:21:06 +02:00
Stefan Dösinger
dcacd83a82 d3d9: Make some functions hookable. 2009-10-14 12:21:06 +02:00
Henri Verbeet
47c84f4f7f wined3d: Use the DXGI naming convention for all formats. 2009-09-25 15:15:44 +02:00
Henri Verbeet
c64da00de7 wined3d: Rename IWineD3DDevice::GetIndices() to IWineD3DDevice::GetIndexBuffer(). 2009-09-25 15:14:52 +02:00
Henri Verbeet
60e32659a7 wined3d: Rename IWineD3DDevice::SetIndices() to IWineD3DDevice::SetIndexBuffer(). 2009-09-25 15:14:44 +02:00
Henri Verbeet
7f1c802b9f d3d9: Add a separate function for pixel shader initialization. 2009-09-24 13:24:40 +02:00
Henri Verbeet
cdb741274a d3d9: Add a separate function for vertex shader initialization. 2009-09-24 13:24:04 +02:00
Henri Verbeet
0241fefa94 d3d9: Add a separate function for vertex declaration initialization. 2009-09-23 12:35:00 +02:00
Henri Verbeet
359acf2461 d3d9: Limit "NumSimultaneousRTs" to 4. 2009-09-22 16:17:30 +02:00
Henri Verbeet
de9b47924d d3d9: Add a separate function for vertex buffer initialization. 2009-09-18 08:55:05 -05:00
Henri Verbeet
5ec05c556d d3d9: Add a separate function for index buffer initialization. 2009-09-18 08:55:00 -05:00
Henri Verbeet
75f005ebf9 d3d9: Add a separate function for texture initialization. 2009-09-17 10:10:10 -05:00
Henri Verbeet
c51fbe9293 d3d9: Add a separate function for cube texture initialization. 2009-09-17 10:09:28 -05:00
Henri Verbeet
5b7b4f59d2 d3d9: Add a separate function for volume texture initialization. 2009-09-16 13:05:51 -05:00
Henri Verbeet
e9000d2e6c wined3d: Don't free D3D volumes until the wined3d volume is destroyed. 2009-09-16 13:05:20 -05:00
Henri Verbeet
8ffca99fb0 d3d9: Add a separate function for volume initialization. 2009-09-16 13:04:57 -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
52e45865bd d3d9: Add a separate function for surface initialization. 2009-09-15 14:32:23 -05:00
Henri Verbeet
2b2fc827ce wined3d: Remove unused parameters to drawPrimitive(). 2009-09-11 12:09:14 +02:00
Stefan Dösinger
e1469961d4 wined3d: Test and fix ddraw and d3d9 GetDC differences.
The MSDN is not totally correct: A8R8G8B8 and A1R5G5B5 also allow GetDC. The
main differences that have to be filtered out in d3d9.dll are GetDC on
A8B8G8R8, X8B8G8R8 and P8.
2009-09-08 13:04:52 +02:00
Henri Verbeet
e7d14d02d0 d3d9: Remove trailing spaces. 2009-08-28 11:54:50 +02:00
Henri Verbeet
5f9f079d71 d3d9: Use the wined3d cs for wined3d locking. 2009-08-26 12:11:41 +02:00
Gerald Pfeifer
b44596ffff d3d9: Fix variable type in reset_enum_callback(). 2009-06-26 12:02:59 +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
Gerald Pfeifer
6383d5fee2 d3d9: Use correct constant types (WINED3DPOOL_DEFAULT instead of D3DPOOL_DEFAULT and WINED3DRTYPE_SURFACE instead of D3DRTYPE_SURFACE). 2009-06-11 11:53:54 +02:00
Henri Verbeet
621da64245 wined3d: Get rid of the silly pointers in WINED3DVOLUME_DESC. 2009-06-09 17:01:14 +02:00
Gerald Pfeifer
f39e7182e1 d3d9: Use WINED3DPOOL_DEFAULT instead of D3DPOOL_DEFAULT as appropriate. 2009-06-03 11:27:34 +02:00
Henri Verbeet
59268f7924 d3d9: Having a NULL rendertarget isn't a failure. 2009-05-29 11:26:50 +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
Stefan Dösinger
cb1c9dcda9 d3d: Remove the format from index buffers. 2009-04-09 16:28:25 +02:00
Stefan Dösinger
f0efa97413 wined3d: Remove the buffer fvf. 2009-04-09 16:28:10 +02:00
Stefan Dösinger
513a493f00 wined3d: Merge IWineD3DIndexBuffer and IWineD3DBuffer. 2009-04-08 11:37:29 +02:00
Stefan Dösinger
bc07ad0579 d3d8, d3d9: Don't rely on the wined3d buffer type. 2009-04-08 11:35:29 +02:00
Henri Verbeet
fd3d769a12 d3d9: Fix locking.
It appears there are some calls to wined3d missing critical sections.
2009-03-23 14:08:03 +01:00
Henri Verbeet
09f21f3fd8 d3d9: Improve IDirect3DDevice9::SetFVF() code flow. 2009-03-06 15:38:19 +01:00
Henri Verbeet
aa3027a604 wined3d: Merge IWineD3DVertexBuffer with IWineD3DBuffer.
That still leaves IWineD3DIndexBuffer, but that code is also mostly similar,
except for the conversion code (which will be unused there).
2009-03-06 15:35:58 +01:00
Henri Verbeet
702eeb6b0c wined3d: Add separate methods for setting the primitive type. 2009-03-05 16:16:25 +01:00
Henri Verbeet
602bb1f551 wined3d: Pass the vertex count rather than the primitive count to wined3d draw methods. 2009-03-05 16:16:24 +01: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
Henri Verbeet
61a9efc4b9 d3d9: Explicitly convert between D3DFORMAT and WINED3DFORMAT values. 2009-02-20 11:10:14 +01:00
Michael Stefaniuc
bca813a5a6 d3d9: Remove superfluous pointer casts. 2009-01-29 14:06:18 +01:00
Marcus Meissner
ace65a527f d3d9: Initialize hr (Coverity). 2009-01-28 12:10:28 +01:00
Henri Verbeet
9e7b5676a7 d3d9: Remove some superfluous pointer casts. 2009-01-20 12:34:12 +01:00
Henri Verbeet
e6babd8367 d3d9: Properly test for dynamic usage in device_parent_CreateSurface(). 2009-01-16 13:29:57 +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
Henri Verbeet
352e60e6ed d3d: Explicitly translate texture stage states.
Ddraw and d3d8 already translate half of them, it turns out the lookup
table actually saves lines there.
2009-01-06 12:45:32 +01:00
Henri Verbeet
a394dbec13 d3d9: Release the vertex declaration once we're done with it. 2008-12-29 12:16:27 +01:00
Henri Verbeet
0fb3cb9314 d3d9: Don't crash in GetFVF() if a NULL vertex declaration is set. 2008-12-24 19:57:51 +01:00
Henri Verbeet
4adb342327 wined3d: Remove GetFVF() and SetFVF() from IWineD3DDevice. 2008-12-17 14:02:03 +01:00
Alexandre Julliard
8eccb01a47 d3d9: Make some functions static. 2008-12-04 12:47:04 +01:00
Francois Gouget
1c87e4664f d3d9: Remove WINAPI on static functions where not needed. 2008-11-24 14:33:06 +01:00
Francois Gouget
001288ecae d3d9: Remove IDirect3DDevice9Impl_GetFrontBuffer() as it is unused. 2008-11-24 14:33:02 +01:00
Stefan Dösinger
40c06ea296 d3d9: Add a test for GetTexture with no texture set. 2008-11-04 11:41:20 +01:00
Stefan Dösinger
123a3f44d9 d3d9: WINED3DSURFACE_DESC::MultiSampleType is not a DWORD. 2008-11-04 11:40:29 +01:00
Stefan Dösinger
3d96f97ee1 d3d9: Use the correct AddRef and Release macros. 2008-11-04 11:40:23 +01:00
Stefan Dösinger
93af8d3631 d3d: Do not restore the display mode in ddraw. 2008-11-03 13:34:13 +01:00
Rob Shearman
f6813e55c5 d3d9: Fix type used to store return value in IDirect3DDevice9Impl_GetNPatchMode.
It should be a float, not an HRESULT.
2008-09-15 13:23:30 +02:00
Henri Verbeet
c0d770de9e d3d9: GetDepthStencilSurface returns D3DERR_NOTFOUND when no depth stencil is present. 2008-09-10 12:03:55 +02:00
Rob Shearman
30cd9b473e d3d9: Remove unneeded local variable in IDirect3DDevice9Impl_SetFVF. 2008-08-18 17:15:57 +02:00
Rob Shearman
320aac97e4 d3d9: Fix variable type in IDirect3DDevice9Impl_GetSoftwareVertexProcessing.
IWineD3DDevice_GetSoftwareVertexProcessing returns a BOOL, not an HRESULT.
2008-08-18 17:15:56 +02:00
Tobias Jakobi
fb0fbc4b85 d3d9: Remove faulty comment from CreateOffscreenPlainSurface. 2008-07-08 21:08:53 +02:00
Stefan Dösinger
cd7d2dc136 d3d9: Enforce ColorFill restrictions. 2008-04-07 11:48:26 +02:00
Stefan Dösinger
8869c0f147 d3d: De-pointerize the WINED3DCAPS structure. 2008-03-25 19:36:38 +01:00
Stefan Dösinger
c1a0037b88 d3d9: IDirect3DDevice9Ex stub. 2008-03-03 20:48:50 +01:00
James Hawkins
26ad93947b janitorial: Remove links to any microsoft site. 2008-03-01 12:04:09 +01:00
Rob Shearman
dfda3c4dc8 d3d9: Fix copy and paste error in reset_enum_callback.
vertex_desc.Pool should obviously be used in the 
WINED3DRTYPE_VERTEXBUFFER case instead of index_desc.Pool.
2008-02-19 14:11:43 +01:00
Stefan Dösinger
ef4119029b d3d9: Implement the device lost state. 2008-02-07 13:05:37 +01:00
Stefan Dösinger
80953d62d7 d3d9: Reject IDirect3DDevice9::Reset with active default pool resources. 2008-01-14 15:12:00 +01:00
Gerald Pfeifer
0060027e4b d3d9: Fix type of loop variable. 2008-01-04 12:12:34 +01:00
Gerald Pfeifer
21a9c2d2f9 wined3d: Removed dead FIXME checks. 2008-01-03 11:53:29 +01:00
Andrew Talbot
77c8a1594d d3d9: Remove unneeded casts. 2007-12-05 12:04:44 +01:00
Stefan Dösinger
22ac3704ba d3d9: Free the converted declaration data after creating the declaration. 2007-11-20 13:10:55 +01:00
Stefan Dösinger
e4f8a2da2b wined3d: Depth stencil fixes. 2007-11-14 11:58:36 +01:00
Stefan Dösinger
cc563b9c69 d3d9: Return the correct return value in GetDepthStencilSurface. 2007-08-27 12:00:28 +02:00
Stefan Dösinger
01c6c982bb d3d9: Some caps fixes. 2007-08-21 13:35:35 +02:00
Stefan Dösinger
0820777983 d3d9: Hold the lock in methods implemented in device.c. 2007-06-18 12:33:54 +02:00
H. Verbeet
6ee356fca0 wined3d: Get rid of the pBaseVertexIndex parameter to IWineD3DDeviceImpl_GetIndices, use GetBaseVertexIndex instead. 2007-06-07 11:20:48 +02:00
H. Verbeet
785771272a wined3d: Get rid of the BaseVertexIndex parameter to IWineD3DDeviceImpl_SetIndices, use SetBaseVertexIndex instead. 2007-06-06 12:10:47 +02:00