Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6623a8cf
Commit
6623a8cf
authored
Dec 21, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DFOGMODE typedef.
parent
00096c82
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
45 deletions
+47
-45
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-2
drawprim.c
dlls/wined3d/drawprim.c
+2
-2
shader.c
dlls/wined3d/shader.c
+9
-9
state.c
dlls/wined3d/state.c
+17
-14
stateblock.c
dlls/wined3d/stateblock.c
+2
-2
utils.c
dlls/wined3d/utils.c
+8
-8
wined3d.h
include/wine/wined3d.h
+7
-8
No files found.
dlls/wined3d/arb_program_shader.c
View file @
6623a8cf
...
...
@@ -6411,7 +6411,7 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3
if
(
!
state
->
render_states
[
WINED3D_RS_FOGENABLE
])
return
;
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
)
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3D
_
FOG_NONE
)
{
if
(
use_vs
(
state
))
{
...
...
@@ -6419,7 +6419,7 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3
}
else
{
if
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
==
WINED3DFOG_NONE
||
context
->
last_was_rhw
)
if
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
==
WINED3D
_
FOG_NONE
||
context
->
last_was_rhw
)
new_source
=
FOGSOURCE_COORD
;
else
new_source
=
FOGSOURCE_FFP
;
...
...
dlls/wined3d/drawprim.c
View file @
6623a8cf
...
...
@@ -144,9 +144,9 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
/* special case where the fog density is stored in the specular alpha channel */
if
(
state
->
render_states
[
WINED3D_RS_FOGENABLE
]
&&
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
==
WINED3DFOG_NONE
&&
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
==
WINED3D
_
FOG_NONE
||
si
->
elements
[
WINED3D_FFP_POSITION
].
format
->
id
==
WINED3DFMT_R32G32B32A32_FLOAT
)
&&
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
)
&&
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3D
_
FOG_NONE
)
{
if
(
gl_info
->
supported
[
EXT_FOG_COORD
])
{
...
...
dlls/wined3d/shader.c
View file @
6623a8cf
...
...
@@ -1710,7 +1710,7 @@ void find_vs_compile_args(const struct wined3d_state *state,
const
struct
wined3d_shader
*
shader
,
struct
vs_compile_args
*
args
)
{
args
->
fog_src
=
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
?
VS_FOG_COORD
:
VS_FOG_Z
;
==
WINED3D
_
FOG_NONE
?
VS_FOG_COORD
:
VS_FOG_Z
;
args
->
clip_enabled
=
state
->
render_states
[
WINED3D_RS_CLIPPING
]
&&
state
->
render_states
[
WINED3D_RS_CLIPPLANEENABLE
];
args
->
swizzle_map
=
shader
->
device
->
strided_streams
.
swizzle_map
;
...
...
@@ -1980,7 +1980,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
{
switch
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
])
{
case
WINED3DFOG_NONE
:
case
WINED3D
_
FOG_NONE
:
if
(
device
->
strided_streams
.
position_transformed
||
use_vs
(
state
))
{
args
->
fog
=
FOG_LINEAR
;
...
...
@@ -1989,16 +1989,16 @@ void find_ps_compile_args(const struct wined3d_state *state,
switch
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
])
{
case
WINED3DFOG_NONE
:
/* Fall through. */
case
WINED3DFOG_LINEAR
:
args
->
fog
=
FOG_LINEAR
;
break
;
case
WINED3DFOG_EXP
:
args
->
fog
=
FOG_EXP
;
break
;
case
WINED3DFOG_EXP2
:
args
->
fog
=
FOG_EXP2
;
break
;
case
WINED3D
_
FOG_NONE
:
/* Fall through. */
case
WINED3D
_
FOG_LINEAR
:
args
->
fog
=
FOG_LINEAR
;
break
;
case
WINED3D
_
FOG_EXP
:
args
->
fog
=
FOG_EXP
;
break
;
case
WINED3D
_
FOG_EXP2
:
args
->
fog
=
FOG_EXP2
;
break
;
}
break
;
case
WINED3DFOG_LINEAR
:
args
->
fog
=
FOG_LINEAR
;
break
;
case
WINED3DFOG_EXP
:
args
->
fog
=
FOG_EXP
;
break
;
case
WINED3DFOG_EXP2
:
args
->
fog
=
FOG_EXP2
;
break
;
case
WINED3D
_
FOG_LINEAR
:
args
->
fog
=
FOG_LINEAR
;
break
;
case
WINED3D
_
FOG_EXP
:
args
->
fog
=
FOG_EXP
;
break
;
case
WINED3D
_
FOG_EXP2
:
args
->
fog
=
FOG_EXP2
;
break
;
}
}
else
...
...
dlls/wined3d/state.c
View file @
6623a8cf
...
...
@@ -931,7 +931,7 @@ static void state_fog_vertexpart(struct wined3d_context *context, const struct w
return
;
/* Table fog on: Never use fog coords, and use per-fragment fog */
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
!=
WINED3DFOG_NONE
)
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
!=
WINED3D
_
FOG_NONE
)
{
glHint
(
GL_FOG_HINT
,
GL_NICEST
);
if
(
context
->
fog_coord
)
{
...
...
@@ -952,7 +952,7 @@ static void state_fog_vertexpart(struct wined3d_context *context, const struct w
/* Otherwise use per-vertex fog in any case */
glHint
(
GL_FOG_HINT
,
GL_FASTEST
);
if
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
==
WINED3DFOG_NONE
||
context
->
last_was_rhw
)
if
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
==
WINED3D
_
FOG_NONE
||
context
->
last_was_rhw
)
{
/* No fog at all, or transformed vertices: Use fog coord */
if
(
!
context
->
fog_coord
)
{
...
...
@@ -1099,7 +1099,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
/* DX 7 sdk: "If both render states(vertex and table fog) are set to valid modes,
* the system will apply only pixel(=table) fog effects."
*/
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
)
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3D
_
FOG_NONE
)
{
if
(
use_vs
(
state
))
{
...
...
@@ -1112,8 +1112,9 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
switch
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
])
{
/* If processed vertices are used, fall through to the NONE case */
case
WINED3DFOG_EXP
:
if
(
!
context
->
last_was_rhw
)
{
case
WINED3D_FOG_EXP
:
if
(
!
context
->
last_was_rhw
)
{
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP)"
);
new_source
=
FOGSOURCE_FFP
;
...
...
@@ -1121,8 +1122,9 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
}
/* drop through */
case
WINED3DFOG_EXP2
:
if
(
!
context
->
last_was_rhw
)
{
case
WINED3D_FOG_EXP2
:
if
(
!
context
->
last_was_rhw
)
{
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2)"
);
new_source
=
FOGSOURCE_FFP
;
...
...
@@ -1130,8 +1132,9 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
}
/* drop through */
case
WINED3DFOG_LINEAR
:
if
(
!
context
->
last_was_rhw
)
{
case
WINED3D_FOG_LINEAR
:
if
(
!
context
->
last_was_rhw
)
{
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR)"
);
new_source
=
FOGSOURCE_FFP
;
...
...
@@ -1139,7 +1142,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
}
/* drop through */
case
WINED3DFOG_NONE
:
case
WINED3D
_
FOG_NONE
:
/* Both are none? According to msdn the alpha channel of the specular
* color contains a fog factor. Set it in drawStridedSlow.
* Same happens with Vertexfog on transformed vertices
...
...
@@ -1160,22 +1163,22 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
switch
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
])
{
case
WINED3DFOG_EXP
:
case
WINED3D
_
FOG_EXP
:
glFogi
(
GL_FOG_MODE
,
GL_EXP
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP)"
);
break
;
case
WINED3DFOG_EXP2
:
case
WINED3D
_
FOG_EXP2
:
glFogi
(
GL_FOG_MODE
,
GL_EXP2
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_EXP2)"
);
break
;
case
WINED3DFOG_LINEAR
:
case
WINED3D
_
FOG_LINEAR
:
glFogi
(
GL_FOG_MODE
,
GL_LINEAR
);
checkGLcall
(
"glFogi(GL_FOG_MODE, GL_LINEAR)"
);
break
;
case
WINED3DFOG_NONE
:
/* Won't happen */
case
WINED3D
_
FOG_NONE
:
/* Won't happen */
default:
FIXME
(
"Unexpected WINED3D_RS_FOGTABLEMODE %#x.
\n
"
,
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]);
...
...
dlls/wined3d/stateblock.c
View file @
6623a8cf
...
...
@@ -1143,7 +1143,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_SPECULARENABLE
]
=
FALSE
;
state
->
render_states
[
WINED3D_RS_ZVISIBLE
]
=
0
;
state
->
render_states
[
WINED3D_RS_FOGCOLOR
]
=
0
;
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
=
WINED3DFOG_NONE
;
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
=
WINED3D
_
FOG_NONE
;
tmpfloat
.
f
=
0
.
0
f
;
state
->
render_states
[
WINED3D_RS_FOGSTART
]
=
tmpfloat
.
d
;
tmpfloat
.
f
=
1
.
0
f
;
...
...
@@ -1172,7 +1172,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
state
->
render_states
[
WINED3D_RS_CLIPPING
]
=
TRUE
;
state
->
render_states
[
WINED3D_RS_LIGHTING
]
=
TRUE
;
state
->
render_states
[
WINED3D_RS_AMBIENT
]
=
0
;
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
=
WINED3DFOG_NONE
;
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
]
=
WINED3D
_
FOG_NONE
;
state
->
render_states
[
WINED3D_RS_COLORVERTEX
]
=
TRUE
;
state
->
render_states
[
WINED3D_RS_LOCALVIEWER
]
=
TRUE
;
state
->
render_states
[
WINED3D_RS_NORMALIZENORMALS
]
=
FALSE
;
...
...
dlls/wined3d/utils.c
View file @
6623a8cf
...
...
@@ -3070,7 +3070,7 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
{
settings
->
fog
=
FOG_OFF
;
}
else
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
)
else
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3D
_
FOG_NONE
)
{
if
(
use_vs
(
state
)
||
state
->
vertex_declaration
->
position_transformed
)
{
...
...
@@ -3080,14 +3080,14 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
{
switch
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
])
{
case
WINED3DFOG_NONE
:
case
WINED3DFOG_LINEAR
:
case
WINED3D
_
FOG_NONE
:
case
WINED3D
_
FOG_LINEAR
:
settings
->
fog
=
FOG_LINEAR
;
break
;
case
WINED3DFOG_EXP
:
case
WINED3D
_
FOG_EXP
:
settings
->
fog
=
FOG_EXP
;
break
;
case
WINED3DFOG_EXP2
:
case
WINED3D
_
FOG_EXP2
:
settings
->
fog
=
FOG_EXP2
;
break
;
}
...
...
@@ -3097,13 +3097,13 @@ void gen_ffp_frag_op(const struct wined3d_device *device, const struct wined3d_s
{
switch
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
])
{
case
WINED3DFOG_LINEAR
:
case
WINED3D
_
FOG_LINEAR
:
settings
->
fog
=
FOG_LINEAR
;
break
;
case
WINED3DFOG_EXP
:
case
WINED3D
_
FOG_EXP
:
settings
->
fog
=
FOG_EXP
;
break
;
case
WINED3DFOG_EXP2
:
case
WINED3D
_
FOG_EXP2
:
settings
->
fog
=
FOG_EXP2
;
break
;
}
...
...
include/wine/wined3d.h
View file @
6623a8cf
...
...
@@ -440,14 +440,13 @@ enum wined3d_depth_buffer_type
WINED3D_ZB_USEW
=
2
,
};
typedef
enum
_WINED3DFOGMODE
{
WINED3DFOG_NONE
=
0
,
WINED3DFOG_EXP
=
1
,
WINED3DFOG_EXP2
=
2
,
WINED3DFOG_LINEAR
=
3
,
WINED3DFOG_FORCE_DWORD
=
0x7fffffff
}
WINED3DFOGMODE
;
enum
wined3d_fog_mode
{
WINED3D_FOG_NONE
=
0
,
WINED3D_FOG_EXP
=
1
,
WINED3D_FOG_EXP2
=
2
,
WINED3D_FOG_LINEAR
=
3
,
};
typedef
enum
_WINED3DSHADEMODE
{
...
...
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