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
45ea10c7
Commit
45ea10c7
authored
Dec 24, 2023
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jan 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Test the presentation parameters after creating a device.
parent
beefff00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
0 deletions
+69
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+34
-0
device.c
dlls/d3d9/tests/device.c
+35
-0
No files found.
dlls/d3d9/tests/d3d9ex.c
View file @
45ea10c7
...
@@ -3686,6 +3686,7 @@ static void test_swapchain_parameters(void)
...
@@ -3686,6 +3686,7 @@ static void test_swapchain_parameters(void)
{
{
IDirect3DDevice9Ex
*
device
;
IDirect3DDevice9Ex
*
device
;
IDirect3D9Ex
*
d3d9ex
;
IDirect3D9Ex
*
d3d9ex
;
RECT
client_rect
;
HWND
window
;
HWND
window
;
HRESULT
hr
;
HRESULT
hr
;
unsigned
int
i
;
unsigned
int
i
;
...
@@ -3837,6 +3838,39 @@ static void test_swapchain_parameters(void)
...
@@ -3837,6 +3838,39 @@ static void test_swapchain_parameters(void)
IDirect3DDevice9Ex_Release
(
device
);
IDirect3DDevice9Ex_Release
(
device
);
}
}
memset
(
&
present_parameters
,
0
,
sizeof
(
present_parameters
));
present_parameters
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
present_parameters
.
Windowed
=
TRUE
;
present_parameters
.
BackBufferWidth
=
0
;
present_parameters
.
BackBufferHeight
=
0
;
present_parameters
.
BackBufferFormat
=
D3DFMT_UNKNOWN
;
GetClientRect
(
window
,
&
client_rect
);
hr
=
IDirect3D9Ex_CreateDeviceEx
(
d3d9ex
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
present_parameters
,
NULL
,
&
device
);
todo_wine
ok
(
present_parameters
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferWidth
,
client_rect
.
right
);
todo_wine
ok
(
present_parameters
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferHeight
,
client_rect
.
bottom
);
todo_wine
ok
(
present_parameters
.
BackBufferFormat
!=
D3DFMT_UNKNOWN
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
present_parameters
.
BackBufferFormat
);
ok
(
present_parameters
.
BackBufferCount
==
1
,
"Got unexpected BackBufferCount %u.
\n
"
,
present_parameters
.
BackBufferCount
);
ok
(
!
present_parameters
.
MultiSampleType
,
"Got unexpected MultiSampleType %u.
\n
"
,
present_parameters
.
MultiSampleType
);
ok
(
!
present_parameters
.
MultiSampleQuality
,
"Got unexpected MultiSampleQuality %lu.
\n
"
,
present_parameters
.
MultiSampleQuality
);
ok
(
present_parameters
.
SwapEffect
==
D3DSWAPEFFECT_DISCARD
,
"Got unexpected SwapEffect %#x.
\n
"
,
present_parameters
.
SwapEffect
);
ok
(
!
present_parameters
.
hDeviceWindow
,
"Got unexpected hDeviceWindow %p.
\n
"
,
present_parameters
.
hDeviceWindow
);
ok
(
present_parameters
.
Windowed
,
"Got unexpected Windowed %#x.
\n
"
,
present_parameters
.
Windowed
);
ok
(
!
present_parameters
.
EnableAutoDepthStencil
,
"Got unexpected EnableAutoDepthStencil %#x.
\n
"
,
present_parameters
.
EnableAutoDepthStencil
);
ok
(
!
present_parameters
.
AutoDepthStencilFormat
,
"Got unexpected AutoDepthStencilFormat %#x.
\n
"
,
present_parameters
.
AutoDepthStencilFormat
);
ok
(
!
present_parameters
.
Flags
,
"Got unexpected Flags %#lx.
\n
"
,
present_parameters
.
Flags
);
ok
(
!
present_parameters
.
FullScreen_RefreshRateInHz
,
"Got unexpected FullScreen_RefreshRateInHz %u.
\n
"
,
present_parameters
.
FullScreen_RefreshRateInHz
);
ok
(
!
present_parameters
.
PresentationInterval
,
"Got unexpected PresentationInterval %#x.
\n
"
,
present_parameters
.
PresentationInterval
);
IDirect3DDevice9Ex_Release
(
device
);
IDirect3D9Ex_Release
(
d3d9ex
);
IDirect3D9Ex_Release
(
d3d9ex
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
}
}
...
...
dlls/d3d9/tests/device.c
View file @
45ea10c7
...
@@ -12296,6 +12296,7 @@ static void test_swapchain_parameters(void)
...
@@ -12296,6 +12296,7 @@ static void test_swapchain_parameters(void)
{
{
IDirect3DDevice9
*
device
;
IDirect3DDevice9
*
device
;
HRESULT
hr
,
expected_hr
;
HRESULT
hr
,
expected_hr
;
RECT
client_rect
;
IDirect3D9
*
d3d
;
IDirect3D9
*
d3d
;
D3DCAPS9
caps
;
D3DCAPS9
caps
;
HWND
window
;
HWND
window
;
...
@@ -12493,6 +12494,40 @@ static void test_swapchain_parameters(void)
...
@@ -12493,6 +12494,40 @@ static void test_swapchain_parameters(void)
IDirect3DDevice9_Release
(
device
);
IDirect3DDevice9_Release
(
device
);
}
}
memset
(
&
present_parameters
,
0
,
sizeof
(
present_parameters
));
present_parameters
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
present_parameters
.
Windowed
=
TRUE
;
present_parameters
.
BackBufferWidth
=
0
;
present_parameters
.
BackBufferHeight
=
0
;
present_parameters
.
BackBufferFormat
=
D3DFMT_UNKNOWN
;
GetClientRect
(
window
,
&
client_rect
);
hr
=
IDirect3D9_CreateDevice
(
d3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
present_parameters
,
&
device
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
present_parameters
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferWidth
,
client_rect
.
right
);
todo_wine
ok
(
present_parameters
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferHeight
,
client_rect
.
bottom
);
todo_wine
ok
(
present_parameters
.
BackBufferFormat
!=
D3DFMT_UNKNOWN
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
present_parameters
.
BackBufferFormat
);
ok
(
present_parameters
.
BackBufferCount
==
1
,
"Got unexpected BackBufferCount %u.
\n
"
,
present_parameters
.
BackBufferCount
);
ok
(
!
present_parameters
.
MultiSampleType
,
"Got unexpected MultiSampleType %u.
\n
"
,
present_parameters
.
MultiSampleType
);
ok
(
!
present_parameters
.
MultiSampleQuality
,
"Got unexpected MultiSampleQuality %lu.
\n
"
,
present_parameters
.
MultiSampleQuality
);
ok
(
present_parameters
.
SwapEffect
==
D3DSWAPEFFECT_DISCARD
,
"Got unexpected SwapEffect %#x.
\n
"
,
present_parameters
.
SwapEffect
);
ok
(
!
present_parameters
.
hDeviceWindow
,
"Got unexpected hDeviceWindow %p.
\n
"
,
present_parameters
.
hDeviceWindow
);
ok
(
present_parameters
.
Windowed
,
"Got unexpected Windowed %#x.
\n
"
,
present_parameters
.
Windowed
);
ok
(
!
present_parameters
.
EnableAutoDepthStencil
,
"Got unexpected EnableAutoDepthStencil %#x.
\n
"
,
present_parameters
.
EnableAutoDepthStencil
);
ok
(
!
present_parameters
.
AutoDepthStencilFormat
,
"Got unexpected AutoDepthStencilFormat %#x.
\n
"
,
present_parameters
.
AutoDepthStencilFormat
);
ok
(
!
present_parameters
.
Flags
,
"Got unexpected Flags %#lx.
\n
"
,
present_parameters
.
Flags
);
ok
(
!
present_parameters
.
FullScreen_RefreshRateInHz
,
"Got unexpected FullScreen_RefreshRateInHz %u.
\n
"
,
present_parameters
.
FullScreen_RefreshRateInHz
);
ok
(
!
present_parameters
.
PresentationInterval
,
"Got unexpected PresentationInterval %#x.
\n
"
,
present_parameters
.
PresentationInterval
);
IDirect3DDevice9_Release
(
device
);
IDirect3D9_Release
(
d3d
);
IDirect3D9_Release
(
d3d
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
}
}
...
...
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