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
cc16e0d2
Commit
cc16e0d2
authored
Jul 25, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Validate vertex shader input signature register indices (AFL).
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a24b8267
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
shader.c
dlls/wined3d/shader.c
+10
-2
No files found.
dlls/wined3d/shader.c
View file @
cc16e0d2
...
...
@@ -1684,14 +1684,22 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
{
for
(
i
=
0
;
i
<
input_signature
->
element_count
;
++
i
)
{
reg_maps
->
input_registers
|=
1u
<<
input_signature
->
elements
[
i
].
register_idx
;
if
(
shader_version
.
type
==
WINED3D_SHADER_TYPE_PIXEL
)
if
(
shader_version
.
type
==
WINED3D_SHADER_TYPE_VERTEX
)
{
if
(
input_signature
->
elements
[
i
].
register_idx
>=
ARRAY_SIZE
(
shader
->
u
.
vs
.
attributes
))
{
WARN
(
"Invalid input signature register index %u.
\n
"
,
input_signature
->
elements
[
i
].
register_idx
);
return
WINED3DERR_INVALIDCALL
;
}
}
else
if
(
shader_version
.
type
==
WINED3D_SHADER_TYPE_PIXEL
)
{
if
(
input_signature
->
elements
[
i
].
sysval_semantic
==
WINED3D_SV_POSITION
)
reg_maps
->
vpos
=
1
;
else
if
(
input_signature
->
elements
[
i
].
sysval_semantic
==
WINED3D_SV_IS_FRONT_FACE
)
reg_maps
->
usesfacing
=
1
;
}
reg_maps
->
input_registers
|=
1u
<<
input_signature
->
elements
[
i
].
register_idx
;
}
}
else
if
(
!
input_signature
->
elements
&&
reg_maps
->
input_registers
)
...
...
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