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
98bc83be
Commit
98bc83be
authored
Aug 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fall back to drawStridedSlow if fog coords are used.
parent
e2605fb0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
drawprim.c
dlls/wined3d/drawprim.c
+14
-5
state.c
dlls/wined3d/state.c
+21
-10
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/drawprim.c
View file @
98bc83be
...
...
@@ -1050,13 +1050,22 @@ void drawPrimitive(IWineD3DDevice *iface,
if
(
numberOfVertices
==
0
)
numberOfVertices
=
calculatedNumberOfindices
;
if
(
!
This
->
strided_streams
.
u
.
s
.
position_transformed
&&
!
use_vs
(
This
))
{
if
(
This
->
activeContext
->
num_untracked_materials
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_LIGHTING
])
{
IWineD3DVertexBufferImpl
*
vb
;
if
(
!
use_vs
(
This
))
{
if
(
!
This
->
strided_streams
.
u
.
s
.
position_transformed
&&
This
->
activeContext
->
num_untracked_materials
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_LIGHTING
])
{
FIXME
(
"Using software emulation because not all material properties could be tracked
\n
"
);
emulation
=
TRUE
;
}
else
if
(
This
->
activeContext
->
fog_coord
&&
This
->
stateBlock
->
renderState
[
WINED3DRS_FOGENABLE
])
{
/* Either write a pipeline replacement shader or convert the specular alpha from unsigned byte
* to a float in the vertex buffer
*/
FIXME
(
"Using software emulation because manual fog coordinates are provided
\n
"
);
emulation
=
TRUE
;
}
if
(
emulation
)
{
IWineD3DVertexBufferImpl
*
vb
;
strided
=
&
stridedlcl
;
memcpy
(
&
stridedlcl
,
&
This
->
strided_streams
,
sizeof
(
stridedlcl
));
...
...
dlls/wined3d/state.c
View file @
98bc83be
...
...
@@ -803,9 +803,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
fogend
=
0
.
0
;
}
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
context
->
last_was_foggy_shader
=
TRUE
;
}
...
...
@@ -843,9 +844,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
default:
FIXME
(
"Unexpected WINED3DRS_FOGVERTEXMODE %d
\n
"
,
stateblock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]);
}
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
}
/* DX 7 sdk: "If both render states(vertex and table fog) are set to valid modes,
...
...
@@ -862,9 +864,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
if
(
!
context
->
last_was_rhw
)
{
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
break
;
}
...
...
@@ -873,9 +876,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
if
(
!
context
->
last_was_rhw
)
{
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
break
;
}
...
...
@@ -884,9 +888,10 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
if
(
!
context
->
last_was_rhw
)
{
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
break
;
}
...
...
@@ -897,8 +902,11 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
* Same happens with Vertexfog on transformed vertices
*/
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FOG_COORDINATE_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT)
\n
"
);
if
(
context
->
fog_coord
==
FALSE
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FOG_COORDINATE_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT)
\n
"
);
context
->
fog_coord
=
TRUE
;
}
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR)"
);
fogstart
=
0xff
;
...
...
@@ -920,27 +928,30 @@ static void state_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
case
WINED3DFOG_EXP
:
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
break
;
case
WINED3DFOG_EXP2
:
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
break
;
case
WINED3DFOG_LINEAR
:
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR"
);
if
(
GL_SUPPORT
(
EXT_FOG_COORD
))
{
if
(
GL_SUPPORT
(
EXT_FOG_COORD
)
&&
context
->
fog_coord
)
{
glFogi
(
GL_FOG_COORDINATE_SOURCE_EXT
,
GL_FRAGMENT_DEPTH_EXT
);
checkGLcall
(
"glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FRAGMENT_DEPTH_EXT"
);
context
->
fog_coord
=
FALSE
;
}
break
;
...
...
dlls/wined3d/wined3d_private.h
View file @
98bc83be
...
...
@@ -518,6 +518,7 @@ struct WineD3DContext {
GLenum
untracked_materials
[
2
];
BOOL
last_was_blit
,
last_was_ckey
;
char
texShaderBumpMap
;
BOOL
fog_coord
;
/* The actual opengl context */
HGLRC
glCtx
;
...
...
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