Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
12a99309
Commit
12a99309
authored
13 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3d9/tests: Add a small test for multisampled GetRenderTargetData().
parent
fd1afd24
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/d3d9/tests/visual.c
+51
-0
51 additions, 0 deletions
dlls/d3d9/tests/visual.c
with
51 additions
and
0 deletions
dlls/d3d9/tests/visual.c
+
51
−
0
View file @
12a99309
...
...
@@ -12607,6 +12607,56 @@ static void update_surface_test(IDirect3DDevice9 *device)
IDirect3DTexture9_Release(src_tex);
}
static void multisample_get_rtdata_test(IDirect3DDevice9 *device)
{
IDirect3DSurface9 *original_ds, *original_rt, *rt, *readback;
IDirect3D9 *d3d9;
HRESULT hr;
hr = IDirect3DDevice9_GetDirect3D(device, &d3d9);
ok(SUCCEEDED(hr), "Failed to get d3d9 interface, hr %#x.\n", hr);
hr = IDirect3D9_CheckDeviceMultiSampleType(d3d9, D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, NULL);
IDirect3D9_Release(d3d9);
if (FAILED(hr))
{
skip("Multisampling not supported for D3DFMT_A8R8G8B8, skipping multisampled CopyRects test.\n");
return;
}
hr = IDirect3DDevice9_CreateRenderTarget(device, 256, 256, D3DFMT_A8R8G8B8,
D3DMULTISAMPLE_2_SAMPLES, 0, FALSE, &rt, NULL);
ok(SUCCEEDED(hr), "Failed to create render target, hr %#x.\n", hr);
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 256, 256, D3DFMT_A8R8G8B8,
D3DPOOL_SYSTEMMEM, &readback, NULL);
ok(SUCCEEDED(hr), "Failed to create readback surface, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetRenderTarget(device, 0, &original_rt);
ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetDepthStencilSurface(device, &original_ds);
ok(SUCCEEDED(hr), "Failed to get depth/stencil, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderTarget(device, 0, rt);
ok(SUCCEEDED(hr), "Failed to set render target, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetDepthStencilSurface(device, NULL);
ok(SUCCEEDED(hr), "Failed to set depth/stencil, hr %#x.\n", hr);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0, 0);
ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetRenderTargetData(device, rt, readback);
todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetDepthStencilSurface(device, original_ds);
ok(SUCCEEDED(hr), "Failed to set depth/stencil, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderTarget(device, 0, original_rt);
ok(SUCCEEDED(hr), "Failed to restore original render target, hr %#x.\n", hr);
IDirect3DSurface9_Release(original_ds);
IDirect3DSurface9_Release(original_rt);
IDirect3DSurface9_Release(readback);
IDirect3DSurface9_Release(rt);
}
START_TEST(visual)
{
IDirect3DDevice9 *device_ptr;
...
...
@@ -12781,6 +12831,7 @@ START_TEST(visual)
srgbwrite_format_test(device_ptr);
clip_planes_test(device_ptr);
update_surface_test(device_ptr);
multisample_get_rtdata_test(device_ptr);
cleanup:
if(device_ptr) {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment