Commit Graph

744 Commits

Author SHA1 Message Date
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 fff8b09fb4 d3d9/tests: Release the IDirect3D9Ex interface in test_qi_ex_to_base(). 2009-10-23 12:03:08 +02:00
Henri Verbeet 66961840a5 d3d9: Free "elements" in a vertexdeclaration_init() error path (Valgrind). 2009-10-22 10:46:25 +02:00
Louis Lenders 786271e1a1 d3d9/tests: Test {IDirect3DTexture9, IDirect3DSurface9}::UnlockRect for rectangles that are not locked. 2009-10-20 15:00:40 +02:00
Henri Verbeet 4dbf1c4900 d3d9: Add traces. 2009-10-20 14:00:36 +02:00
Henri Verbeet d17cd37d3b d3d9/tests: Remove an unused color result. 2009-10-19 11:45:30 +02:00
Henri Verbeet 44aead2e1c d3d9: Fix some IDirect3DDevice9Ex methods. 2009-10-19 11:45:25 +02:00
Henri Verbeet 023446f109 d3d9/tests: Check some more return values (LLVM/Clang). 2009-10-16 13:37:12 +02:00
James Helferty 2b5ff09160 d3d9/tests: Fix position of EndScene in visual test. 2009-10-15 12:06:17 +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 aa96a4559e d3d9: Add some stateblock tests for device resources. 2009-10-13 11:38:28 +02:00
Henri Verbeet 803eab27c7 d3d9: Cleanup the stateblock test callbacks a bit. 2009-10-12 12:36:05 +02:00
Henri Verbeet 8f91327b89 d3d9: Only run the vertex/pixel shader constant apply tests when the implementation supports them. 2009-10-12 12:35:47 +02:00
Henri Verbeet de45a38003 d3d9: Add tests for D3DSBT_PIXELSTATE stateblocks. 2009-10-09 11:50:30 +02:00
Henri Verbeet 489264d495 d3d9: Add tests for D3DSBT_VERTEXSTATE stateblocks. 2009-10-09 11:50:30 +02:00
Henri Verbeet 50e1106eca d3d9: Add some tests for CreateStateBlock(). 2009-10-08 13:53:59 +02:00
Henri Verbeet dfe07023c4 d3d9: Don't test D3DRS_DEBUGMONITORTOKEN in the stateblock tests. 2009-10-08 13:53:39 +02:00
Henri Verbeet ffcfbc2aeb d3d8: Rename abort_stateblock() to release_stateblock() in the stateblock tests. 2009-10-08 13:53:24 +02:00
Stefan Dösinger fcd0bc8f54 d3d9: Reduce the YUV test precision. 2009-10-08 12:03:20 +02:00
Henri Verbeet 3cb7e87284 d3d9: Use separate fields for data to check/apply in the stateblock tests. 2009-10-07 12:24:21 +02:00
Henri Verbeet 063d3d181b d3d9: Get rid of the unused "return_data_buffer" in the stateblock tests. 2009-10-07 12:24:09 +02:00
Henri Verbeet 7d0d8c0245 d3d9: Make the individual stateblock tests responsible for checking data. 2009-10-06 12:02:41 +02:00
Henri Verbeet 54e28991fc d3d9: Always pass "struct event_data" to "event_fn" in the stateblock tests. 2009-10-05 13:46:01 +02:00
Henri Verbeet 9f4f29fd03 d3d9: Remove useless typedefs from the stateblock tests. 2009-10-05 13:46:01 +02:00
Henri Verbeet 3caba01ec9 d3d9: Remove D3D9_RENDER_STATES from the stateblock tests. 2009-10-05 13:46:01 +02:00
Stefan Dösinger eda00d97ad d3d9: Test viewports that are bigger than the surface. 2009-10-02 15:06:38 +02:00
Stefan Dösinger dc45657f2c wined3d: Fix vs_2_0 sgn.
vs_2_0's sgn has two extra parameters - temporary registers for the
instruction. This patch fixes the crash of the d3d9:visual test on windows and
properly handles the vs_2_0 version of sgn.
2009-10-02 12:36:59 +02:00
Stefan Dösinger 0c70291c2c wined3d: Fix a contradicting comment.
The test was adopted from the ddraw test, where GetPrivateData does not
addref. The test code was adjusted, the comment apparently not.
2009-10-01 13:47:53 +02:00
Allan Tong 5d56eddb7c d3d9: Don't release the parent device before destroying its children.
Releasing the device earlier may cause the underlying wineD3D device
to be freed before the child object has had a chance to clean up.
2009-09-29 12:05: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 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 789372afa8 wined3d: Don't free D3D pixel shaders until the wined3d pixel shader is destroyed. 2009-09-24 13:24:53 +02:00
Henri Verbeet 7f1c802b9f d3d9: Add a separate function for pixel shader initialization. 2009-09-24 13:24:40 +02:00
Henri Verbeet ca05ef5dd0 wined3d: Don't free D3D vertex shaders until the wined3d vertex shader is destroyed. 2009-09-24 13:24:19 +02:00
Henri Verbeet cdb741274a d3d9: Add a separate function for vertex shader initialization. 2009-09-24 13:24:04 +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 0241fefa94 d3d9: Add a separate function for vertex declaration initialization. 2009-09-23 12:35:00 +02:00
James Helferty 6fa09d1d22 d3d9: Fix some typos in visual test. 2009-09-22 20:19:58 +02:00
Henri Verbeet 85ab52a48d d3d9: Properly destroy vertex declarations. 2009-09-22 16:17:37 +02:00
Henri Verbeet 359acf2461 d3d9: Limit "NumSimultaneousRTs" to 4. 2009-09-22 16:17:30 +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 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 a8e8f763bf wined3d: Don't free D3D textures until the wined3d texture is destroyed. 2009-09-18 08:54:34 -05:00
Henri Verbeet 75f005ebf9 d3d9: Add a separate function for texture initialization. 2009-09-17 10:10:10 -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 c51fbe9293 d3d9: Add a separate function for cube texture initialization. 2009-09-17 10:09:28 -05:00
Henri Verbeet a286646f51 wined3d: Don't free D3D volume textures until the wined3d volume texture is destroyed. 2009-09-16 13:06:06 -05:00
Henri Verbeet 5b7b4f59d2 d3d9: Add a separate function for volume texture initialization. 2009-09-16 13:05:51 -05:00
Henri Verbeet b1ede91bfc d3d9: Mark internal symbols hidden. 2009-09-16 13:05:34 -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
Stefan Dösinger 9281bdb478 wined3d: SetLOD is ignored on D3DPOOL_DEFAULT textures.
I am not testing SYSTEMMEM and SCRATCH textures. SCRATCH textures
cannot be created, SYSTEMMEM ones cannot be used for texturing on
Windows.
2009-08-31 12:18:56 +02:00
Stefan Dösinger edf1c50b54 wined3d: Handle per-texture max LOD level.
GL_TEXTURE_BASE_LEVEL matches the basetexture::SetLOD functionality.
D3DSAMP_MAXMIPLEVEL essentially does the same as SetLOD. The test included in
this patch shows that the smallest mipmap level is used.
2009-08-31 12:18:41 +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
Henri Verbeet ada3e059e8 d3d9: Remove stray tabs. 2009-08-26 12:10:49 +02:00
Jörg Höhle f2a4c6eeab d3d9/tests: SetAutoGenFilterType tests. 2009-08-20 17:39:45 +02:00
Henri Verbeet ffb38da024 wined3d: Try to force a top-left filling convention. 2009-08-19 14:45:09 +02:00
Jörg Höhle ba87299402 d3d9/tests: Detect empty graphics driver name. 2009-08-14 11:26:44 +02:00
Henri Verbeet 3b06fc92f4 wined3d: Use EXT_provoking_vertex to match Direct3D's provoking vertex convention. 2009-08-10 13:52:50 +02:00
Stefan Dösinger 296573caae d3d: Filter R8G8B8 in d3d8 and d3d9. 2009-08-07 14:56:40 +02:00
Henri Verbeet 3115f3357f d3d9/tests: Use color_match() in a few more places. 2009-07-10 12:13:32 +02:00
Henri Verbeet 699f68cdee wined3d: Get rid of some pointers in WINED3DADAPTER_IDENTIFIER.
This also avoids some unchecked strcpy() calls.
2009-07-07 11:50:30 +02:00
Paul Vriens f96e210ed7 d3d9/tests: Skip a test on failure. 2009-07-06 14:35:26 +02:00
Henri Verbeet 17c0e99106 d3d9/tests: Add a small test for having multiple device active at the same time.
This is essentially the situation that caused problems with reusing the
initial GL context.
2009-07-03 13:05:52 +02:00
Henri Verbeet 7d3beb6b79 d3d: Add a test for releasing the device after destroying the window. 2009-06-29 12:30:32 +02:00
Gerald Pfeifer b44596ffff d3d9: Fix variable type in reset_enum_callback(). 2009-06-26 12:02:59 +02:00
Henri Verbeet c672071db7 d3d9/tests: Make sure the device is released properly. 2009-06-23 11:47:59 +02:00
Henri Verbeet ad05c39fd7 d3d9/tests: Release the query in test_occlusion_query_states(). 2009-06-23 11:47:53 +02:00
Henri Verbeet 6cc2f9573a d3d9/tests: Release the vertex buffer in test_null_stream(). 2009-06-23 11:47:49 +02:00
Paul Vriens d8669f9e41 d3d9/tests: Use color_match ((logical || with non-zero constant). 2009-06-23 11:47:38 +02:00
Gerald Pfeifer 9b043744cd d3d9/tests: Fix three incorrect logic conditions. 2009-06-22 11:44:37 +02:00
Stefan Dösinger 2364ce08e5 d3d9: Add a SGN test. 2009-06-22 11:26:14 +02:00
Stefan Dösinger b93136e0c3 d3d9: Add an aL indexing test. 2009-06-22 11:26:07 +02:00
Henri Verbeet 1e0b1e5487 d3d9: Use color_match() in the fog test. 2009-06-19 13:52:56 +02:00
Stefan Doesinger f75dadfeb7 d3d9: Accept an alternative oFog->ps_3_0 handling. 2009-06-17 12:19:57 +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
Alexandre Julliard 2449eea0fd d3d9/tests: Skip CheckDeviceMultiSampleType test if not available. 2009-06-01 16:16:04 +02:00
Henri Verbeet 59268f7924 d3d9: Having a NULL rendertarget isn't a failure. 2009-05-29 11:26:50 +02:00
Louis Lenders 06936f04c0 wined3d: Fix CheckDeviceMultiSampleType when queried with D3DMULTISAMPLE_NONE. 2009-05-28 15:02:08 +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
Stefan Dösinger 6492622350 wined3d: sincos for vertex shaders.
SCS is unfortunately a fragment program only instruction. If we have the NV
extensions we can use SIN and COS. Otherwise we have to approximate sine and
cosine with a taylor series. Luckily we're provided with the necessary
constants by the application.
2009-05-27 11:56:53 +02:00
Louis Lenders f9b9f73991 d3d9/tests: Add simple test to show that QualityLevels is not zero, when we call CheckDeviceMultiSampleType with D3DMULTISAMPLE_NONE. 2009-05-27 11:55:04 +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
Austin English 68ccd08952 d3d9/tests: Sign compare fix. 2009-05-08 14:30:51 +02:00
Stefan Dösinger 31f5b01f9a wined3d: Add a point size test.
It shows that our current behavior (enabling coord_replace on all
units) is correct.
2009-05-08 12:17:04 +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