Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mesa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
virgl-es
mesa
Commits
5226f8c7
Commit
5226f8c7
authored
Aug 25, 2010
by
Aras Pranckevicius
Committed by
Ian Romanick
Aug 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
glsl: fix crash with variable indexing into array in a struct
Signed-off-by:
Ian Romanick
<
ian.d.romanick@intel.com
>
parent
a1f2ac2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/glsl/ast_to_hir.cpp
src/glsl/ast_to_hir.cpp
+7
-1
No files found.
src/glsl/ast_to_hir.cpp
View file @
5226f8c7
...
...
@@ -1259,8 +1259,14 @@ ast_expression::hir(exec_list *instructions,
_mesa_glsl_error
(
&
loc
,
state
,
"unsized array index must be constant"
);
}
else
{
if
(
array
->
type
->
is_array
())
{
/* whole_variable_referenced can return NULL if the array is a
* member of a structure. In this case it is safe to not update
* the max_array_access field because it is never used for fields
* of structures.
*/
ir_variable
*
v
=
array
->
whole_variable_referenced
();
v
->
max_array_access
=
array
->
type
->
array_size
();
if
(
v
!=
NULL
)
v
->
max_array_access
=
array
->
type
->
array_size
();
}
}
...
...
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