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
a58cc9ff
Commit
a58cc9ff
authored
Jul 28, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL reflection: Fix #985: reflect runtime sized arrays having no constant index.
parent
a353bf1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
reflection.vert.out
Test/baseResults/reflection.vert.out
+1
-0
reflection.cpp
glslang/MachineIndependent/reflection.cpp
+2
-2
No files found.
Test/baseResults/reflection.vert.out
View file @
a58cc9ff
...
@@ -73,6 +73,7 @@ abl2.foo: offset 0, type 1406, size 1, index 11, binding -1
...
@@ -73,6 +73,7 @@ abl2.foo: offset 0, type 1406, size 1, index 11, binding -1
buf1.runtimeArray: offset 4, type 1406, size 4, index 12, binding -1
buf1.runtimeArray: offset 4, type 1406, size 4, index 12, binding -1
buf2.runtimeArray.c: offset 8, type 1406, size 1, index 13, binding -1
buf2.runtimeArray.c: offset 8, type 1406, size 1, index 13, binding -1
buf3.runtimeArray: offset 4, type 1406, size 0, index 14, binding -1
buf3.runtimeArray: offset 4, type 1406, size 0, index 14, binding -1
buf4.runtimeArray.c: offset 8, type 1406, size 1, index 15, binding -1
anonMember1: offset 0, type 8b51, size 1, index 0, binding -1
anonMember1: offset 0, type 8b51, size 1, index 0, binding -1
uf1: offset -1, type 1406, size 1, index -1, binding -1
uf1: offset -1, type 1406, size 1, index -1, binding -1
uf2: offset -1, type 1406, size 1, index -1, binding -1
uf2: offset -1, type 1406, size 1, index -1, binding -1
...
...
glslang/MachineIndependent/reflection.cpp
View file @
a58cc9ff
...
@@ -181,7 +181,7 @@ public:
...
@@ -181,7 +181,7 @@ public:
switch
(
visitNode
->
getOp
())
{
switch
(
visitNode
->
getOp
())
{
case
EOpIndexIndirect
:
case
EOpIndexIndirect
:
// Visit all the indices of this array, and for each one add on the remaining dereferencing
// Visit all the indices of this array, and for each one add on the remaining dereferencing
for
(
int
i
=
0
;
i
<
visitNode
->
getLeft
()
->
getType
().
getOuterArraySize
(
);
++
i
)
{
for
(
int
i
=
0
;
i
<
std
::
max
(
visitNode
->
getLeft
()
->
getType
().
getOuterArraySize
(),
1
);
++
i
)
{
TString
newBaseName
=
name
;
TString
newBaseName
=
name
;
if
(
baseType
.
getBasicType
()
!=
EbtBlock
)
if
(
baseType
.
getBasicType
()
!=
EbtBlock
)
newBaseName
.
append
(
TString
(
"["
)
+
String
(
i
)
+
"]"
);
newBaseName
.
append
(
TString
(
"["
)
+
String
(
i
)
+
"]"
);
...
@@ -216,7 +216,7 @@ public:
...
@@ -216,7 +216,7 @@ public:
if
(
terminalType
->
isArray
())
{
if
(
terminalType
->
isArray
())
{
// Visit all the indices of this array, and for each one,
// Visit all the indices of this array, and for each one,
// fully explode the remaining aggregate to dereference
// fully explode the remaining aggregate to dereference
for
(
int
i
=
0
;
i
<
terminalType
->
getOuterArraySize
(
);
++
i
)
{
for
(
int
i
=
0
;
i
<
std
::
max
(
terminalType
->
getOuterArraySize
(),
1
);
++
i
)
{
TString
newBaseName
=
name
;
TString
newBaseName
=
name
;
newBaseName
.
append
(
TString
(
"["
)
+
String
(
i
)
+
"]"
);
newBaseName
.
append
(
TString
(
"["
)
+
String
(
i
)
+
"]"
);
TType
derefType
(
*
terminalType
,
0
);
TType
derefType
(
*
terminalType
,
0
);
...
...
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