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
b060390c
Commit
b060390c
authored
Dec 08, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: The refrast returns an error on invalid clear rects.
parent
5461d505
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
visual.c
dlls/d3d9/tests/visual.c
+14
-5
No files found.
dlls/d3d9/tests/visual.c
View file @
b060390c
...
...
@@ -279,6 +279,7 @@ static void clear_test(IDirect3DDevice9 *device)
D3DVIEWPORT9
old_vp
,
vp
;
RECT
scissor
;
DWORD
oldColorWrite
;
BOOL
invalid_clear_failed
=
FALSE
;
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xffffffff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
...
...
@@ -294,11 +295,12 @@ static void clear_test(IDirect3DDevice9 *device)
rect
[
1
].
y1
=
0
;
rect
[
1
].
x2
=
320
;
rect
[
1
].
y2
=
240
;
/* Clear 2 rectangles with one call.
Shows that a positive value is returned, but the negative rectangle
*
is ignored, the positive is still cleared afterwards
/* Clear 2 rectangles with one call.
The refrast returns an error in this case, every real driver tested so far
*
returns D3D_OK, but ignores the rectangle silently
*/
hr
=
IDirect3DDevice9_Clear
(
device
,
2
,
rect
,
D3DCLEAR_TARGET
,
0xffff0000
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
ok
(
hr
==
D3D_OK
||
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DDevice9_Clear failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
if
(
hr
==
D3DERR_INVALIDCALL
)
invalid_clear_failed
=
TRUE
;
/* negative x, negative y */
rect_negneg
.
x1
=
640
;
...
...
@@ -306,14 +308,21 @@ static void clear_test(IDirect3DDevice9 *device)
rect_negneg
.
x2
=
320
;
rect_negneg
.
y2
=
0
;
hr
=
IDirect3DDevice9_Clear
(
device
,
1
,
&
rect_negneg
,
D3DCLEAR_TARGET
,
0xff00ff00
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
ok
(
hr
==
D3D_OK
||
hr
==
D3DERR_INVALIDCALL
,
"IDirect3DDevice9_Clear failed with %s
\n
"
,
DXGetErrorString9
(
hr
));
if
(
hr
==
D3DERR_INVALIDCALL
)
invalid_clear_failed
=
TRUE
;
IDirect3DDevice9_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
color
=
getPixelColor
(
device
,
160
,
360
);
/* lower left quad */
ok
(
color
==
0x00ffffff
,
"Clear rectangle 3(pos, neg) has color %08x
\n
"
,
color
);
color
=
getPixelColor
(
device
,
160
,
120
);
/* upper left quad */
ok
(
color
==
0x00ff0000
,
"Clear rectangle 1(pos, pos) has color %08x
\n
"
,
color
);
if
(
invalid_clear_failed
)
{
/* If the negative rectangle was refused, the other rectangles in the list shouldn't be cleared either */
ok
(
color
==
0x00ffffff
,
"Clear rectangle 1(pos, pos) has color %08x
\n
"
,
color
);
}
else
{
/* If the negative rectangle was dropped silently, the correct ones are cleared */
ok
(
color
==
0x00ff0000
,
"Clear rectangle 1(pos, pos) has color %08x
\n
"
,
color
);
}
color
=
getPixelColor
(
device
,
480
,
360
);
/* lower right quad */
ok
(
color
==
0x00ffffff
,
"Clear rectangle 4(NULL) has color %08x
\n
"
,
color
);
color
=
getPixelColor
(
device
,
480
,
120
);
/* upper right quad */
...
...
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