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
d9835f4d
Commit
d9835f4d
authored
Aug 14, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi/tests: Introduce create_window().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f4ae6f53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
dxgi.c
dlls/dxgi/tests/dxgi.c
+20
-13
No files found.
dlls/dxgi/tests/dxgi.c
View file @
d9835f4d
...
...
@@ -517,6 +517,16 @@ static void wait_vidpn_exclusive_ownership_(unsigned int line,
"Got unexpected status %#x, expected %#x.
\n
"
,
status
,
expected
);
}
static
HWND
create_window
(
void
)
{
RECT
r
=
{
0
,
0
,
640
,
480
};
AdjustWindowRect
(
&
r
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
FALSE
);
return
CreateWindowA
(
"static"
,
"dxgi_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
r
.
right
-
r
.
left
,
r
.
bottom
-
r
.
top
,
NULL
,
NULL
,
NULL
,
NULL
);
}
static
IDXGIAdapter
*
create_adapter
(
void
)
{
IDXGIFactory4
*
factory4
;
...
...
@@ -2446,8 +2456,8 @@ static void test_default_fullscreen_target_output(void)
hr
=
IDXGIAdapter_GetParent
(
adapter
,
&
IID_IDXGIFactory
,
(
void
**
)
&
factory
);
ok
(
SUCCEEDED
(
hr
),
"GetParent failed, hr %#x.
\n
"
,
hr
);
swapchain_desc
.
BufferDesc
.
Width
=
10
0
;
swapchain_desc
.
BufferDesc
.
Height
=
10
0
;
swapchain_desc
.
BufferDesc
.
Width
=
64
0
;
swapchain_desc
.
BufferDesc
.
Height
=
48
0
;
swapchain_desc
.
BufferDesc
.
RefreshRate
.
Numerator
=
60
;
swapchain_desc
.
BufferDesc
.
RefreshRate
.
Denominator
=
60
;
swapchain_desc
.
BufferDesc
.
Format
=
DXGI_FORMAT_R8G8B8A8_UNORM
;
...
...
@@ -2457,8 +2467,7 @@ static void test_default_fullscreen_target_output(void)
swapchain_desc
.
SampleDesc
.
Quality
=
0
;
swapchain_desc
.
BufferUsage
=
DXGI_USAGE_RENDER_TARGET_OUTPUT
;
swapchain_desc
.
BufferCount
=
1
;
swapchain_desc
.
OutputWindow
=
CreateWindowA
(
"static"
,
"dxgi_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
0
);
swapchain_desc
.
OutputWindow
=
create_window
();
swapchain_desc
.
Windowed
=
TRUE
;
swapchain_desc
.
SwapEffect
=
DXGI_SWAP_EFFECT_DISCARD
;
swapchain_desc
.
Flags
=
0
;
...
...
@@ -3488,8 +3497,7 @@ static void test_swapchain_resize(IUnknown *device, BOOL is_d3d12)
get_factory
(
device
,
is_d3d12
,
&
factory
);
window
=
CreateWindowA
(
"static"
,
"dxgi_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
window
=
create_window
();
ret
=
GetClientRect
(
window
,
&
client_rect
);
ok
(
ret
,
"Failed to get client rect.
\n
"
);
...
...
@@ -3861,8 +3869,7 @@ static void test_swapchain_parameters(void)
skip
(
"Failed to create device.
\n
"
);
return
;
}
window
=
CreateWindowA
(
"static"
,
"dxgi_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
window
=
create_window
();
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IUnknown
,
(
void
**
)
&
obj
);
ok
(
hr
==
S_OK
,
"IDXGIDevice does not implement IUnknown.
\n
"
);
...
...
@@ -4339,7 +4346,7 @@ static void test_swapchain_backbuffer_index(IUnknown *device, BOOL is_d3d12)
swapchain_desc
.
SampleDesc
.
Quality
=
0
;
swapchain_desc
.
BufferUsage
=
DXGI_USAGE_RENDER_TARGET_OUTPUT
;
swapchain_desc
.
BufferCount
=
4
;
swapchain_desc
.
OutputWindow
=
CreateWindowA
(
"static"
,
"dxgi_test"
,
0
,
0
,
0
,
400
,
200
,
0
,
0
,
0
,
0
);
swapchain_desc
.
OutputWindow
=
create_window
(
);
swapchain_desc
.
Windowed
=
TRUE
;
swapchain_desc
.
SwapEffect
=
DXGI_SWAP_EFFECT_DISCARD
;
swapchain_desc
.
Flags
=
0
;
...
...
@@ -4449,7 +4456,7 @@ static void test_swapchain_formats(IUnknown *device, BOOL is_d3d12)
swapchain_desc
.
SampleDesc
.
Quality
=
0
;
swapchain_desc
.
BufferUsage
=
DXGI_USAGE_RENDER_TARGET_OUTPUT
;
swapchain_desc
.
BufferCount
=
4
;
swapchain_desc
.
OutputWindow
=
CreateWindowA
(
"static"
,
"dxgi_test"
,
0
,
0
,
0
,
400
,
200
,
0
,
0
,
0
,
0
);
swapchain_desc
.
OutputWindow
=
create_window
(
);
swapchain_desc
.
Windowed
=
TRUE
;
swapchain_desc
.
Flags
=
0
;
...
...
@@ -5208,8 +5215,8 @@ static void test_gamma_control(void)
ok
(
hr
==
DXGI_ERROR_INVALID_CALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDXGIOutput_Release
(
output
);
swapchain_desc
.
BufferDesc
.
Width
=
80
0
;
swapchain_desc
.
BufferDesc
.
Height
=
60
0
;
swapchain_desc
.
BufferDesc
.
Width
=
64
0
;
swapchain_desc
.
BufferDesc
.
Height
=
48
0
;
swapchain_desc
.
BufferDesc
.
RefreshRate
.
Numerator
=
60
;
swapchain_desc
.
BufferDesc
.
RefreshRate
.
Denominator
=
60
;
swapchain_desc
.
BufferDesc
.
Format
=
DXGI_FORMAT_R8G8B8A8_UNORM
;
...
...
@@ -5219,7 +5226,7 @@ static void test_gamma_control(void)
swapchain_desc
.
SampleDesc
.
Quality
=
0
;
swapchain_desc
.
BufferUsage
=
DXGI_USAGE_RENDER_TARGET_OUTPUT
;
swapchain_desc
.
BufferCount
=
1
;
swapchain_desc
.
OutputWindow
=
CreateWindowA
(
"static"
,
"dxgi_test"
,
0
,
0
,
0
,
400
,
200
,
0
,
0
,
0
,
0
);
swapchain_desc
.
OutputWindow
=
create_window
(
);
swapchain_desc
.
Windowed
=
TRUE
;
swapchain_desc
.
SwapEffect
=
DXGI_SWAP_EFFECT_DISCARD
;
swapchain_desc
.
Flags
=
0
;
...
...
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