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
82521353
Commit
82521353
authored
Apr 06, 2008
by
Rico Schüller
Committed by
Alexandre Julliard
Apr 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Make the shader test more precision tolerant.
parent
c6502064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
18 deletions
+36
-18
visual.c
dlls/d3d9/tests/visual.c
+36
-18
No files found.
dlls/d3d9/tests/visual.c
View file @
82521353
...
...
@@ -4801,31 +4801,37 @@ static void cnd_test(IDirect3DDevice9 *device)
color
=
getPixelColor
(
device
,
158
,
358
);
ok
(
color
==
0x00ffffff
,
"pixel 158, 358 has color %08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
162
,
358
);
ok
(
color
==
0x00000000
,
"pixel 162, 358 has color %08x, expected 0x00000000
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
<=
0x01
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 162, 358 has color %08x, expected 0x00000000
\n
"
,
color
);
color
=
getPixelColor
(
device
,
158
,
362
);
ok
(
color
==
0x00ffffff
,
"pixel 158, 362 has color %08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
162
,
362
);
ok
(
color
==
0x00000000
,
"pixel 162, 362 has color %08x, expected 0x00000000
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
<=
0x01
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 162, 362 has color %08x, expected 0x00000000
\n
"
,
color
);
/* 1.2 shader */
color
=
getPixelColor
(
device
,
478
,
358
);
ok
(
color
==
0x00ffffff
,
"pixel 478, 358 has color %08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
358
);
ok
(
color
==
0x00000000
,
"pixel 482, 358 has color %08x, expected 0x00000000
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
<=
0x01
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 358 has color %08x, expected 0x00000000
\n
"
,
color
);
color
=
getPixelColor
(
device
,
478
,
362
);
ok
(
color
==
0x00ffffff
,
"pixel 478, 362 has color %08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
362
);
ok
(
color
==
0x00000000
,
"pixel 482, 362 has color %08x, expected 0x00000000
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
<=
0x01
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 362 has color %08x, expected 0x00000000
\n
"
,
color
);
/* 1.3 shader */
color
=
getPixelColor
(
device
,
478
,
118
);
ok
(
color
==
0x00ffffff
,
"pixel 478, 118 has color %08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
118
);
ok
(
color
==
0x00000000
,
"pixel 482, 118 has color %08x, expected 0x00000000
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
<=
0x01
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 118 has color %08x, expected 0x00000000
\n
"
,
color
);
color
=
getPixelColor
(
device
,
478
,
122
);
ok
(
color
==
0x00ffffff
,
"pixel 478, 122 has color %08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
122
);
ok
(
color
==
0x00000000
,
"pixel 482, 122 has color %08x, expected 0x00000000
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
<=
0x01
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 122 has color %08x, expected 0x00000000
\n
"
,
color
);
hr
=
IDirect3DDevice9_Clear
(
device
,
0
,
NULL
,
D3DCLEAR_TARGET
,
0xff00ffff
,
0
.
0
,
0
);
ok
(
hr
==
D3D_OK
,
"IDirect3DDevice9_Clear returned %s
\n
"
,
DXGetErrorString9
(
hr
));
...
...
@@ -4878,33 +4884,45 @@ static void cnd_test(IDirect3DDevice9 *device)
/* 1.1 shader. coissue flag changed the semantic of cnd, c1 is always selected */
color
=
getPixelColor
(
device
,
158
,
358
);
ok
(
color
==
0x0000ff00
,
"pixel 158, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 158, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
162
,
358
);
ok
(
color
==
0x0000ff00
,
"pixel 162, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 162, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
158
,
362
);
ok
(
color
==
0x0000ff00
,
"pixel 158, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 158, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
162
,
362
);
ok
(
color
==
0x0000ff00
,
"pixel 162, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 162, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
/* 1.2 shader */
color
=
getPixelColor
(
device
,
478
,
358
);
ok
(
color
==
0x0000ff00
,
"pixel 478, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 478, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
358
);
ok
(
color
==
0x0000ff00
,
"pixel 482, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 358 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
478
,
362
);
ok
(
color
==
0x0000ff00
,
"pixel 478, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 478, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
362
);
ok
(
color
==
0x0000ff00
,
"pixel 482, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 362 has color %08x, expected 0x0000ff00
\n
"
,
color
);
/* 1.3 shader */
color
=
getPixelColor
(
device
,
478
,
118
);
ok
(
color
==
0x0000ff00
,
"pixel 478, 118 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 478, 118 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
118
);
ok
(
color
==
0x0000ff00
,
"pixel 482, 118 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 118 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
478
,
122
);
ok
(
color
==
0x0000ff00
,
"pixel 478, 122 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 478, 122 has color %08x, expected 0x0000ff00
\n
"
,
color
);
color
=
getPixelColor
(
device
,
482
,
122
);
ok
(
color
==
0x0000ff00
,
"pixel 482, 122 has color %08x, expected 0x0000ff00
\n
"
,
color
);
ok
(
(((
color
&
0x00ff0000
)
>>
16
)
<=
0x01
)
&&
(((
color
&
0x0000ff00
)
>>
8
)
==
0xff
)
&&
((
color
&
0x000000ff
)
<=
0x01
),
"pixel 482, 122 has color %08x, expected 0x0000ff00
\n
"
,
color
);
IDirect3DPixelShader9_Release
(
shader_14_coissue
);
IDirect3DPixelShader9_Release
(
shader_13_coissue
);
...
...
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