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
a14793f5
Commit
a14793f5
authored
Nov 02, 2013
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
Nov 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix resultarg state handling in nvrc/nvts code.
Resultarg affects both rgb and alpha register combiner output. Ensure that changing resultarg updates both.
parent
cc02e152
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
nvidia_texture_shader.c
dlls/wined3d/nvidia_texture_shader.c
+24
-8
No files found.
dlls/wined3d/nvidia_texture_shader.c
View file @
a14793f5
...
...
@@ -580,6 +580,22 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
}
}
static
void
nvrc_resultarg
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
DWORD
stage
=
(
state_id
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
TRACE
(
"Setting result arg for stage %u.
\n
"
,
stage
);
if
(
!
isStateDirty
(
context
,
STATE_TEXTURESTAGE
(
stage
,
WINED3D_TSS_COLOR_OP
)))
{
context_apply_state
(
context
,
state
,
STATE_TEXTURESTAGE
(
stage
,
WINED3D_TSS_COLOR_OP
));
}
if
(
!
isStateDirty
(
context
,
STATE_TEXTURESTAGE
(
stage
,
WINED3D_TSS_ALPHA_OP
)))
{
context_apply_state
(
context
,
state
,
STATE_TEXTURESTAGE
(
stage
,
WINED3D_TSS_ALPHA_OP
));
}
}
static
void
nvts_texdim
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
DWORD
sampler
=
state_id
-
STATE_SAMPLER
(
0
);
...
...
@@ -769,7 +785,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
0
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -782,7 +798,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
1
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -795,7 +811,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
2
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -808,7 +824,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
3
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -821,7 +837,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
4
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -834,7 +850,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
5
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -847,7 +863,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
6
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_OP
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_OP
),
nvrc_colorop
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_ARG1
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_ARG2
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
...
...
@@ -860,7 +876,7 @@ static const struct StateEntryTemplate nvrc_fragmentstate_template[] =
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT11
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_BUMPENV_MAT00
),
NULL
},
NV_TEXTURE_SHADER2
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_ARG0
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_ALPHA_ARG0
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_ALPHA_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_
COLOR_OP
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_RESULT_ARG
),
{
STATE_TEXTURESTAGE
(
7
,
WINED3D_TSS_
RESULT_ARG
),
nvrc_resultarg
},
WINED3D_GL_EXT_NONE
},
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
apply_pixelshader
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3D_RS_SRGBWRITEENABLE
),
{
STATE_SHADER
(
WINED3D_SHADER_TYPE_PIXEL
),
NULL
},
WINED3D_GL_EXT_NONE
},
{
STATE_RENDER
(
WINED3D_RS_TEXTUREFACTOR
),
{
STATE_RENDER
(
WINED3D_RS_TEXTUREFACTOR
),
nvrc_texfactor
},
WINED3D_GL_EXT_NONE
},
...
...
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