Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
b3f9e0a3
Commit
b3f9e0a3
authored
Feb 02, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: Fix #1229: merge array sizes in parameter declarations.
parent
98e733cb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
5 deletions
+30
-5
310AofA.vert
Test/310AofA.vert
+6
-0
310AofA.vert.out
Test/baseResults/310AofA.vert.out
+19
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+1
-1
glslang.y
glslang/MachineIndependent/glslang.y
+2
-2
glslang_tab.cpp
glslang/MachineIndependent/glslang_tab.cpp
+2
-2
No files found.
Test/310AofA.vert
View file @
b3f9e0a3
...
...
@@ -113,3 +113,9 @@ out float outArray[2][3]; // ERROR
uniform
ubaa
{
int
a
;
}
ubaaname
[
2
][
3
];
// ERROR
vec3
func
(
in
mat3
[
2
]
x
[
3
])
{
mat3
a0
=
x
[
2
][
1
];
return
a0
[
2
];
}
Test/baseResults/310AofA.vert.out
View file @
b3f9e0a3
...
...
@@ -317,6 +317,25 @@ ERROR: node is still EOpNull!
0:99 0 (const int)
0:99 Constant:
0:99 1 (const int)
0:117 Function Definition: func(mf33[3][2]; ( global highp 3-component vector of float)
0:117 Function Parameters:
0:117 'x' ( in 3-element array of 2-element array of highp 3X3 matrix of float)
0:119 Sequence
0:119 Sequence
0:119 move second child to first child ( temp highp 3X3 matrix of float)
0:119 'a0' ( temp highp 3X3 matrix of float)
0:119 direct index ( temp highp 3X3 matrix of float)
0:119 direct index ( temp 2-element array of highp 3X3 matrix of float)
0:119 'x' ( in 3-element array of 2-element array of highp 3X3 matrix of float)
0:119 Constant:
0:119 2 (const int)
0:119 Constant:
0:119 1 (const int)
0:120 Branch: Return with expression
0:120 direct index ( temp highp 3-component vector of float)
0:120 'a0' ( temp highp 3X3 matrix of float)
0:120 Constant:
0:120 2 (const int)
0:? Linker Objects
0:? 'name' (layout( column_major shared) buffer 3-element array of block{layout( column_major shared) buffer implicitly-sized array of highp float u, layout( column_major shared) buffer implicitly-sized array of highp 4-component vector of float v})
0:? 'uname' (layout( column_major shared) uniform 3-element array of block{layout( column_major shared) uniform highp float u, layout( column_major shared) uniform implicitly-sized array of highp 4-component vector of float v})
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
b3f9e0a3
...
...
@@ -3103,7 +3103,7 @@ void TParseContext::arrayDimCheck(const TSourceLoc& loc, const TType* type, cons
//
void
TParseContext
::
arrayDimMerge
(
TType
&
type
,
const
TArraySizes
*
sizes
)
{
if
(
sizes
)
if
(
sizes
!=
nullptr
)
type
.
addArrayOuterSizes
(
*
sizes
);
}
...
...
glslang/MachineIndependent/glslang.y
View file @
b3f9e0a3
...
...
@@ -902,9 +902,9 @@ parameter_declarator
parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes);
parseContext.reservedErrorCheck($2.loc, *$2.string);
$1.arraySizes = $3.arraySizes;
TParameter param = { $2.string, new TType($1)};
parseContext.arrayDimMerge(*param.type, $3.arraySizes);
$$.loc = $2.loc;
$$.param = param;
}
...
...
glslang/MachineIndependent/glslang_tab.cpp
View file @
b3f9e0a3
...
...
@@ -4433,9 +4433,9 @@ yyreduce:
parseContext
.
arraySizeRequiredCheck
((
yyvsp
[
0
].
interm
).
loc
,
*
(
yyvsp
[
0
].
interm
).
arraySizes
);
parseContext
.
reservedErrorCheck
((
yyvsp
[
-
1
].
lex
).
loc
,
*
(
yyvsp
[
-
1
].
lex
).
string
);
(
yyvsp
[
-
2
].
interm
.
type
).
arraySizes
=
(
yyvsp
[
0
].
interm
).
arraySizes
;
TParameter
param
=
{
(
yyvsp
[
-
1
].
lex
).
string
,
new
TType
((
yyvsp
[
-
2
].
interm
.
type
))};
parseContext
.
arrayDimMerge
(
*
param
.
type
,
(
yyvsp
[
0
].
interm
).
arraySizes
);
(
yyval
.
interm
).
loc
=
(
yyvsp
[
-
1
].
lex
).
loc
;
(
yyval
.
interm
).
param
=
param
;
}
...
...
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