Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a79db19f
Commit
a79db19f
authored
Jan 01, 2024
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 05, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Set fixed_function_usage_map to 0 for an sm4 draw without a PS.
Fixes:
5b60f464
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56113
parent
0900d919
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
28 deletions
+43
-28
context_gl.c
dlls/wined3d/context_gl.c
+43
-28
No files found.
dlls/wined3d/context_gl.c
View file @
a79db19f
...
...
@@ -3735,40 +3735,55 @@ static void context_invalidate_texture_stage(struct wined3d_context *context, DW
context_invalidate_state
(
context
,
STATE_TEXTURESTAGE
(
stage
,
i
));
}
static
bool
use_ffp_ps
(
const
struct
wined3d_state
*
state
)
{
struct
wined3d_shader
*
vs
=
state
->
shader
[
WINED3D_SHADER_TYPE_VERTEX
];
if
(
!
use_vs
(
state
))
return
true
;
if
(
vs
&&
vs
->
reg_maps
.
shader_version
.
major
>=
4
)
return
false
;
return
true
;
}
static
void
context_update_fixed_function_usage_map
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
)
{
UINT
i
,
start
,
end
;
UINT
i
=
0
,
start
,
end
;
context
->
fixed_function_usage_map
=
0
;
for
(
i
=
0
;
i
<
WINED3D_MAX_FFP_TEXTURES
;
++
i
)
{
enum
wined3d_texture_op
color_op
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_OP
];
enum
wined3d_texture_op
alpha_op
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_OP
];
DWORD
color_arg1
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG1
]
&
WINED3DTA_SELECTMASK
;
DWORD
color_arg2
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG2
]
&
WINED3DTA_SELECTMASK
;
DWORD
color_arg3
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG0
]
&
WINED3DTA_SELECTMASK
;
DWORD
alpha_arg1
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_ARG1
]
&
WINED3DTA_SELECTMASK
;
DWORD
alpha_arg2
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_ARG2
]
&
WINED3DTA_SELECTMASK
;
DWORD
alpha_arg3
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_ARG0
]
&
WINED3DTA_SELECTMASK
;
/* Not used, and disable higher stages. */
if
(
color_op
==
WINED3D_TOP_DISABLE
)
break
;
if
(((
color_arg1
==
WINED3DTA_TEXTURE
)
&&
color_op
!=
WINED3D_TOP_SELECT_ARG2
)
||
((
color_arg2
==
WINED3DTA_TEXTURE
)
&&
color_op
!=
WINED3D_TOP_SELECT_ARG1
)
||
((
color_arg3
==
WINED3DTA_TEXTURE
)
&&
(
color_op
==
WINED3D_TOP_MULTIPLY_ADD
||
color_op
==
WINED3D_TOP_LERP
))
||
((
alpha_arg1
==
WINED3DTA_TEXTURE
)
&&
alpha_op
!=
WINED3D_TOP_SELECT_ARG2
)
||
((
alpha_arg2
==
WINED3DTA_TEXTURE
)
&&
alpha_op
!=
WINED3D_TOP_SELECT_ARG1
)
||
((
alpha_arg3
==
WINED3DTA_TEXTURE
)
&&
(
alpha_op
==
WINED3D_TOP_MULTIPLY_ADD
||
alpha_op
==
WINED3D_TOP_LERP
)))
context
->
fixed_function_usage_map
|=
(
1u
<<
i
);
if
((
color_op
==
WINED3D_TOP_BUMPENVMAP
||
color_op
==
WINED3D_TOP_BUMPENVMAP_LUMINANCE
)
&&
i
<
WINED3D_MAX_FFP_TEXTURES
-
1
)
context
->
fixed_function_usage_map
|=
(
1u
<<
(
i
+
1
));
if
(
use_ffp_ps
(
state
))
{
for
(
i
=
0
;
i
<
WINED3D_MAX_FFP_TEXTURES
;
++
i
)
{
enum
wined3d_texture_op
color_op
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_OP
];
enum
wined3d_texture_op
alpha_op
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_OP
];
DWORD
color_arg1
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG1
]
&
WINED3DTA_SELECTMASK
;
DWORD
color_arg2
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG2
]
&
WINED3DTA_SELECTMASK
;
DWORD
color_arg3
=
state
->
texture_states
[
i
][
WINED3D_TSS_COLOR_ARG0
]
&
WINED3DTA_SELECTMASK
;
DWORD
alpha_arg1
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_ARG1
]
&
WINED3DTA_SELECTMASK
;
DWORD
alpha_arg2
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_ARG2
]
&
WINED3DTA_SELECTMASK
;
DWORD
alpha_arg3
=
state
->
texture_states
[
i
][
WINED3D_TSS_ALPHA_ARG0
]
&
WINED3DTA_SELECTMASK
;
/* Not used, and disable higher stages. */
if
(
color_op
==
WINED3D_TOP_DISABLE
)
break
;
if
(((
color_arg1
==
WINED3DTA_TEXTURE
)
&&
color_op
!=
WINED3D_TOP_SELECT_ARG2
)
||
((
color_arg2
==
WINED3DTA_TEXTURE
)
&&
color_op
!=
WINED3D_TOP_SELECT_ARG1
)
||
((
color_arg3
==
WINED3DTA_TEXTURE
)
&&
(
color_op
==
WINED3D_TOP_MULTIPLY_ADD
||
color_op
==
WINED3D_TOP_LERP
))
||
((
alpha_arg1
==
WINED3DTA_TEXTURE
)
&&
alpha_op
!=
WINED3D_TOP_SELECT_ARG2
)
||
((
alpha_arg2
==
WINED3DTA_TEXTURE
)
&&
alpha_op
!=
WINED3D_TOP_SELECT_ARG1
)
||
((
alpha_arg3
==
WINED3DTA_TEXTURE
)
&&
(
alpha_op
==
WINED3D_TOP_MULTIPLY_ADD
||
alpha_op
==
WINED3D_TOP_LERP
)))
context
->
fixed_function_usage_map
|=
(
1u
<<
i
);
if
((
color_op
==
WINED3D_TOP_BUMPENVMAP
||
color_op
==
WINED3D_TOP_BUMPENVMAP_LUMINANCE
)
&&
i
<
WINED3D_MAX_FFP_TEXTURES
-
1
)
context
->
fixed_function_usage_map
|=
(
1u
<<
(
i
+
1
));
}
}
if
(
i
<
context
->
lowest_disabled_stage
)
...
...
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