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
ffb38da0
Commit
ffb38da0
authored
Aug 19, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Try to force a top-left filling convention.
parent
92b66ac8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
visual.c
dlls/d3d9/tests/visual.c
+3
-3
state.c
dlls/wined3d/state.c
+23
-10
No files found.
dlls/d3d9/tests/visual.c
View file @
ffb38da0
...
...
@@ -8526,7 +8526,7 @@ static void pointsize_test(IDirect3DDevice9 *device)
color
=
getPixelColor
(
device
,
64
-
9
,
64
-
9
);
ok
(
color
==
0x000000ff
,
"pSize: Pixel (64-9),(64-9) has color 0x%08x, expected 0x000000ff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
64
-
8
,
64
-
8
);
todo_wine
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (64-8),(64-8) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (64-8),(64-8) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
64
-
7
,
64
-
7
);
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (64-7),(64-7) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
64
+
7
,
64
+
7
);
...
...
@@ -8539,7 +8539,7 @@ static void pointsize_test(IDirect3DDevice9 *device)
color
=
getPixelColor
(
device
,
128
-
17
,
64
-
17
);
ok
(
color
==
0x000000ff
,
"pSize: Pixel (128-17),(64-17) has color 0x%08x, expected 0x000000ff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
128
-
16
,
64
-
16
);
todo_wine
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (128-16),(64-16) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (128-16),(64-16) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
128
-
15
,
64
-
15
);
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (128-15),(64-15) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
128
+
15
,
64
+
15
);
...
...
@@ -8552,7 +8552,7 @@ static void pointsize_test(IDirect3DDevice9 *device)
color
=
getPixelColor
(
device
,
192
-
17
,
64
-
17
);
ok
(
color
==
0x000000ff
,
"pSize: Pixel (192-17),(64-17) has color 0x%08x, expected 0x000000ff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
192
-
16
,
64
-
16
);
ok
(
color
==
0x000000ff
,
"pSize: Pixel (192-16),(64-16) has color 0x%08x, expected 0x000000ff
\n
"
,
color
);
todo_wine
ok
(
color
==
0x000000ff
,
"pSize: Pixel (192-16),(64-16) has color 0x%08x, expected 0x000000ff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
192
-
15
,
64
-
15
);
ok
(
color
==
0x00ffffff
,
"pSize: Pixel (192-15),(64-15) has color 0x%08x, expected 0x00ffffff
\n
"
,
color
);
color
=
getPixelColor
(
device
,
192
+
15
,
64
+
15
);
...
...
dlls/wined3d/state.c
View file @
ffb38da0
...
...
@@ -3833,8 +3833,9 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
checkGLcall
(
"glOrtho"
);
/* Window Coord 0 is the middle of the first pixel, so translate by 1/2 pixels */
glTranslatef
(
0
.
5
f
,
0
.
5
f
,
0
.
0
f
);
checkGLcall
(
"glTranslatef(0.5f, 0.5f, 0.0f)"
);
glTranslatef
(
63
.
0
f
/
128
.
0
f
,
63
.
0
f
/
128
.
0
f
,
0
.
0
f
);
checkGLcall
(
"glTranslatef(63.0f / 128.0f, 63.0f / 128.0f, 0.0f)"
);
/* D3D texture coordinates are flipped compared to OpenGL ones, so
* render everything upside down when rendering offscreen. */
if
(
context
->
render_offscreen
)
...
...
@@ -3880,16 +3881,23 @@ static void transform_projection(DWORD state, IWineD3DStateBlockImpl *stateblock
* glScalef(1.0, flip, 2.0);
*/
/* Translate by slightly less than a half pixel to force a top-left
* filling convention. We want the difference to be large enough that
* it doesn't get lost due to rounding inside the driver, but small
* enough to prevent it from interfering with any anti-aliasing. */
GLfloat
xoffset
=
(
63
.
0
f
/
64
.
0
f
)
/
stateblock
->
viewport
.
Width
;
GLfloat
yoffset
=
-
(
63
.
0
f
/
64
.
0
f
)
/
stateblock
->
viewport
.
Height
;
if
(
context
->
render_offscreen
)
{
/* D3D texture coordinates are flipped compared to OpenGL ones, so
* render everything upside down when rendering offscreen. */
glTranslatef
(
1
.
0
f
/
stateblock
->
viewport
.
Width
,
1
.
0
f
/
stateblock
->
viewport
.
Heigh
t
,
-
1
.
0
f
);
checkGLcall
(
"glTranslatef(
1.0f / width, 1.0f / heigh
t, -1.0f)"
);
glTranslatef
(
xoffset
,
-
yoffse
t
,
-
1
.
0
f
);
checkGLcall
(
"glTranslatef(
xoffset, -yoffse
t, -1.0f)"
);
glScalef
(
1
.
0
f
,
-
1
.
0
f
,
2
.
0
f
);
}
else
{
glTranslatef
(
1
.
0
f
/
stateblock
->
viewport
.
Width
,
-
1
.
0
f
/
stateblock
->
viewport
.
Heigh
t
,
-
1
.
0
f
);
checkGLcall
(
"glTranslatef(
1.0f / width, -1.0f / heigh
t, -1.0f)"
);
glTranslatef
(
xoffset
,
yoffse
t
,
-
1
.
0
f
);
checkGLcall
(
"glTranslatef(
xoffset, yoffse
t, -1.0f)"
);
glScalef
(
1
.
0
f
,
1
.
0
f
,
2
.
0
f
);
}
checkGLcall
(
"glScalef"
);
...
...
@@ -4492,9 +4500,11 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, s
/* This sets the shader output position correction constants.
* TODO: Move to the viewport state
*/
if
(
useVertexShaderFunction
)
{
if
(
useVertexShaderFunction
)
{
GLfloat
yoffset
=
-
(
63
.
0
f
/
64
.
0
f
)
/
stateblock
->
viewport
.
Height
;
device
->
posFixup
[
1
]
=
context
->
render_offscreen
?
-
1
.
0
f
:
1
.
0
f
;
device
->
posFixup
[
3
]
=
-
device
->
posFixup
[
1
]
/
stateblock
->
viewport
.
Heigh
t
;
device
->
posFixup
[
3
]
=
device
->
posFixup
[
1
]
*
yoffse
t
;
}
}
...
...
@@ -4639,8 +4649,11 @@ static void viewport_miscpart(DWORD state, IWineD3DStateBlockImpl *stateblock, s
static
void
viewport_vertexpart
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
stateblock
->
wineD3DDevice
->
posFixup
[
2
]
=
1
.
0
f
/
stateblock
->
viewport
.
Width
;
stateblock
->
wineD3DDevice
->
posFixup
[
3
]
=
-
stateblock
->
wineD3DDevice
->
posFixup
[
1
]
/
stateblock
->
viewport
.
Height
;
GLfloat
yoffset
=
-
(
63
.
0
f
/
64
.
0
f
)
/
stateblock
->
viewport
.
Height
;
stateblock
->
wineD3DDevice
->
posFixup
[
2
]
=
(
63
.
0
f
/
64
.
0
f
)
/
stateblock
->
viewport
.
Width
;
stateblock
->
wineD3DDevice
->
posFixup
[
3
]
=
stateblock
->
wineD3DDevice
->
posFixup
[
1
]
*
yoffset
;
if
(
!
isStateDirty
(
context
,
STATE_TRANSFORM
(
WINED3DTS_PROJECTION
)))
{
transform_projection
(
STATE_TRANSFORM
(
WINED3DTS_PROJECTION
),
stateblock
,
context
);
}
...
...
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