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
3153441f
Commit
3153441f
authored
Nov 12, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d/atifs: Move TEXTUREFACTOR constant loading to arbfp_apply_draw_state().
parent
3db38ea7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+21
-12
No files found.
dlls/wined3d/ati_fragment_shader.c
View file @
3153441f
...
...
@@ -948,13 +948,16 @@ static GLuint gen_ati_shader(const struct texture_stage_op op[WINED3D_MAX_FFP_TE
static
void
atifs_tfactor
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
struct
atifs_context_private_data
*
ctx_priv
=
context
->
fragment_pipe_data
;
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_PS
;
}
static
void
atifs_update_ps_constants
(
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_state
*
state
)
{
struct
atifs_context_private_data
*
ctx_priv
=
context_gl
->
c
.
fragment_pipe_data
;
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
gl_info
;
struct
wined3d_color
color
;
if
(
!
ctx_priv
->
last_shader
||
ctx_priv
->
last_shader
->
constants
[
ATIFS_CONST_TFACTOR
-
GL_CON_0_ATI
]
!=
ATIFS_CONSTANT_TFACTOR
)
if
(
ctx_priv
->
last_shader
->
constants
[
ATIFS_CONST_TFACTOR
-
GL_CON_0_ATI
]
!=
ATIFS_CONSTANT_TFACTOR
)
return
;
wined3d_color_from_d3dcolor
(
&
color
,
state
->
render_states
[
WINED3D_RS_TEXTUREFACTOR
]);
...
...
@@ -1076,7 +1079,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined
break
;
case
ATIFS_CONSTANT_TFACTOR
:
atifs_tfactor
(
context
,
state
,
STATE_RENDER
(
WINED3D_RS_TEXTUREFACTOR
))
;
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_PS
;
break
;
case
ATIFS_CONSTANT_STAGE
:
...
...
@@ -1253,18 +1256,24 @@ static const struct wined3d_state_entry_template atifs_fragmentstate_template[]
/* Context activation is done by the caller. */
static
void
atifs_apply_draw_state
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
{
const
struct
wined3d_gl_info
*
gl_info
=
wined3d_context_gl_const
(
context
)
->
gl_info
;
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
gl_info
;
uint32_t
constant_update_mask
;
if
(
!
use_ps
(
state
))
{
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_FRAGMENT_SHADER_ATI
);
checkGLcall
(
"glEnable(GL_FRAGMENT_SHADER_ATI)"
);
}
else
if
(
use_ps
(
state
))
{
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_FRAGMENT_SHADER_ATI
);
checkGLcall
(
"glDisable(GL_FRAGMENT_SHADER_ATI)"
);
return
;
}
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_FRAGMENT_SHADER_ATI
);
checkGLcall
(
"glEnable(GL_FRAGMENT_SHADER_ATI)"
);
constant_update_mask
=
context
->
constant_update_mask
;
if
(
constant_update_mask
&
WINED3D_SHADER_CONST_FFP_PS
)
atifs_update_ps_constants
(
context_gl
,
state
);
}
static
void
atifs_disable
(
const
struct
wined3d_context
*
context
)
...
...
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