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
8352d45d
Commit
8352d45d
authored
May 30, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
May 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename "fogmode" to "wined3d_ffp_ps_fog_mode".
This is mostly for consistency with wined3d_ffp_vs_fog_mode.
parent
e4816996
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
41 deletions
+45
-41
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+12
-10
glsl_shader.c
dlls/wined3d/glsl_shader.c
+5
-5
shader.c
dlls/wined3d/shader.c
+9
-9
utils.c
dlls/wined3d/utils.c
+8
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+11
-9
No files found.
dlls/wined3d/arb_program_shader.c
View file @
8352d45d
...
...
@@ -3662,16 +3662,17 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader,
if
(
reg_maps
->
shader_version
.
major
<
3
)
{
switch
(
args
->
super
.
fog
)
{
case
FOG_OFF
:
switch
(
args
->
super
.
fog
)
{
case
WINED3D_FFP_PS_FOG_OFF
:
break
;
case
FOG_LINEAR
:
case
WINED3D_FFP_PS_
FOG_LINEAR
:
shader_addline
(
buffer
,
"OPTION ARB_fog_linear;
\n
"
);
break
;
case
FOG_EXP
:
case
WINED3D_FFP_PS_
FOG_EXP
:
shader_addline
(
buffer
,
"OPTION ARB_fog_exp;
\n
"
);
break
;
case
FOG_EXP2
:
case
WINED3D_FFP_PS_
FOG_EXP2
:
shader_addline
(
buffer
,
"OPTION ARB_fog_exp2;
\n
"
);
break
;
}
...
...
@@ -6208,11 +6209,12 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
shader_addline
(
&
buffer
,
"!!ARBfp1.0
\n
"
);
switch
(
settings
->
fog
)
{
case
FOG_OFF
:
break
;
case
FOG_LINEAR
:
shader_addline
(
&
buffer
,
"OPTION ARB_fog_linear;
\n
"
);
break
;
case
FOG_EXP
:
shader_addline
(
&
buffer
,
"OPTION ARB_fog_exp;
\n
"
);
break
;
case
FOG_EXP2
:
shader_addline
(
&
buffer
,
"OPTION ARB_fog_exp2;
\n
"
);
break
;
switch
(
settings
->
fog
)
{
case
WINED3D_FFP_PS_FOG_OFF
:
break
;
case
WINED3D_FFP_PS_FOG_LINEAR
:
shader_addline
(
&
buffer
,
"OPTION ARB_fog_linear;
\n
"
);
break
;
case
WINED3D_FFP_PS_FOG_EXP
:
shader_addline
(
&
buffer
,
"OPTION ARB_fog_exp;
\n
"
);
break
;
case
WINED3D_FFP_PS_FOG_EXP2
:
shader_addline
(
&
buffer
,
"OPTION ARB_fog_exp2;
\n
"
);
break
;
default:
FIXME
(
"Unexpected fog setting %d
\n
"
,
settings
->
fog
);
}
...
...
dlls/wined3d/glsl_shader.c
View file @
8352d45d
...
...
@@ -4420,24 +4420,24 @@ static void shader_glsl_generate_srgb_write_correction(struct wined3d_shader_buf
shader_addline
(
buffer
,
"gl_FragData[0] = clamp(gl_FragData[0], 0.0, 1.0);
\n
"
);
}
static
void
shader_glsl_generate_fog_code
(
struct
wined3d_shader_buffer
*
buffer
,
enum
fog
mode
mode
)
static
void
shader_glsl_generate_fog_code
(
struct
wined3d_shader_buffer
*
buffer
,
enum
wined3d_ffp_ps_fog_
mode
mode
)
{
switch
(
mode
)
{
case
FOG_OFF
:
case
WINED3D_FFP_PS_
FOG_OFF
:
return
;
case
FOG_LINEAR
:
case
WINED3D_FFP_PS_
FOG_LINEAR
:
/* Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start) */
shader_addline
(
buffer
,
"float Fog = (gl_Fog.end - gl_FogFragCoord) / (gl_Fog.end - gl_Fog.start);
\n
"
);
break
;
case
FOG_EXP
:
case
WINED3D_FFP_PS_
FOG_EXP
:
/* Fog = e^-(gl_Fog.density * gl_FogFragCoord) */
shader_addline
(
buffer
,
"float Fog = exp(-gl_Fog.density * gl_FogFragCoord);
\n
"
);
break
;
case
FOG_EXP2
:
case
WINED3D_FFP_PS_
FOG_EXP2
:
/* Fog = e^-((gl_Fog.density * gl_FogFragCoord)^2) */
shader_addline
(
buffer
,
"float Fog = exp(-gl_Fog.density * gl_Fog.density * gl_FogFragCoord * gl_FogFragCoord);
\n
"
);
break
;
...
...
dlls/wined3d/shader.c
View file @
8352d45d
...
...
@@ -2154,7 +2154,7 @@ void find_ps_compile_args(const struct wined3d_state *state,
args
->
vp_mode
=
vertexshader
;
else
args
->
vp_mode
=
fixedfunction
;
args
->
fog
=
FOG_OFF
;
args
->
fog
=
WINED3D_FFP_PS_
FOG_OFF
;
}
else
{
...
...
@@ -2166,27 +2166,27 @@ void find_ps_compile_args(const struct wined3d_state *state,
case
WINED3D_FOG_NONE
:
if
(
device
->
stream_info
.
position_transformed
||
use_vs
(
state
))
{
args
->
fog
=
FOG_LINEAR
;
args
->
fog
=
WINED3D_FFP_PS_
FOG_LINEAR
;
break
;
}
switch
(
state
->
render_states
[
WINED3D_RS_FOGVERTEXMODE
])
{
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
;
case
WINED3D_FOG_LINEAR
:
args
->
fog
=
WINED3D_FFP_PS_
FOG_LINEAR
;
break
;
case
WINED3D_FOG_EXP
:
args
->
fog
=
WINED3D_FFP_PS_
FOG_EXP
;
break
;
case
WINED3D_FOG_EXP2
:
args
->
fog
=
WINED3D_FFP_PS_
FOG_EXP2
;
break
;
}
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
;
case
WINED3D_FOG_LINEAR
:
args
->
fog
=
WINED3D_FFP_PS_
FOG_LINEAR
;
break
;
case
WINED3D_FOG_EXP
:
args
->
fog
=
WINED3D_FFP_PS_
FOG_EXP
;
break
;
case
WINED3D_FOG_EXP2
:
args
->
fog
=
WINED3D_FFP_PS_
FOG_EXP2
;
break
;
}
}
else
{
args
->
fog
=
FOG_OFF
;
args
->
fog
=
WINED3D_FFP_PS_
FOG_OFF
;
}
}
}
...
...
dlls/wined3d/utils.c
View file @
8352d45d
...
...
@@ -3307,13 +3307,13 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
if
(
!
state
->
render_states
[
WINED3D_RS_FOGENABLE
])
{
settings
->
fog
=
FOG_OFF
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_OFF
;
}
else
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3D_FOG_NONE
)
{
if
(
use_vs
(
state
)
||
state
->
vertex_declaration
->
position_transformed
)
{
settings
->
fog
=
FOG_LINEAR
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_LINEAR
;
}
else
{
...
...
@@ -3321,13 +3321,13 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
{
case
WINED3D_FOG_NONE
:
case
WINED3D_FOG_LINEAR
:
settings
->
fog
=
FOG_LINEAR
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_LINEAR
;
break
;
case
WINED3D_FOG_EXP
:
settings
->
fog
=
FOG_EXP
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_EXP
;
break
;
case
WINED3D_FOG_EXP2
:
settings
->
fog
=
FOG_EXP2
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_EXP2
;
break
;
}
}
...
...
@@ -3337,13 +3337,13 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d
switch
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
])
{
case
WINED3D_FOG_LINEAR
:
settings
->
fog
=
FOG_LINEAR
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_LINEAR
;
break
;
case
WINED3D_FOG_EXP
:
settings
->
fog
=
FOG_EXP
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_EXP
;
break
;
case
WINED3D_FOG_EXP2
:
settings
->
fog
=
FOG_EXP2
;
settings
->
fog
=
WINED3D_FFP_PS_
FOG_EXP2
;
break
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
8352d45d
...
...
@@ -734,11 +734,12 @@ enum vertexprocessing_mode {
#define WINED3D_CONST_NUM_UNUSED ~0U
enum
fogmode
{
FOG_OFF
,
FOG_LINEAR
,
FOG_EXP
,
FOG_EXP2
enum
wined3d_ffp_ps_fog_mode
{
WINED3D_FFP_PS_FOG_OFF
,
WINED3D_FFP_PS_FOG_LINEAR
,
WINED3D_FFP_PS_FOG_EXP
,
WINED3D_FFP_PS_FOG_EXP2
,
};
/* Stateblock dependent parameters which have to be hardcoded
...
...
@@ -764,7 +765,7 @@ enum wined3d_shader_tex_types
struct
ps_compile_args
{
struct
color_fixup_desc
color_fixup
[
MAX_FRAGMENT_SAMPLERS
];
enum
vertexprocessing_mode
vp_mode
;
enum
fogmode
fog
;
enum
wined3d_ffp_ps_fog_mode
fog
;
WORD
tex_transform
;
/* ps 1.0-1.3, 4 textures */
WORD
tex_types
;
/* ps 1.0 - 1.4, 6 textures */
WORD
srgb_correction
;
...
...
@@ -1672,9 +1673,10 @@ struct texture_stage_op
unsigned
padding
:
10
;
};
struct
ffp_frag_settings
{
struct
texture_stage_op
op
[
MAX_TEXTURES
];
enum
fogmode
fog
;
struct
ffp_frag_settings
{
struct
texture_stage_op
op
[
MAX_TEXTURES
];
enum
wined3d_ffp_ps_fog_mode
fog
;
/* Use shorts instead of chars to get dword alignment */
unsigned
short
sRGB_write
;
unsigned
short
emul_clipplanes
;
...
...
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