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
414f7354
Commit
414f7354
authored
Jul 27, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Front-end: Fix issue #409, check for implicitly-sized binding arrays.
parent
e15509e4
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
3 deletions
+13
-3
420.vert
Test/420.vert
+2
-0
420.vert.out
Test/baseResults/420.vert.out
+3
-0
revision.h
glslang/Include/revision.h
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+6
-1
linkValidate.cpp
glslang/MachineIndependent/linkValidate.cpp
+1
-1
No files found.
Test/420.vert
View file @
414f7354
...
...
@@ -157,3 +157,5 @@ void qlod()
levels
=
textureQueryLevels
(
samp1D
);
// ERROR, not until 430
levels
=
textureQueryLevels
(
samp1Ds
);
// ERROR, not until 430
}
layout
(
binding
=
0
)
writeonly
uniform
image1D
badArray
[];
Test/baseResults/420.vert.out
View file @
414f7354
...
...
@@ -51,6 +51,7 @@ ERROR: 0:157: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:157: 'assign' : cannot convert from 'const float' to 'temp int'
ERROR: 0:158: 'textureQueryLevels' : no matching overloaded function found
ERROR: 0:158: 'assign' : cannot convert from 'const float' to 'temp int'
WARNING: 0:161: '[]' : assuming array size of one for compile-time checking of binding numbers for implicitly-sized array
ERROR: 50 compilation errors. No code generated.
...
...
@@ -299,6 +300,7 @@ ERROR: node is still EOpNull!
0:? 'offcheckI' (layout(column_major shared ) uniform block{layout(column_major shared offset=16 ) uniform int foo})
0:? 'samp1D' (uniform sampler1D)
0:? 'samp1Ds' (uniform sampler1DShadow)
0:? 'badArray' (layout(binding=0 ) writeonly uniform implicitly-sized array of image1D)
0:? 'gl_VertexID' (gl_VertexId int VertexId)
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
...
...
@@ -551,6 +553,7 @@ ERROR: node is still EOpNull!
0:? 'offcheckI' (layout(column_major shared ) uniform block{layout(column_major shared offset=16 ) uniform int foo})
0:? 'samp1D' (uniform sampler1D)
0:? 'samp1Ds' (uniform sampler1DShadow)
0:? 'badArray' (layout(binding=0 ) writeonly uniform 1-element array of image1D)
0:? 'gl_VertexID' (gl_VertexId int VertexId)
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
glslang/Include/revision.h
View file @
414f7354
...
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.135
1
"
#define GLSLANG_REVISION "SPIRV99.135
3
"
#define GLSLANG_DATE "27-Jul-2016"
glslang/MachineIndependent/ParseHelper.cpp
View file @
414f7354
...
...
@@ -4544,8 +4544,13 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
error
(
loc
,
"requires block, or sampler/image, or atomic-counter type"
,
"binding"
,
""
);
if
(
type
.
getBasicType
()
==
EbtSampler
)
{
int
lastBinding
=
qualifier
.
layoutBinding
;
if
(
type
.
isArray
())
if
(
type
.
isArray
())
{
if
(
type
.
isImplicitlySizedArray
())
{
lastBinding
+=
1
;
warn
(
loc
,
"assuming array size of one for compile-time checking of binding numbers for implicitly-sized array"
,
"[]"
,
""
);
}
else
lastBinding
+=
type
.
getCumulativeArraySize
();
}
if
(
lastBinding
>=
resources
.
maxCombinedTextureImageUnits
)
error
(
loc
,
"sampler binding not less than gl_MaxCombinedTextureImageUnits"
,
"binding"
,
type
.
isArray
()
?
"(using array)"
:
""
);
}
...
...
glslang/MachineIndependent/linkValidate.cpp
View file @
414f7354
...
...
@@ -651,7 +651,7 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
int
size
;
if
(
qualifier
.
isUniformOrBuffer
())
{
if
(
type
.
isArray
())
if
(
type
.
is
ExplicitlySized
Array
())
size
=
type
.
getCumulativeArraySize
();
else
size
=
1
;
...
...
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