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
1deafcb5
Commit
1deafcb5
authored
Dec 15, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Split the remains of state_fog.
parent
06108781
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
2 deletions
+50
-2
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+29
-0
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+7
-2
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+5
-0
state.c
dlls/wined3d/state.c
+0
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+9
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
1deafcb5
...
...
@@ -3043,9 +3043,36 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
* fragment_prog_arbfp function being called because FOGENABLE is dirty, which calls this function here
*/
static
void
state_arbfp_fog
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
enum
fogsource
new_source
;
if
(
!
isStateDirty
(
context
,
STATE_PIXELSHADER
))
{
fragment_prog_arbfp
(
state
,
stateblock
,
context
);
}
if
(
!
stateblock
->
renderState
[
WINED3DRS_FOGENABLE
])
return
;
if
(
use_vs
(
stateblock
)
&&
((
IWineD3DVertexShaderImpl
*
)
stateblock
->
vertexShader
)
->
baseShader
.
reg_maps
.
fog
)
{
if
(
stateblock
->
renderState
[
WINED3DRS_FOGTABLEMODE
]
!=
WINED3DFOG_NONE
)
{
FIXME
(
"vertex shader with table fog used
\n
"
);
}
context
->
last_was_foggy_shader
=
TRUE
;
new_source
=
FOGSOURCE_VS
;
}
else
if
(
stateblock
->
renderState
[
WINED3DRS_FOGTABLEMODE
]
==
WINED3DFOG_NONE
)
{
context
->
last_was_foggy_shader
=
FALSE
;
if
(
stateblock
->
renderState
[
WINED3DRS_FOGVERTEXMODE
]
==
WINED3DFOG_NONE
||
context
->
last_was_rhw
)
{
new_source
=
FOGSOURCE_COORD
;
}
else
{
new_source
=
FOGSOURCE_FFP
;
}
}
else
{
context
->
last_was_foggy_shader
=
FALSE
;
new_source
=
FOGSOURCE_FFP
;
}
if
(
new_source
!=
context
->
fog_source
)
{
context
->
fog_source
=
new_source
;
state_fogstartend
(
STATE_RENDER
(
WINED3DRS_FOGSTART
),
stateblock
,
context
);
}
}
static
void
textransform
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
...
...
@@ -3190,6 +3217,8 @@ static const struct StateEntryTemplate arbfp_fragmentstate_template[] = {
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_arbfp_fog
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGTABLEMODE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_arbfp_fog
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGVERTEXMODE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_arbfp_fog
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
state_fogstartend
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGEND
),
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
state_fogstartend
},
0
},
{
STATE_RENDER
(
WINED3DRS_SRGBWRITEENABLE
),
{
STATE_PIXELSHADER
,
fragment_prog_arbfp
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
state_fogcolor
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
state_fogdensity
},
0
},
...
...
dlls/wined3d/ati_fragment_shader.c
View file @
1deafcb5
...
...
@@ -909,8 +909,13 @@ static void atifs_apply_pixelshader(DWORD state, IWineD3DStateBlockImpl *statebl
static
const
struct
StateEntryTemplate
atifs_fragmentstate_template
[]
=
{
{
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
{
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
state_texfactor_atifs
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
state_fogcolor
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
state_fogdensity
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
state_fogcolor
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
state_fogdensity
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_fog_fragpart
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGTABLEMODE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_fog_fragpart
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGVERTEXMODE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_fog_fragpart
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
state_fogstartend
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGEND
),
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
state_fogstartend
},
0
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLOROP
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLOROP
),
set_tex_op_atifs
},
0
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLORARG1
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLOROP
),
set_tex_op_atifs
},
0
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLORARG2
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLOROP
),
set_tex_op_atifs
},
0
},
...
...
dlls/wined3d/nvidia_texture_shader.c
View file @
1deafcb5
...
...
@@ -794,6 +794,11 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] = {
{
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
{
STATE_RENDER
(
WINED3DRS_TEXTUREFACTOR
),
nvrc_texfactor
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
{
STATE_RENDER
(
WINED3DRS_FOGCOLOR
),
state_fogcolor
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
{
STATE_RENDER
(
WINED3DRS_FOGDENSITY
),
state_fogdensity
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_fog_fragpart
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGTABLEMODE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_fog_fragpart
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGVERTEXMODE
),
{
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
state_fog_fragpart
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
state_fogstartend
},
0
},
{
STATE_RENDER
(
WINED3DRS_FOGEND
),
{
STATE_RENDER
(
WINED3DRS_FOGSTART
),
state_fogstartend
},
0
},
{
STATE_SAMPLER
(
0
),
{
STATE_SAMPLER
(
0
),
nvts_texdim
},
NV_TEXTURE_SHADER2
},
{
STATE_SAMPLER
(
0
),
{
STATE_SAMPLER
(
0
),
sampler_texdim
},
0
},
{
STATE_SAMPLER
(
1
),
{
STATE_SAMPLER
(
1
),
nvts_texdim
},
NV_TEXTURE_SHADER2
},
...
...
dlls/wined3d/state.c
View file @
1deafcb5
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
View file @
1deafcb5
...
...
@@ -776,6 +776,12 @@ struct blit_shader {
extern
const
struct
blit_shader
ffp_blit
;
extern
const
struct
blit_shader
arbfp_blit
;
enum
fogsource
{
FOGSOURCE_FFP
,
FOGSOURCE_VS
,
FOGSOURCE_COORD
,
};
/* The new context manager that should deal with onscreen and offscreen rendering */
struct
WineD3DContext
{
/* State dirtification
...
...
@@ -812,6 +818,7 @@ struct WineD3DContext {
GLenum
tracking_parm
;
/* Which source is tracking current colour */
GLenum
untracked_materials
[
2
];
UINT
blit_w
,
blit_h
;
enum
fogsource
fog_source
;
char
*
vshader_const_dirty
,
*
pshader_const_dirty
;
...
...
@@ -2023,6 +2030,8 @@ void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext
void
apply_pixelshader
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
state_fogcolor
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
state_fogdensity
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
state_fogstartend
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
state_fog_fragpart
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
);
void
surface_force_reload
(
IWineD3DSurface
*
iface
);
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
*
iface
,
IWineD3DSwapChain
*
swapchain
);
...
...
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