Commit Graph

1888 Commits

Author SHA1 Message Date
Frédéric Delanoy 3d30fb881a ddraw/tests: Use BOOL type where appropriate. 2013-10-10 10:44:40 +02:00
Michael Stefaniuc 0e681027a2 tests: Compile the tests by default with -D__WINESRC__. 2013-10-02 11:04:02 +02:00
Francois Gouget 0cc1c22d16 ddraw/tests: Fix compilation on systems that don't support nameless unions. 2013-10-01 10:56:28 +02:00
Henri Verbeet e02de5ff16 ddraw: Avoid VOID. 2013-09-23 20:38:18 +02:00
Henri Verbeet 31de4f1670 ddraw/tests: Add a test for render target surface capabilities. 2013-09-20 11:27:37 +02:00
Henri Verbeet 8aae165fc2 ddraw: Verify that the surface is not a depth buffer in SetRenderTarget().
This check is even more inconsistent between versions. Notice how the v2
interface is particularly broken because it never AddRef()'s the new iface.
This check also seems to be the original source for the questionable behaviour
in d3d_device_set_render_target() of storing the new iface before checking the
result of the wined3d_device_set_render_target(). (In particular,
SetRenderTargetTest() in tests/d3d.c tests for this behavious.)
2013-09-19 19:48:44 +02:00
Henri Verbeet c70376af63 ddraw: Verify that the surface is in video memory in SetRenderTarget().
This is where things become a bit of a mess, because the error checking is
inconsistent between versions.
2013-09-19 19:48:41 +02:00
Henri Verbeet ed92369316 ddraw: Verify that the surface is a render target in d3d_device_set_render_target(). 2013-09-19 19:48:35 +02:00
Henri Verbeet 2cc421f59d ddraw: Verify that surfaces with an indexed format have a palette attached in d3d_device_set_render_target(). 2013-09-18 13:11:21 +02:00
Henri Verbeet 4f89957161 ddraw: Verify that the surface is in video memory in d3d_device_create(). 2013-09-18 13:11:18 +02:00
Henri Verbeet c69cd599a3 ddraw: Verify that surfaces with an indexed format have a palette attached in d3d_device_create(). 2013-09-18 13:11:15 +02:00
Henri Verbeet d2d0c42b6d ddraw: Verify that the surface is a render target in d3d_device_create(). 2013-09-17 12:01:23 +02:00
Henri Verbeet 3fb53e21fb ddraw: Don't set render target / depth stencil usage on sysmem surfaces.
Setting render target usage on a P8 surface for example would fail surface
creation, while such surfaces can't be used for actual rendering anyway. Tests
confirm that surface creation is supposed to succeed for P8 surfaces with both
DDSCAPS_SYSTEMMEMORY and DDSCAPS_3DDEVICE set.
2013-09-17 12:01:21 +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
Francois Gouget 15b6ff2023 ddraw/tests: Fix compilation on systems that don't support nameless unions. 2013-09-13 00:17:58 +02:00
Henri Verbeet 3c6d11706f ddraw: Just set the render target to NULL in d3d_device_inner_Release().
The wined3d front buffer is not a render target.
2013-09-12 10:59:21 +02:00
Henri Verbeet 1a78667862 wined3d: Allow the first render target to be set to NULL.
Note that it still isn't necessarily safe to render in this case, because
there are places where we assume the first render target is always non-NULL in
order to determine e.g. framebuffer dimensions. It's now the responsibility of
the caller to ensure that doesn't happen.
2013-09-12 10:59:18 +02:00
Henri Verbeet 73a0327487 ddraw: Avoid LPBYTE. 2013-09-11 09:59:06 +02:00
Henri Verbeet 87ef65ab7b ddraw: Avoid LPVOID. 2013-09-11 09:59:04 +02:00
Henri Verbeet 9ccced6f41 ddraw: Get rid of get_config_key(). 2013-09-11 09:58:55 +02:00
Stefan Dösinger 20ce6bd102 ddraw/tests: Don't test transformed vertices with normals.
They crash the GPU driver of my r200 WinXP laptop, causing anything from
a BSOD to a frozen or black screen and sometimes incorrectly set
resolutions.
2013-09-09 22:10:01 +02:00
Stefan Dösinger b92928333b ddraw/tests: Test unsupported texture formats. 2013-09-06 17:25:08 +02:00
Stefan Dösinger f69ba15a92 ddraw/tests: Test blocked texture creation restrictions. 2013-09-06 17:25:08 +02:00
Stefan Dösinger 80638b6d2f wined3d: Enforce texturing capability format restrictions on resource creation. 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 22fc22d28b ddraw: Enumerate DXT2 and DXT4. 2013-09-05 17:56:24 +02:00
Stefan Dösinger b88daee3bc ddraw: Create managed pool textures.
The surfaces are already in WINED3D_POOL_MANAGED.
2013-09-05 17:56:17 +02:00
Stefan Dösinger 8da09ba196 ddraw/tests: Test DDCAPS2_TEXTUREMANAGE compatibility, with other flags. 2013-09-05 17:56:06 +02:00
Henri Verbeet 6f321ff2f9 ddraw: Don't imply WINED3DUSAGE_RENDERTARGET on primary surfaces.
If the application actually wants to do 3D rendering on the primary surface,
it should set DDSCAPS_3DDEVICE as well.
2013-09-05 13:18:23 +02:00
Stefan Dösinger 91fa7c07c9 ddraw/tests: Test WM_ACTIVATEAPP messages generated by SetCooperativeLevel. 2013-09-02 18:07:17 +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
Stefan Dösinger c0faf86fff ddraw: Fix double to float conversion warnings. 2013-08-01 20:43:42 +02:00
Alexandre Julliard cf8d7fbb6b ddraw/tests: Remove a todo from a test that succeeds. 2013-07-29 15:52:17 +02:00
Francois Gouget 67307a9cf1 ddraw/tests: Fix compilation on systems that don't support nameless unions. 2013-06-29 12:45:26 +02:00
Stefan Dösinger cf1e6a487a ddraw/tests: Get rid of D3DRENDERSTATE_LIGHTING hacks in ddraw4.c. 2013-06-20 22:14:36 +02:00
Stefan Dösinger 4b93cf707d ddraw/tests: Test lighting control in different interface versions. 2013-06-20 22:14:36 +02:00
Stefan Dösinger c1663c5583 ddraw: Device2 and Device3 do not have a lighting render state. 2013-06-20 22:14:36 +02:00
Stefan Dösinger 669611b4be ddraw: Send device2_Draw* through device3_Draw*. 2013-06-20 22:14:36 +02:00
Stefan Dösinger 05de3f8cee ddraw: SPECULARENABLE defaults to true in IDirect3DDevice2. 2013-06-20 22:14:36 +02:00
Stefan Dösinger 21491c8748 ddraw/tests: Add a test for fog_start == fog_end. 2013-06-19 20:09:53 +02:00
Henri Verbeet 4de77fa23f wined3d: Allow a custom pitch to be specified in wined3d_surface_set_mem(). 2013-06-14 11:46:20 +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 86eb211159 ddraw: Rename PixelFormat_DD2WineD3D() to wined3dformat_from_ddrawformat().
For consistency with the other D3D dlls.
2013-06-07 11:58:27 +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 831424ef83 ddraw/tests: Fix a typo. 2013-06-06 10:45:46 +02:00