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
8633f7f1
Commit
8633f7f1
authored
Oct 22, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9/tests: Use create_device for test_swvp_buffer.
parent
d5b2e8af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
device.c
dlls/d3d9/tests/device.c
+11
-10
No files found.
dlls/d3d9/tests/device.c
View file @
8633f7f1
...
...
@@ -34,6 +34,7 @@ struct vec3
#define CREATE_DEVICE_FULLSCREEN 0x01
#define CREATE_DEVICE_NOWINDOWCHANGES 0x02
#define CREATE_DEVICE_FPU_PRESERVE 0x04
#define CREATE_DEVICE_SWVP_ONLY 0x08
struct
device_desc
{
...
...
@@ -150,6 +151,8 @@ static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND focus_window, cons
present_parameters
.
BackBufferHeight
=
desc
->
height
;
present_parameters
.
hDeviceWindow
=
desc
->
device_window
;
present_parameters
.
Windowed
=
!
(
desc
->
flags
&
CREATE_DEVICE_FULLSCREEN
);
if
(
desc
->
flags
&
CREATE_DEVICE_SWVP_ONLY
)
behavior_flags
=
D3DCREATE_SOFTWARE_VERTEXPROCESSING
;
if
(
desc
->
flags
&
CREATE_DEVICE_NOWINDOWCHANGES
)
behavior_flags
|=
D3DCREATE_NOWINDOWCHANGES
;
if
(
desc
->
flags
&
CREATE_DEVICE_FPU_PRESERVE
)
...
...
@@ -165,6 +168,8 @@ static IDirect3DDevice9 *create_device(IDirect3D9 *d3d9, HWND focus_window, cons
behavior_flags
,
&
present_parameters
,
&
device
)))
return
device
;
if
(
desc
&&
desc
->
flags
&
CREATE_DEVICE_SWVP_ONLY
)
return
NULL
;
behavior_flags
^=
(
D3DCREATE_HARDWARE_VERTEXPROCESSING
|
D3DCREATE_SOFTWARE_VERTEXPROCESSING
);
if
(
SUCCEEDED
(
IDirect3D9_CreateDevice
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
focus_window
,
...
...
@@ -7239,7 +7244,7 @@ static void test_swvp_buffer(void)
IDirect3DVertexBuffer9
*
buffer
;
static
const
unsigned
int
bufsize
=
1024
;
D3DVERTEXBUFFER_DESC
desc
;
D3DPRESENT_PARAMETERS
present_parameters
=
{
0
}
;
struct
device_desc
device_desc
;
struct
{
float
x
,
y
,
z
;
...
...
@@ -7250,15 +7255,11 @@ static void test_swvp_buffer(void)
d3d9
=
Direct3DCreate9
(
D3D_SDK_VERSION
);
ok
(
!!
d3d9
,
"Failed to create a D3D object.
\n
"
);
present_parameters
.
Windowed
=
TRUE
;
present_parameters
.
hDeviceWindow
=
window
;
present_parameters
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
present_parameters
.
BackBufferWidth
=
screen_width
;
present_parameters
.
BackBufferHeight
=
screen_height
;
present_parameters
.
BackBufferFormat
=
D3DFMT_A8R8G8B8
;
present_parameters
.
EnableAutoDepthStencil
=
FALSE
;
if
(
FAILED
(
IDirect3D9_CreateDevice
(
d3d9
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
present_parameters
,
&
device
)))
device_desc
.
device_window
=
window
;
device_desc
.
width
=
640
;
device_desc
.
height
=
480
;
device_desc
.
flags
=
CREATE_DEVICE_SWVP_ONLY
;
if
(
!
(
device
=
create_device
(
d3d9
,
window
,
&
device_desc
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
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