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
b648b741
Commit
b648b741
authored
Jun 18, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass fogstart==fogend to GL in fog table mode.
parent
ba16113d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+3
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+3
-1
state.c
dlls/wined3d/state.c
+10
-3
No files found.
dlls/wined3d/arb_program_shader.c
View file @
b648b741
...
...
@@ -6513,6 +6513,8 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
static
void
state_arbfp_fog
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
enum
fogsource
new_source
;
DWORD
fogstart
=
state
->
render_states
[
WINED3D_RS_FOGSTART
];
DWORD
fogend
=
state
->
render_states
[
WINED3D_RS_FOGEND
];
TRACE
(
"context %p, state %p, state_id %#x.
\n
"
,
context
,
state
,
state_id
);
...
...
@@ -6541,7 +6543,7 @@ static void state_arbfp_fog(struct wined3d_context *context, const struct wined3
new_source
=
FOGSOURCE_FFP
;
}
if
(
new_source
!=
context
->
fog_source
)
if
(
new_source
!=
context
->
fog_source
||
fogstart
==
fogend
)
{
context
->
fog_source
=
new_source
;
state_fogstartend
(
context
,
state
,
STATE_RENDER
(
WINED3D_RS_FOGSTART
));
...
...
dlls/wined3d/glsl_shader.c
View file @
b648b741
...
...
@@ -7086,6 +7086,8 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context,
{
BOOL
use_vshader
=
use_vs
(
state
);
enum
fogsource
new_source
;
DWORD
fogstart
=
state
->
render_states
[
WINED3D_RS_FOGSTART
];
DWORD
fogend
=
state
->
render_states
[
WINED3D_RS_FOGEND
];
context
->
select_shader
=
1
;
context
->
load_constants
=
1
;
...
...
@@ -7107,7 +7109,7 @@ static void glsl_fragment_pipe_fog(struct wined3d_context *context,
new_source
=
FOGSOURCE_FFP
;
}
if
(
new_source
!=
context
->
fog_source
)
if
(
new_source
!=
context
->
fog_source
||
fogstart
==
fogend
)
{
context
->
fog_source
=
new_source
;
state_fogstartend
(
context
,
state
,
STATE_RENDER
(
WINED3D_RS_FOGSTART
));
...
...
dlls/wined3d/state.c
View file @
b648b741
...
...
@@ -1043,8 +1043,13 @@ void state_fogstartend(struct wined3d_context *context, const struct wined3d_sta
fogstart
=
tmpvalue
.
f
;
tmpvalue
.
d
=
state
->
render_states
[
WINED3D_RS_FOGEND
];
fogend
=
tmpvalue
.
f
;
/* In GL, fogstart == fogend disables fog, in D3D everything's fogged.*/
if
(
fogstart
==
fogend
)
{
/* Special handling for fogstart == fogend. In d3d with vertex
* fog, everything is fogged. With table fog, everything with
* fog_coord < fog_start is unfogged, and fog_coord > fog_start
* is fogged. Windows drivers disagree when fog_coord == fog_start. */
if
(
state
->
render_states
[
WINED3D_RS_FOGTABLEMODE
]
==
WINED3D_FOG_NONE
&&
fogstart
==
fogend
)
{
fogstart
=
-
INFINITY
;
fogend
=
0
.
0
f
;
}
...
...
@@ -1072,6 +1077,8 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
enum
fogsource
new_source
;
DWORD
fogstart
=
state
->
render_states
[
WINED3D_RS_FOGSTART
];
DWORD
fogend
=
state
->
render_states
[
WINED3D_RS_FOGEND
];
TRACE
(
"context %p, state %p, state_id %#x.
\n
"
,
context
,
state
,
state_id
);
...
...
@@ -1217,7 +1224,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
glEnableWINE
(
GL_FOG
);
checkGLcall
(
"glEnable GL_FOG"
);
if
(
new_source
!=
context
->
fog_source
)
if
(
new_source
!=
context
->
fog_source
||
fogstart
==
fogend
)
{
context
->
fog_source
=
new_source
;
state_fogstartend
(
context
,
state
,
STATE_RENDER
(
WINED3D_RS_FOGSTART
));
...
...
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