Commit Graph

636 Commits

Author SHA1 Message Date
Henri Verbeet a25947fa7e d3d8: Add WINED3DFMT_W11V11U10 <=> D3DFMT_W11V11U10 conversion. 2009-06-19 13:52:42 +02:00
Paul Vriens 91e306579b d3d8/tests: Fix some tests (logical || with non-zero constant). 2009-06-19 13:52:32 +02:00
Henri Verbeet 7dd5cc8749 d3d8: Add tests for deleting invalid shader handles. 2009-06-16 13:36:59 +02:00
Henri Verbeet 1bbc65b155 d3d8: Deleting an invalid pixel shader handle should return D3D_OK. 2009-06-16 13:36:54 +02:00
Henri Verbeet dc3958c079 d3d8: Do some more verification on handles. 2009-06-16 13:36:48 +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 621da64245 wined3d: Get rid of the silly pointers in WINED3DVOLUME_DESC. 2009-06-09 17:01:14 +02:00
Henri Verbeet 13a05caa97 wined3d: Remove the "declaration" parameter to IWineD3DDeviceImpl_CreateVertexShader().
Once upon a time this was used for creating fake vertex shader
attribute semantics for d3d8 shaders. We don't need this anymore since
device_stream_info_from_declaration() will use the vertex
declaration's output slot to load the data, if present. That also
avoids the potentially expensive matching of attribute semantics
between vertex shader and declaration for d3d8.
2009-05-28 12:42:18 +02:00
Henri Verbeet f0e303b0f2 wined3d: Add the output signature to IWineD3DDevice_CreateVertexShader(). 2009-05-26 13:49:55 +02:00
Henri Verbeet 9a579a43b1 wined3d: Use the output signature to map SM4 pixel shader outputs to the appropriate register. 2009-05-11 12:43:00 +02:00
Stefan Dösinger 9f1731edb6 d3d: Limit d3d8 and d3d9 vshader constants to 256.
DX10 cards support 512(ATI) or 1024(Nvidia) vertex shader constants in
GL. The dx9 DXCapsViewer shows that dx10 windows drivers only claim
256 constants on Windows, so we can and should do the same.
2009-04-27 13:23:36 +02:00
David Adam 33eb939390 wined3d: SetDepthStencilSurface is always called when AutoDepthStencil is enabled. 2009-04-24 11:51:27 +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
David Adam 458902b5b2 d3d8: Add tests for IDirect3D8Device_Reset. 2009-04-22 12:55:45 +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 ff16f30677 d3d8: Store the fvf in the d3d8 vertex buffer. 2009-04-09 16:27:43 +02:00
Stefan Dösinger 513a493f00 wined3d: Merge IWineD3DIndexBuffer and IWineD3DBuffer. 2009-04-08 11:37:29 +02:00
Stefan Dösinger 3ed94329a3 wined3d: Use Map and Unmap for index buffers.
Just a change in name to prepare for the next patch
2009-04-08 11:36:18 +02:00
Stefan Dösinger dc80a3ede5 d3d: Unify WINED3DVERTEXBUFFER_DESC and WINED3DINDEXBUFFER_DESC. 2009-04-08 11:36:02 +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 4434d00f84 wined3d: Unify vertex and texture formats.
Some fields should be redundant now, eg. gl_vtx_type and glType. I'll leave
that for a different patch to fix though.
2009-03-27 15:51:25 +01:00
Henri Verbeet 6f206c75ec wined3d: Don't create an END element for wined3d vertex declarations.
Wined3d doesn't need it since it already has the element count.
2009-03-27 15:51:25 +01:00
Henri Verbeet 41ea1e1df7 d3d8: Fix some indentation. 2009-03-26 14:47:21 +01:00
Henri Verbeet c0cefb3501 d3d8: Cleanup the vertexshader handling code a bit. 2009-03-24 12:56:50 +01:00
Henri Verbeet 4131135a9f d3d8: Cleanup the pixelshader handling code a bit.
This mostly just reduces the nesting to something more sane.
2009-03-24 12:56:33 +01:00
Henri Verbeet 3f559f26d6 d3d8: Properly handle unsetting the pixelshader in SetPixelShader(). 2009-03-24 12:56:25 +01:00
Henri Verbeet 775ea907a3 d3d8: Fix locking. 2009-03-23 14:08:03 +01:00
Henri Verbeet 72b5378758 d3d8: Get rid of resource.c. 2009-03-23 14:08:03 +01:00
Henri Verbeet 7c0931b7c2 d3d8: Get rid of basetexture.c. 2009-03-23 14:08:03 +01:00
Michael Stefaniuc d4c2a387c8 d3d8/tests: Use ULONG instead of unsigned long. 2009-03-23 12:41:08 +01:00
Henri Verbeet 24100cd026 d3d8: Release the d3d8 shader once we're done with it in IDirect3DDevice8Impl_GetPixelShader(). 2009-03-13 11:28:35 +01:00
Henri Verbeet f9d82ed1de d3d8: Handles aren't supposed to be pointers.
This might even make d3d8 a bit more 64-bit safe.
2009-03-10 12:08:58 +01:00
Henri Verbeet cbc8630019 d3d8: Make the shader handle table a bit more generic. 2009-03-10 12:08:32 +01:00
Henri Verbeet 954c3e22e1 d3d8: Don't call Release() in a while loop.
There should only ever be a single reference to these objects, since only
their handle is exposed outside d3d8. Should there be more references than
that, calling Release() in a while loop probably isn't the right approach.
2009-03-10 12:07:59 +01:00
Henri Verbeet 57d971121a d3d8: Fix some sign compare warnings. 2009-03-10 12:07:41 +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
Paul Vriens 1dc4d5caae d3d8/tests: Use win_skip() and skip() where appropriate. 2009-03-02 12:29:01 +01:00
Paul Vriens a1ca18eaf8 d3d8/tests: Fix a test failure on some boxes. 2009-02-25 14:05:36 +01:00
Paul Vriens b6263f6664 d3d8/tests: Fix a test failure on VMware. 2009-02-25 14:05:31 +01:00
Francois Gouget bd14f24b69 d3d8/tests: Use win_skip() to skip over unimplemented functionality. 2009-02-25 12:49:25 +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 d575b5fecb d3d8: Explicitly convert between D3DFORMAT and WINED3DFORMAT values. 2009-02-20 11:09:54 +01:00
Ge van Geldorp ae79b02ca6 d3d8/tests: Make tests pass on a W2K8 VM. 2009-01-27 11:30:03 +01:00
Francois Gouget 1f601015cd d3d8: Make some device_parent_*() functions static. 2009-01-26 15:13:29 +01:00
Henri Verbeet b5eaca542e d3d8: Properly test for dynamic usage in device_parent_CreateSurface(). 2009-01-16 13:29:52 +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 357c3f4a2c d3d8: Remove superfluous pointer casts. 2009-01-14 13:51:01 +01:00
Stefan Dösinger a69c86d3f5 ddrawex: Add a test for the permanent DC function. 2009-01-09 16:26:06 +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
Paul Vriens 49da5031c2 d3d8/tests: Fix a test failure on VMware and VirtualBox. 2009-01-05 15:09:17 +01:00
Henri Verbeet 007c648c20 d3d: Correct some debug levels. 2008-12-30 11:36:50 +01:00
Henri Verbeet ff409280e7 d3d8: Port the d3d9 stateblock tests to d3d8. 2008-12-30 11:36:11 +01:00
Henri Verbeet 664b58dc6f d3d: Make sure the device is properly released when exiting the tests. 2008-12-29 12:16:35 +01:00
Henri Verbeet 4adb342327 wined3d: Remove GetFVF() and SetFVF() from IWineD3DDevice. 2008-12-17 14:02:03 +01:00
Henri Verbeet dfe41770e7 d3d8: Add a test for GetVertexShader() with a FVF set. 2008-12-16 12:52:16 +01:00
Henri Verbeet 46572f682c wined3d: Refuse to create shaders with a NULL function. 2008-12-16 12:51:49 +01:00
Henri Verbeet 62497e8772 d3d8: Remove unused code.
Also corrects some related comments.
2008-12-16 12:51:40 +01:00
Henri Verbeet 0a47e1beb4 d3d8: Use the wined3d declaration to retrieve the d3d8 shader in IDirect3DDevice8Impl_GetVertexShader().
This makes it no longer necessary to create a wined3d vertex shader
when the d3d8 vertex shader has a NULL function.
2008-12-15 14:00:46 +01:00
Henri Verbeet b9468a89fc d3d8: Create a d3d8 declaration as parent for FVF based declarations. 2008-12-15 14:00:37 +01:00
Francois Gouget ec7cbc26f5 d3d8: Make D3D8CB_CreateSurface() static. 2008-12-15 12:25:02 +01:00
Huw Davies 855ce5bd86 d3d8/tests: Skip tests if we can't create the D3D8 object. 2008-12-04 12:51:18 +01:00
Alexandre Julliard 00e0d1510b d3d8: Make a function static. 2008-12-04 12:46:52 +01:00
Henri Verbeet a6917b143d wined3d: Use IDL to generate wined3d.h. 2008-11-25 13:37:22 +01:00
Francois Gouget d3c7b2f7cc d3d8: Remove WINAPI on static functions where not needed. 2008-11-24 14:18:42 +01:00
Michael Stefaniuc 4f199a10ad Remove the remaining casts of NULL. 2008-11-03 13:42:09 +01:00
Stefan Dösinger 93af8d3631 d3d: Do not restore the display mode in ddraw. 2008-11-03 13:34:13 +01:00
Henri Verbeet 30a504bab8 d3d8: Don't ignore the GetCursorInfo() return value (LLVM/Clang). 2008-11-03 11:49:27 +01:00
Henri Verbeet 092b51e82a wined3d: Rename CreateAdditionalSwapChain to CreateSwapChain. 2008-10-28 12:46:46 +01:00
Henri Verbeet 7142754820 wined3d: Remove the SDKVersion parameter to WineDirect3DCreate(). 2008-10-24 14:24:59 +02:00
Alexandre Julliard 7f327237bf Convert remaining source files to utf-8. 2008-10-18 19:23:08 +02:00
Detlef Riekenberg 38abbe3d60 d3d8/tests: Fix test on win9x with broken driver. 2008-10-13 12:03:25 +02:00
Aric Stewart f7cacc1f09 d3d8: Initialize IDirect3DDevice8 *device to NULL in case of immediate cleanup (Coverity 795). 2008-10-07 15:21:20 +02:00
Rob Shearman 0f236745a9 d3d8/9: Use WINED3D_OK instead of D3D_OK in vertexshader.c. 2008-10-06 13:07:02 +02:00
Rob Shearman 941801c548 d3d8: Fix incorrect ordering of brackets in IDirect3DVertexShader8Impl_GetDevice.
The comparison should be (D3D_OK == hr && myDevice), not (D3D_OK == (hr && myDevice)).
(Found with PreFast.)
2008-09-30 10:20:41 -05:00
Henri Verbeet 8f07e99ec5 d3d8: Add a test for auto depth stencil reset. 2008-09-10 12:05:45 +02:00
Henri Verbeet 43f5d8e5ad d3d8: Fix IDirect3DDevice8::SetRenderTarget().
The render target should be left alone if the render target argument is
NULL. WineD3D calls should be done inside the critical section.
2008-09-10 12:05:25 +02:00
Henri Verbeet 01539fb926 d3d8: GetDepthStencilSurface returns D3DERR_NOTFOUND when no depth stencil is present. 2008-09-10 12:05:10 +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
David Adam acaeb92042 d3d8/d3d9: Remove unconsistent tests for SetMaterial. 2008-08-22 11:32:09 +02:00
H. Verbeet 898c2c9778 d3d8: Don't store shader_handle's.
They're not stable across table resizes.
2008-08-20 10:26:51 +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
Tobias Jakobi 9ba3d03e78 d3d8: Fix IDirect3DDevice8::CreateImageSurface pool type. 2008-07-08 21:08:32 +02:00
Tobias Jakobi 413ce31eff d3d8: Add testcase for IDirect3DDevice8::CreateImageSurface. 2008-07-08 20:39:08 +02:00
Alexandre Julliard f98157f601 d3d8: Don't depend on the dxerr8 static library in the tests. 2008-07-08 17:51:45 +02:00
Alexandre Julliard 79c64acc7b tests: Don't depend on the static uuid libraries in the tests.
This avoids trouble with the broken MingW libraries when
cross-compiling the tests.
2008-07-08 17:51:45 +02:00
H. Verbeet 873c0afb82 d3d: Allow more imprecision in the texop test. 2008-06-25 20:29:05 +02:00
H. Verbeet 3546b8bbfc d3d8: Use color_match() in alpha_test().
Also fixes some of the messages.
2008-06-24 11:48:32 +02:00
Alexandre Julliard 360d87f420 d3d8: Make Direct3DCreate8 fail if we can't initialize wined3d. 2008-06-24 11:07:43 +02:00
Huw Davies a52224a48b d3d8: Fix typo in test. 2008-06-20 11:19:34 +02:00
Dmitry Timoshkov 92dfc02b01 d3d8: Avoid a not needed address-of operator. 2008-06-06 10:29:14 +02:00
H. Verbeet 2f6fbdec8c d3d8: Test our texop implementation. 2008-05-27 12:04:29 +02:00
H. Verbeet 14b13d0687 d3d: Use an alpha capable backbuffer format in the visual tests. 2008-05-27 12:04:05 +02:00
Andrew Talbot c8d495bac1 d3d8: Dangling pointers fix. 2008-05-05 19:46:15 +02:00
Alexandre Julliard dad21bbcbf makefiles: List the static libraries as normal imports instead of extra libs. 2008-04-30 14:23:55 +02:00
James Hawkins 537c4babed d3d8: Fix a few test failures in win2k3. 2008-04-25 11:33:47 +02:00