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
8f2586cf
Commit
8f2586cf
authored
Nov 12, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d/nvrc: Move TEXTUREFACTOR constant loading to nvrc_apply_draw_state().
parent
aa78b46e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+13
-12
No files found.
dlls/wined3d/nvidia_texture_shader.c
View file @
8f2586cf
...
...
@@ -651,28 +651,29 @@ static void nvts_bumpenvmat(struct wined3d_context *context, const struct wined3
static
void
nvrc_texfactor
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
gl_info
;
struct
wined3d_color
color
;
wined3d_color_from_d3dcolor
(
&
color
,
state
->
render_states
[
WINED3D_RS_TEXTUREFACTOR
]);
GL_EXTCALL
(
glCombinerParameterfvNV
(
GL_CONSTANT_COLOR0_NV
,
&
color
.
r
));
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_PS
;
}
/* Context activation is done by the caller. */
static
void
nvrc_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_color
color
;
if
(
!
use_ps
(
state
))
{
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_REGISTER_COMBINERS_NV
);
checkGLcall
(
"glEnable(GL_REGISTER_COMBINERS_NV)"
);
}
else
if
(
use_ps
(
state
))
{
gl_info
->
gl_ops
.
gl
.
p_glDisable
(
GL_REGISTER_COMBINERS_NV
);
checkGLcall
(
"glDisable(GL_REGISTER_COMBINERS_NV)"
);
return
;
}
gl_info
->
gl_ops
.
gl
.
p_glEnable
(
GL_REGISTER_COMBINERS_NV
);
checkGLcall
(
"glEnable(GL_REGISTER_COMBINERS_NV)"
);
if
(
context
->
constant_update_mask
&
WINED3D_SHADER_CONST_FFP_PS
)
{
wined3d_color_from_d3dcolor
(
&
color
,
state
->
render_states
[
WINED3D_RS_TEXTUREFACTOR
]);
GL_EXTCALL
(
glCombinerParameterfvNV
(
GL_CONSTANT_COLOR0_NV
,
&
color
.
r
));
}
}
...
...
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