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
7fda67d7
Commit
7fda67d7
authored
Feb 02, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Move some helper functions up with the rest of the helper functions.
parent
98bd3ef8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
42 deletions
+42
-42
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+14
-14
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+14
-14
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+14
-14
No files found.
dlls/ddraw/tests/ddraw2.c
View file @
7fda67d7
...
...
@@ -95,6 +95,20 @@ static void destroy_window_thread(struct create_window_thread_param *p)
CloseHandle
(
p
->
thread
);
}
static
IDirectDrawSurface
*
get_depth_stencil
(
IDirect3DDevice2
*
device
)
{
IDirectDrawSurface
*
rt
,
*
ret
;
DDSCAPS
caps
=
{
DDSCAPS_ZBUFFER
};
HRESULT
hr
;
hr
=
IDirect3DDevice2_GetRenderTarget
(
device
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_GetAttachedSurface
(
rt
,
&
caps
,
&
ret
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NOTFOUND
,
"Failed to get the z buffer, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface_Release
(
rt
);
return
ret
;
}
static
D3DCOLOR
get_surface_color
(
IDirectDrawSurface
*
surface
,
UINT
x
,
UINT
y
)
{
RECT
rect
=
{
x
,
y
,
x
+
1
,
y
+
1
};
...
...
@@ -841,20 +855,6 @@ static void test_coop_level_threaded(void)
destroy_window_thread
(
&
p
);
}
static
IDirectDrawSurface
*
get_depth_stencil
(
IDirect3DDevice2
*
device
)
{
IDirectDrawSurface
*
rt
,
*
ret
;
DDSCAPS
caps
=
{
DDSCAPS_ZBUFFER
};
HRESULT
hr
;
hr
=
IDirect3DDevice2_GetRenderTarget
(
device
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface_GetAttachedSurface
(
rt
,
&
caps
,
&
ret
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NOTFOUND
,
"Failed to get the z buffer, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface_Release
(
rt
);
return
ret
;
}
static
void
test_depth_blit
(
void
)
{
static
D3DLVERTEX
quad1
[]
=
...
...
dlls/ddraw/tests/ddraw4.c
View file @
7fda67d7
...
...
@@ -130,6 +130,20 @@ static void destroy_window_thread(struct create_window_thread_param *p)
CloseHandle
(
p
->
thread
);
}
static
IDirectDrawSurface4
*
get_depth_stencil
(
IDirect3DDevice3
*
device
)
{
IDirectDrawSurface4
*
rt
,
*
ret
;
DDSCAPS2
caps
=
{
DDSCAPS_ZBUFFER
,
0
,
0
,
0
};
HRESULT
hr
;
hr
=
IDirect3DDevice3_GetRenderTarget
(
device
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_GetAttachedSurface
(
rt
,
&
caps
,
&
ret
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NOTFOUND
,
"Failed to get the z buffer, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface4_Release
(
rt
);
return
ret
;
}
static
D3DCOLOR
get_surface_color
(
IDirectDrawSurface4
*
surface
,
UINT
x
,
UINT
y
)
{
RECT
rect
=
{
x
,
y
,
x
+
1
,
y
+
1
};
...
...
@@ -1007,20 +1021,6 @@ static void test_coop_level_threaded(void)
destroy_window_thread
(
&
p
);
}
static
IDirectDrawSurface4
*
get_depth_stencil
(
IDirect3DDevice3
*
device
)
{
IDirectDrawSurface4
*
rt
,
*
ret
;
DDSCAPS2
caps
=
{
DDSCAPS_ZBUFFER
,
0
,
0
,
0
};
HRESULT
hr
;
hr
=
IDirect3DDevice3_GetRenderTarget
(
device
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_GetAttachedSurface
(
rt
,
&
caps
,
&
ret
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NOTFOUND
,
"Failed to get the z buffer, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface4_Release
(
rt
);
return
ret
;
}
static
void
test_depth_blit
(
void
)
{
static
struct
...
...
dlls/ddraw/tests/ddraw7.c
View file @
7fda67d7
...
...
@@ -139,6 +139,20 @@ static void destroy_window_thread(struct create_window_thread_param *p)
CloseHandle
(
p
->
thread
);
}
static
IDirectDrawSurface7
*
get_depth_stencil
(
IDirect3DDevice7
*
device
)
{
IDirectDrawSurface7
*
rt
,
*
ret
;
DDSCAPS2
caps
=
{
DDSCAPS_ZBUFFER
,
0
,
0
,
0
};
HRESULT
hr
;
hr
=
IDirect3DDevice7_GetRenderTarget
(
device
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
rt
,
&
caps
,
&
ret
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NOTFOUND
,
"Failed to get the z buffer, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface7_Release
(
rt
);
return
ret
;
}
static
D3DCOLOR
get_surface_color
(
IDirectDrawSurface7
*
surface
,
UINT
x
,
UINT
y
)
{
RECT
rect
=
{
x
,
y
,
x
+
1
,
y
+
1
};
...
...
@@ -946,20 +960,6 @@ static void test_coop_level_threaded(void)
destroy_window_thread
(
&
p
);
}
static
IDirectDrawSurface7
*
get_depth_stencil
(
IDirect3DDevice7
*
device
)
{
IDirectDrawSurface7
*
rt
,
*
ret
;
DDSCAPS2
caps
=
{
DDSCAPS_ZBUFFER
,
0
,
0
,
0
};
HRESULT
hr
;
hr
=
IDirect3DDevice7_GetRenderTarget
(
device
,
&
rt
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get the render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
rt
,
&
caps
,
&
ret
);
ok
(
SUCCEEDED
(
hr
)
||
hr
==
DDERR_NOTFOUND
,
"Failed to get the z buffer, hr %#x.
\n
"
,
hr
);
IDirectDrawSurface7_Release
(
rt
);
return
ret
;
}
static
void
test_depth_blit
(
void
)
{
IDirect3DDevice7
*
device
;
...
...
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