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
3eb60453
Commit
3eb60453
authored
Mar 12, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Use hardware VP only if available in the visual tests.
parent
f3944378
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
visual.c
dlls/ddraw/tests/visual.c
+19
-2
No files found.
dlls/ddraw/tests/visual.c
View file @
3eb60453
...
@@ -64,6 +64,17 @@ static HRESULT WINAPI enum_z_fmt(DDPIXELFORMAT *fmt, void *ctx)
...
@@ -64,6 +64,17 @@ static HRESULT WINAPI enum_z_fmt(DDPIXELFORMAT *fmt, void *ctx)
return
DDENUMRET_OK
;
return
DDENUMRET_OK
;
}
}
static
HRESULT
WINAPI
enum_devtype_cb
(
char
*
desc_str
,
char
*
name
,
D3DDEVICEDESC7
*
desc
,
void
*
ctx
)
{
BOOL
*
hal_ok
=
ctx
;
if
(
IsEqualGUID
(
&
desc
->
deviceGUID
,
&
IID_IDirect3DTnLHalDevice
))
{
*
hal_ok
=
TRUE
;
return
DDENUMRET_CANCEL
;
}
return
DDENUMRET_OK
;
}
static
BOOL
createObjects
(
void
)
static
BOOL
createObjects
(
void
)
{
{
HRESULT
hr
;
HRESULT
hr
;
...
@@ -71,6 +82,8 @@ static BOOL createObjects(void)
...
@@ -71,6 +82,8 @@ static BOOL createObjects(void)
WNDCLASS
wc
=
{
0
};
WNDCLASS
wc
=
{
0
};
DDSURFACEDESC2
ddsd
;
DDSURFACEDESC2
ddsd
;
DDPIXELFORMAT
zfmt
;
DDPIXELFORMAT
zfmt
;
BOOL
hal_ok
=
FALSE
;
const
GUID
*
devtype
=
&
IID_IDirect3DHALDevice
;
if
(
!
hmod
)
return
FALSE
;
if
(
!
hmod
)
return
FALSE
;
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
pDirectDrawCreateEx
=
(
void
*
)
GetProcAddress
(
hmod
,
"DirectDrawCreateEx"
);
...
@@ -116,8 +129,12 @@ static BOOL createObjects(void)
...
@@ -116,8 +129,12 @@ static BOOL createObjects(void)
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
Surface
,
NULL
);
hr
=
IDirectDraw7_CreateSurface
(
DirectDraw
,
&
ddsd
,
&
Surface
,
NULL
);
if
(
FAILED
(
hr
))
goto
err
;
if
(
FAILED
(
hr
))
goto
err
;
hr
=
IDirect3D7_EnumDevices
(
Direct3D
,
enum_devtype_cb
,
&
hal_ok
);
ok
(
SUCCEEDED
(
hr
),
"Failed to enumerate devices, hr %#x.
\n
"
,
hr
);
if
(
hal_ok
)
devtype
=
&
IID_IDirect3DTnLHalDevice
;
memset
(
&
zfmt
,
0
,
sizeof
(
zfmt
));
memset
(
&
zfmt
,
0
,
sizeof
(
zfmt
));
hr
=
IDirect3D7_EnumZBufferFormats
(
Direct3D
,
&
IID_IDirect3DTnLHalDevic
e
,
enum_z_fmt
,
&
zfmt
);
hr
=
IDirect3D7_EnumZBufferFormats
(
Direct3D
,
devtyp
e
,
enum_z_fmt
,
&
zfmt
);
if
(
FAILED
(
hr
))
goto
err
;
if
(
FAILED
(
hr
))
goto
err
;
if
(
zfmt
.
dwSize
==
0
)
goto
err
;
if
(
zfmt
.
dwSize
==
0
)
goto
err
;
...
@@ -136,7 +153,7 @@ static BOOL createObjects(void)
...
@@ -136,7 +153,7 @@ static BOOL createObjects(void)
ok
(
SUCCEEDED
(
hr
),
"AddAttachedSurface failed, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"AddAttachedSurface failed, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
err
;
if
(
FAILED
(
hr
))
goto
err
;
hr
=
IDirect3D7_CreateDevice
(
Direct3D
,
&
IID_IDirect3DTnLHalDevic
e
,
Surface
,
&
Direct3DDevice
);
hr
=
IDirect3D7_CreateDevice
(
Direct3D
,
devtyp
e
,
Surface
,
&
Direct3DDevice
);
if
(
FAILED
(
hr
)
||
!
Direct3DDevice
)
goto
err
;
if
(
FAILED
(
hr
)
||
!
Direct3DDevice
)
goto
err
;
return
TRUE
;
return
TRUE
;
...
...
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