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
3795a081
Commit
3795a081
authored
Apr 26, 2004
by
Marcus Meissner
Committed by
Alexandre Julliard
Apr 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some strict aliasing issues in dlls/d3d8.
Incorporated bugfix from Christian Costa in vshader_expp.
parent
593e5374
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
41 deletions
+79
-41
device.c
dlls/d3d8/device.c
+39
-21
shader.c
dlls/d3d8/shader.c
+12
-8
stateblock.c
dlls/d3d8/stateblock.c
+27
-11
surface.c
dlls/d3d8/surface.c
+1
-1
No files found.
dlls/d3d8/device.c
View file @
3795a081
...
@@ -2184,6 +2184,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(LPDIRECT3DDEVICE8 iface, DWOR
...
@@ -2184,6 +2184,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(LPDIRECT3DDEVICE8 iface, DWOR
return
D3D_OK
;
return
D3D_OK
;
}
}
HRESULT
WINAPI
IDirect3DDevice8Impl_SetRenderState
(
LPDIRECT3DDEVICE8
iface
,
D3DRENDERSTATETYPE
State
,
DWORD
Value
)
{
HRESULT
WINAPI
IDirect3DDevice8Impl_SetRenderState
(
LPDIRECT3DDEVICE8
iface
,
D3DRENDERSTATETYPE
State
,
DWORD
Value
)
{
union
{
DWORD
d
;
float
f
;
}
tmpvalue
;
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
DWORD
OldValue
=
This
->
StateBlock
->
renderstate
[
State
];
DWORD
OldValue
=
This
->
StateBlock
->
renderstate
[
State
];
...
@@ -2752,26 +2756,26 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
...
@@ -2752,26 +2756,26 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
case
D3DRS_FOGSTART
:
case
D3DRS_FOGSTART
:
{
{
float
*
f
=
(
float
*
)
&
Value
;
tmpvalue
.
d
=
Value
;
glFogfv
(
GL_FOG_START
,
f
);
glFogfv
(
GL_FOG_START
,
&
tmpvalue
.
f
);
checkGLcall
(
"glFogf(GL_FOG_START, (float) Value)"
);
checkGLcall
(
"glFogf(GL_FOG_START, (float) Value)"
);
TRACE
(
"Fog Start == %f
\n
"
,
*
f
);
TRACE
(
"Fog Start == %f
\n
"
,
tmpvalue
.
f
);
}
}
break
;
break
;
case
D3DRS_FOGEND
:
case
D3DRS_FOGEND
:
{
{
float
*
f
=
(
float
*
)
&
Value
;
tmpvalue
.
d
=
Value
;
glFogfv
(
GL_FOG_END
,
f
);
glFogfv
(
GL_FOG_END
,
&
tmpvalue
.
f
);
checkGLcall
(
"glFogf(GL_FOG_END, (float) Value)"
);
checkGLcall
(
"glFogf(GL_FOG_END, (float) Value)"
);
TRACE
(
"Fog End == %f
\n
"
,
*
f
);
TRACE
(
"Fog End == %f
\n
"
,
tmpvalue
.
f
);
}
}
break
;
break
;
case
D3DRS_FOGDENSITY
:
case
D3DRS_FOGDENSITY
:
{
{
float
*
f
=
(
float
*
)
&
Value
;
tmpvalue
.
d
=
Value
;
glFogfv
(
GL_FOG_DENSITY
,
f
);
glFogfv
(
GL_FOG_DENSITY
,
&
tmpvalue
.
f
);
checkGLcall
(
"glFogf(GL_FOG_DENSITY, (float) Value)"
);
checkGLcall
(
"glFogf(GL_FOG_DENSITY, (float) Value)"
);
}
}
break
;
break
;
...
@@ -2785,7 +2789,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
...
@@ -2785,7 +2789,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
case
D3DRS_TWEENFACTOR
:
case
D3DRS_TWEENFACTOR
:
{
{
This
->
UpdateStateBlock
->
tween_factor
=
*
((
float
*
)
&
Value
);
tmpvalue
.
d
=
Value
;
This
->
UpdateStateBlock
->
tween_factor
=
tmpvalue
.
f
;
TRACE
(
"Vertex Blending Tween Factor to %f
\n
"
,
This
->
UpdateStateBlock
->
tween_factor
);
TRACE
(
"Vertex Blending Tween Factor to %f
\n
"
,
This
->
UpdateStateBlock
->
tween_factor
);
}
}
break
;
break
;
...
@@ -2842,11 +2847,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
...
@@ -2842,11 +2847,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
case
D3DRS_LINEPATTERN
:
case
D3DRS_LINEPATTERN
:
{
{
D3DLINEPATTERN
*
pattern
=
(
D3DLINEPATTERN
*
)
&
Value
;
union
{
TRACE
(
"Line pattern: repeat %d bits %x
\n
"
,
pattern
->
wRepeatFactor
,
pattern
->
wLinePattern
);
DWORD
d
;
D3DLINEPATTERN
lp
;
}
tmppattern
;
tmppattern
.
d
=
Value
;
if
(
pattern
->
wRepeatFactor
)
{
TRACE
(
"Line pattern: repeat %d bits %x
\n
"
,
tmppattern
.
lp
.
wRepeatFactor
,
tmppattern
.
lp
.
wLinePattern
);
glLineStipple
(
pattern
->
wRepeatFactor
,
pattern
->
wLinePattern
);
if
(
tmppattern
.
lp
.
wRepeatFactor
)
{
glLineStipple
(
tmppattern
.
lp
.
wRepeatFactor
,
tmppattern
.
lp
.
wLinePattern
);
checkGLcall
(
"glLineStipple(repeat, linepattern)"
);
checkGLcall
(
"glLineStipple(repeat, linepattern)"
);
glEnable
(
GL_LINE_STIPPLE
);
glEnable
(
GL_LINE_STIPPLE
);
checkGLcall
(
"glEnable(GL_LINE_STIPPLE);"
);
checkGLcall
(
"glEnable(GL_LINE_STIPPLE);"
);
...
@@ -2860,8 +2870,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
...
@@ -2860,8 +2870,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
case
D3DRS_ZBIAS
:
case
D3DRS_ZBIAS
:
{
{
if
(
Value
)
{
if
(
Value
)
{
TRACE
(
"ZBias value %f
\n
"
,
*
((
float
*
)
&
Value
));
tmpvalue
.
d
=
Value
;
glPolygonOffset
(
0
,
-*
((
float
*
)
&
Value
));
TRACE
(
"ZBias value %f
\n
"
,
tmpvalue
.
f
);
glPolygonOffset
(
0
,
-
tmpvalue
.
f
);
checkGLcall
(
"glPolygonOffset(0, -Value)"
);
checkGLcall
(
"glPolygonOffset(0, -Value)"
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
glEnable
(
GL_POLYGON_OFFSET_FILL
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_FILL);"
);
checkGLcall
(
"glEnable(GL_POLYGON_OFFSET_FILL);"
);
...
@@ -2891,14 +2902,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
...
@@ -2891,14 +2902,16 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
break
;
break
;
case
D3DRS_POINTSIZE
:
case
D3DRS_POINTSIZE
:
TRACE
(
"Set point size to %f
\n
"
,
*
((
float
*
)
&
Value
));
tmpvalue
.
d
=
Value
;
glPointSize
(
*
((
float
*
)
&
Value
));
TRACE
(
"Set point size to %f
\n
"
,
tmpvalue
.
f
);
glPointSize
(
tmpvalue
.
f
);
checkGLcall
(
"glPointSize(...);"
);
checkGLcall
(
"glPointSize(...);"
);
break
;
break
;
case
D3DRS_POINTSIZE_MIN
:
case
D3DRS_POINTSIZE_MIN
:
if
(
GL_SUPPORT
(
EXT_POINT_PARAMETERS
))
{
if
(
GL_SUPPORT
(
EXT_POINT_PARAMETERS
))
{
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MIN_EXT
,
*
((
float
*
)
&
Value
));
tmpvalue
.
d
=
Value
;
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MIN_EXT
,
tmpvalue
.
f
);
checkGLcall
(
"glPointParameterfEXT(...);"
);
checkGLcall
(
"glPointParameterfEXT(...);"
);
}
else
{
}
else
{
FIXME
(
"D3DRS_POINTSIZE_MIN not supported on this opengl
\n
"
);
FIXME
(
"D3DRS_POINTSIZE_MIN not supported on this opengl
\n
"
);
...
@@ -2907,7 +2920,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
...
@@ -2907,7 +2920,8 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3
case
D3DRS_POINTSIZE_MAX
:
case
D3DRS_POINTSIZE_MAX
:
if
(
GL_SUPPORT
(
EXT_POINT_PARAMETERS
))
{
if
(
GL_SUPPORT
(
EXT_POINT_PARAMETERS
))
{
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MAX_EXT
,
*
((
float
*
)
&
Value
));
tmpvalue
.
d
=
Value
;
GL_EXTCALL
(
glPointParameterfEXT
)(
GL_POINT_SIZE_MAX_EXT
,
tmpvalue
.
f
);
checkGLcall
(
"glPointParameterfEXT(...);"
);
checkGLcall
(
"glPointParameterfEXT(...);"
);
}
else
{
}
else
{
FIXME
(
"D3DRS_POINTSIZE_MAX not supported on this opengl
\n
"
);
FIXME
(
"D3DRS_POINTSIZE_MAX not supported on this opengl
\n
"
);
...
@@ -3211,6 +3225,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 ifa
...
@@ -3211,6 +3225,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 ifa
HRESULT
WINAPI
IDirect3DDevice8Impl_SetTextureStageState
(
LPDIRECT3DDEVICE8
iface
,
DWORD
Stage
,
D3DTEXTURESTAGESTATETYPE
Type
,
DWORD
Value
)
{
HRESULT
WINAPI
IDirect3DDevice8Impl_SetTextureStageState
(
LPDIRECT3DDEVICE8
iface
,
DWORD
Stage
,
D3DTEXTURESTAGESTATETYPE
Type
,
DWORD
Value
)
{
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
union
{
float
f
;
DWORD
d
;
}
tmpvalue
;
/* FIXME: Handle 3d textures? What if TSS value set before set texture? Need to reapply all values? */
/* FIXME: Handle 3d textures? What if TSS value set before set texture? Need to reapply all values? */
...
@@ -3383,10 +3401,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
...
@@ -3383,10 +3401,10 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 ifa
case
D3DTSS_MIPMAPLODBIAS
:
case
D3DTSS_MIPMAPLODBIAS
:
{
{
if
(
GL_SUPPORT
(
EXT_TEXTURE_LOD_BIAS
))
{
if
(
GL_SUPPORT
(
EXT_TEXTURE_LOD_BIAS
))
{
float
f
=
*
(
float
*
)
&
Value
;
tmpvalue
.
d
=
Value
;
glTexEnvf
(
GL_TEXTURE_FILTER_CONTROL_EXT
,
glTexEnvf
(
GL_TEXTURE_FILTER_CONTROL_EXT
,
GL_TEXTURE_LOD_BIAS_EXT
,
GL_TEXTURE_LOD_BIAS_EXT
,
f
);
tmpvalue
.
f
);
checkGLcall
(
"glTexEnvi GL_TEXTURE_LOD_BIAS_EXT ..."
);
checkGLcall
(
"glTexEnvi GL_TEXTURE_LOD_BIAS_EXT ..."
);
}
}
}
}
...
...
dlls/d3d8/shader.c
View file @
3795a081
...
@@ -125,14 +125,18 @@ void vshader_dst(D3DSHADERVECTOR* d, D3DSHADERVECTOR* s0, D3DSHADERVECTOR* s1) {
...
@@ -125,14 +125,18 @@ void vshader_dst(D3DSHADERVECTOR* d, D3DSHADERVECTOR* s0, D3DSHADERVECTOR* s1) {
}
}
void
vshader_expp
(
D3DSHADERVECTOR
*
d
,
D3DSHADERVECTOR
*
s0
)
{
void
vshader_expp
(
D3DSHADERVECTOR
*
d
,
D3DSHADERVECTOR
*
s0
)
{
float
tmp_f
=
floorf
(
s0
->
w
);
union
{
DWORD
tmp_d
=
0
;
float
f
;
tmp_f
=
powf
(
2
.
0
f
,
s0
->
w
);
DWORD
d
;
tmp_d
=
*
((
DWORD
*
)
&
tmp_f
)
&
0xFFFFFF00
;
}
tmp
;
d
->
x
=
powf
(
2
.
0
f
,
tmp_f
);
tmp
.
f
=
floorf
(
s0
->
w
);
d
->
y
=
s0
->
w
-
tmp_f
;
d
->
x
=
powf
(
2
.
0
f
,
tmp
.
f
);
d
->
z
=
*
((
float
*
)
&
tmp_d
);
d
->
y
=
s0
->
w
-
tmp
.
f
;
tmp
.
f
=
powf
(
2
.
0
f
,
s0
->
w
);
tmp
.
d
&=
0xFFFFFF00U
;
d
->
z
=
tmp
.
f
;
d
->
w
=
1
.
0
f
;
d
->
w
=
1
.
0
f
;
VSTRACE
((
"executing exp: s0=(%f, %f, %f, %f) => d=(%f, %f, %f, %f)
\n
"
,
VSTRACE
((
"executing exp: s0=(%f, %f, %f, %f) => d=(%f, %f, %f, %f)
\n
"
,
s0
->
x
,
s0
->
y
,
s0
->
z
,
s0
->
w
,
d
->
x
,
d
->
y
,
d
->
z
,
d
->
w
));
s0
->
x
,
s0
->
y
,
s0
->
z
,
s0
->
w
,
d
->
x
,
d
->
y
,
d
->
z
,
d
->
w
));
...
...
dlls/d3d8/stateblock.c
View file @
3795a081
...
@@ -54,10 +54,16 @@ static const float idmatrix[16] = {
...
@@ -54,10 +54,16 @@ static const float idmatrix[16] = {
};
};
HRESULT
WINAPI
IDirect3DDeviceImpl_InitStartupStateBlock
(
IDirect3DDevice8Impl
*
This
)
{
HRESULT
WINAPI
IDirect3DDeviceImpl_InitStartupStateBlock
(
IDirect3DDevice8Impl
*
This
)
{
D3DLINEPATTERN
lp
;
union
{
D3DLINEPATTERN
lp
;
DWORD
d
;
}
lp
;
union
{
float
f
;
DWORD
d
;
}
tmpfloat
;
int
i
;
int
i
;
int
j
;
int
j
;
float
tmpfloat
=
0
.
0
f
;
LPDIRECT3DDEVICE8
iface
=
(
LPDIRECT3DDEVICE8
)
This
;
LPDIRECT3DDEVICE8
iface
=
(
LPDIRECT3DDEVICE8
)
This
;
/* Note this may have a large overhead but it should only be executed
/* Note this may have a large overhead but it should only be executed
...
@@ -81,7 +87,9 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
...
@@ -81,7 +87,9 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
}
}
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FILLMODE
,
D3DFILL_SOLID
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FILLMODE
,
D3DFILL_SOLID
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_SHADEMODE
,
D3DSHADE_GOURAUD
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_SHADEMODE
,
D3DSHADE_GOURAUD
);
lp
.
wRepeatFactor
=
0
;
lp
.
wLinePattern
=
0
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LINEPATTERN
,
*
(
DWORD
*
)
&
lp
);
lp
.
lp
.
wRepeatFactor
=
0
;
lp
.
lp
.
wLinePattern
=
0
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LINEPATTERN
,
lp
.
d
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZWRITEENABLE
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZWRITEENABLE
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ALPHATESTENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ALPHATESTENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LASTPIXEL
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_LASTPIXEL
,
TRUE
);
...
@@ -98,9 +106,12 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
...
@@ -98,9 +106,12 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZVISIBLE
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZVISIBLE
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGCOLOR
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGCOLOR
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGTABLEMODE
,
D3DFOG_NONE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGTABLEMODE
,
D3DFOG_NONE
);
tmpfloat
=
0
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGSTART
,
*
((
DWORD
*
)
&
tmpfloat
));
tmpfloat
.
f
=
0
.
0
f
;
tmpfloat
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGEND
,
*
((
DWORD
*
)
&
tmpfloat
));
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGSTART
,
tmpfloat
.
d
);
tmpfloat
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGDENSITY
,
*
((
DWORD
*
)
&
tmpfloat
));
tmpfloat
.
f
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGEND
,
tmpfloat
.
d
);
tmpfloat
.
f
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_FOGDENSITY
,
tmpfloat
.
d
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_EDGEANTIALIAS
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_EDGEANTIALIAS
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZBIAS
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_ZBIAS
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_RANGEFOGENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_RANGEFOGENABLE
,
FALSE
);
...
@@ -142,8 +153,10 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
...
@@ -142,8 +153,10 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_VERTEXBLEND
,
D3DVBF_DISABLE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_VERTEXBLEND
,
D3DVBF_DISABLE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_CLIPPLANEENABLE
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_CLIPPLANEENABLE
,
0
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_SOFTWAREVERTEXPROCESSING
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_SOFTWAREVERTEXPROCESSING
,
FALSE
);
tmpfloat
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSIZE
,
*
((
DWORD
*
)
&
tmpfloat
));
tmpfloat
.
f
=
1
.
0
f
;
tmpfloat
=
0
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSIZE_MIN
,
*
((
DWORD
*
)
&
tmpfloat
));
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSIZE
,
tmpfloat
.
d
);
tmpfloat
.
f
=
0
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSIZE_MIN
,
tmpfloat
.
d
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSPRITEENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSPRITEENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSCALEENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSCALEENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSCALE_A
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSCALE_A
,
TRUE
);
...
@@ -152,12 +165,15 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
...
@@ -152,12 +165,15 @@ HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* T
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_MULTISAMPLEANTIALIAS
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_MULTISAMPLEANTIALIAS
,
TRUE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_MULTISAMPLEMASK
,
0xFFFFFFFF
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_MULTISAMPLEMASK
,
0xFFFFFFFF
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_PATCHEDGESTYLE
,
D3DPATCHEDGE_DISCRETE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_PATCHEDGESTYLE
,
D3DPATCHEDGE_DISCRETE
);
tmpfloat
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_PATCHSEGMENTS
,
*
((
DWORD
*
)
&
tmpfloat
));
tmpfloat
.
f
=
1
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_PATCHSEGMENTS
,
tmpfloat
.
d
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_DEBUGMONITORTOKEN
,
D3DDMT_DISABLE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_DEBUGMONITORTOKEN
,
D3DDMT_DISABLE
);
tmpfloat
=
64
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSIZE_MAX
,
(
DWORD
)
*
((
DWORD
*
)
&
tmpfloat
));
tmpfloat
.
f
=
64
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POINTSIZE_MAX
,
tmpfloat
.
d
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_INDEXEDVERTEXBLENDENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_INDEXEDVERTEXBLENDENABLE
,
FALSE
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_COLORWRITEENABLE
,
0x0000000F
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_COLORWRITEENABLE
,
0x0000000F
);
tmpfloat
=
0
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_TWEENFACTOR
,
(
DWORD
)
*
((
DWORD
*
)
&
tmpfloat
));
tmpfloat
.
f
=
0
.
0
f
;
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_TWEENFACTOR
,
tmpfloat
.
d
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_BLENDOP
,
D3DBLENDOP_ADD
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_BLENDOP
,
D3DBLENDOP_ADD
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POSITIONORDER
,
D3DORDER_CUBIC
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_POSITIONORDER
,
D3DORDER_CUBIC
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_NORMALORDER
,
D3DORDER_LINEAR
);
IDirect3DDevice8Impl_SetRenderState
(
iface
,
D3DRS_NORMALORDER
,
D3DORDER_LINEAR
);
...
...
dlls/d3d8/surface.c
View file @
3795a081
...
@@ -263,7 +263,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D3DLOCKE
...
@@ -263,7 +263,7 @@ HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D3DLOCKE
/** Dirtify Container if needed */
/** Dirtify Container if needed */
if
(
NULL
!=
This
->
Container
)
{
if
(
NULL
!=
This
->
Container
)
{
IDirect3DBaseTexture8
*
cont
=
NULL
;
IDirect3DBaseTexture8
*
cont
=
NULL
;
hr
=
IUnknown_QueryInterface
(
This
->
Container
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
&
cont
);
hr
=
IUnknown_QueryInterface
(
This
->
Container
,
&
IID_IDirect3DBaseTexture8
,
(
void
**
)
(
char
*
)
&
cont
);
if
(
SUCCEEDED
(
hr
)
&&
NULL
!=
cont
)
{
if
(
SUCCEEDED
(
hr
)
&&
NULL
!=
cont
)
{
IDirect3DBaseTexture8Impl_SetDirty
(
cont
,
TRUE
);
IDirect3DBaseTexture8Impl_SetDirty
(
cont
,
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