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
94f20a6f
Commit
94f20a6f
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
d3d8/tests: Use create_device in test_swvp_buffer.
parent
1ae02b92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
device.c
dlls/d3d8/tests/device.c
+11
-10
No files found.
dlls/d3d8/tests/device.c
View file @
94f20a6f
...
...
@@ -33,6 +33,7 @@ struct vec3
#define CREATE_DEVICE_FULLSCREEN 0x01
#define CREATE_DEVICE_FPU_PRESERVE 0x02
#define CREATE_DEVICE_SWVP_ONLY 0x04
struct
device_desc
{
...
...
@@ -110,6 +111,8 @@ static IDirect3DDevice8 *create_device(IDirect3D8 *d3d8, 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_FPU_PRESERVE
)
behavior_flags
|=
D3DCREATE_FPU_PRESERVE
;
}
...
...
@@ -123,6 +126,8 @@ static IDirect3DDevice8 *create_device(IDirect3D8 *d3d8, 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
(
IDirect3D8_CreateDevice
(
d3d8
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
focus_window
,
...
...
@@ -4758,7 +4763,7 @@ static void test_swvp_buffer(void)
IDirect3DVertexBuffer8
*
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
;
...
...
@@ -4769,15 +4774,11 @@ static void test_swvp_buffer(void)
d3d8
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
ok
(
!!
d3d8
,
"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
(
IDirect3D8_CreateDevice
(
d3d8
,
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
(
d3d8
,
window
,
&
device_desc
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
IDirect3D8_Release
(
d3d8
);
...
...
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