Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
148d6e3c
Commit
148d6e3c
authored
Mar 04, 2015
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Actually test some return values (PVS-Studio).
parent
51e3750f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+2
-0
device.c
dlls/d3d9/tests/device.c
+3
-0
visual.c
dlls/d3d9/tests/visual.c
+3
-0
No files found.
dlls/d3d9/tests/d3d9ex.c
View file @
148d6e3c
...
...
@@ -738,6 +738,7 @@ static void test_user_memory(void)
ok
(
locked_rect
.
Pitch
==
128
*
4
,
"Got unexpected pitch %d.
\n
"
,
locked_rect
.
Pitch
);
ok
(
locked_rect
.
pBits
==
mem
,
"Got unexpected pBits %p, expected %p.
\n
"
,
locked_rect
.
pBits
,
mem
);
hr
=
IDirect3DSurface9_UnlockRect
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock surface, hr %#x.
\n
"
,
hr
);
IDirect3DSurface9_Release
(
surface
);
hr
=
IDirect3DDevice9Ex_CreateOffscreenPlainSurfaceEx
(
device
,
128
,
128
,
D3DFMT_A8R8G8B8
,
...
...
@@ -750,6 +751,7 @@ static void test_user_memory(void)
ok
(
locked_rect
.
Pitch
==
128
*
4
,
"Got unexpected pitch %d.
\n
"
,
locked_rect
.
Pitch
);
ok
(
locked_rect
.
pBits
==
mem
,
"Got unexpected pBits %p, expected %p.
\n
"
,
locked_rect
.
pBits
,
mem
);
hr
=
IDirect3DSurface9_UnlockRect
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock surface, hr %#x.
\n
"
,
hr
);
IDirect3DSurface9_Release
(
surface
);
}
...
...
dlls/d3d9/tests/device.c
View file @
148d6e3c
...
...
@@ -1081,6 +1081,7 @@ static void test_swapchain(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to get the implicit swapchain (%08x)
\n
"
,
hr
);
/* Check if the back buffer count was modified */
hr
=
IDirect3DSwapChain9_GetPresentParameters
(
swapchain0
,
&
d3dpp
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get present parameters, hr %#x.
\n
"
,
hr
);
ok
(
d3dpp
.
BackBufferCount
==
1
,
"Got unexpected back buffer count %u.
\n
"
,
d3dpp
.
BackBufferCount
);
IDirect3DSwapChain9_Release
(
swapchain0
);
...
...
@@ -8821,6 +8822,7 @@ static void test_volume_blocks(void)
{
hr
=
IDirect3DDevice9_CreateVolumeTexture
(
device
,
formats
[
i
].
block_width
,
formats
[
i
].
block_height
,
2
,
2
,
0
,
formats
[
i
].
fmt
,
D3DPOOL_SCRATCH
,
&
texture
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create volume texture, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DVolumeTexture9_LockBox
(
texture
,
1
,
&
locked_box
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock volume texture mipmap, hr %#x.
\n
"
,
hr
);
...
...
@@ -9728,6 +9730,7 @@ static void test_resource_type(void)
{
hr
=
IDirect3DDevice9_CreateVolumeTexture
(
device
,
2
,
4
,
8
,
4
,
0
,
D3DFMT_X8R8G8B8
,
D3DPOOL_SYSTEMMEM
,
&
volume_texture
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create volume texture, hr %#x.
\n
"
,
hr
);
type
=
IDirect3DVolumeTexture9_GetType
(
volume_texture
);
ok
(
type
==
D3DRTYPE_VOLUMETEXTURE
,
"Expected type D3DRTYPE_VOLUMETEXTURE, got %u.
\n
"
,
type
);
...
...
dlls/d3d9/tests/visual.c
View file @
148d6e3c
...
...
@@ -12095,6 +12095,7 @@ static void loop_index_test(void)
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_SetVertexShaderConstantI returned %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_BeginScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to begin scene, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_DrawPrimitiveUP
(
device
,
D3DPT_TRIANGLESTRIP
,
2
,
quad
,
3
*
sizeof
(
float
));
ok
(
SUCCEEDED
(
hr
),
"Failed to draw, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_EndScene
(
device
);
...
...
@@ -14793,6 +14794,7 @@ static void multisampled_depth_buffer_test(void)
IDirect3DSurface9_Release
(
ds
);
hr
=
IDirect3DDevice9_CreateDepthStencilSurface
(
device
,
640
,
480
,
D3DFMT_D24S8
,
D3DMULTISAMPLE_2_SAMPLES
,
0
,
TRUE
,
&
ds
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create depth/stencil, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_SetDepthStencilSurface
(
device
,
ds
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set depth/stencil, hr %#x.
\n
"
,
hr
);
...
...
@@ -15074,6 +15076,7 @@ static void resz_test(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to create render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_CreateDepthStencilSurface
(
device
,
640
,
480
,
D3DFMT_D24S8
,
D3DMULTISAMPLE_2_SAMPLES
,
0
,
TRUE
,
&
ds
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create depth/stencil, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_CreateRenderTarget
(
device
,
640
,
480
,
D3DFMT_A8R8G8B8
,
D3DMULTISAMPLE_NONE
,
0
,
TRUE
,
&
readback
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create readback surface, hr %#x.
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment