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
42ddfbd3
Unverified
Commit
42ddfbd3
authored
Mar 01, 2021
by
greg-lunarg
Committed by
GitHub
Mar 01, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2557 from greg-lunarg/i2552b
Fix off-by-1 bug in gl_MaxCombinedTextureImageUnits check
parents
e04a046c
051fbbb6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
420.vert
Test/420.vert
+1
-0
420.vert.out
Test/baseResults/420.vert.out
+2
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+3
-7
No files found.
Test/420.vert
View file @
42ddfbd3
...
...
@@ -159,3 +159,4 @@ void qlod()
}
layout
(
binding
=
0
)
writeonly
uniform
image1D
badArray
[];
layout
(
binding
=
74
)
uniform
sampler2D
u_sampler0
[
6
];
Test/baseResults/420.vert.out
View file @
42ddfbd3
...
...
@@ -306,6 +306,7 @@ ERROR: node is still EOpNull!
0:? 'samp1D' ( uniform sampler1D)
0:? 'samp1Ds' ( uniform sampler1DShadow)
0:? 'badArray' (layout( binding=0) writeonly uniform unsized 1-element array of image1D)
0:? 'u_sampler0' (layout( binding=74) uniform 6-element array of sampler2D)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
...
...
@@ -388,6 +389,7 @@ ERROR: node is still EOpNull!
0:? 'samp1D' ( uniform sampler1D)
0:? 'samp1Ds' ( uniform sampler1DShadow)
0:? 'badArray' (layout( binding=0) writeonly uniform 1-element array of image1D)
0:? 'u_sampler0' (layout( binding=74) uniform 6-element array of sampler2D)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
glslang/MachineIndependent/ParseHelper.cpp
View file @
42ddfbd3
...
...
@@ -5913,16 +5913,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
if
(
type
.
getBasicType
()
==
EbtSampler
)
{
int
lastBinding
=
qualifier
.
layoutBinding
;
if
(
type
.
isArray
())
{
if
(
spvVersion
.
vulkan
>
0
)
lastBinding
+=
1
;
else
{
if
(
spvVersion
.
vulkan
==
0
)
{
if
(
type
.
isSizedArray
())
lastBinding
+=
type
.
getCumulativeArraySize
(
);
lastBinding
+=
(
type
.
getCumulativeArraySize
()
-
1
);
else
{
lastBinding
+=
1
;
#ifndef GLSLANG_WEB
if
(
spvVersion
.
vulkan
==
0
)
warn
(
loc
,
"assuming binding count of one for compile-time checking of binding numbers for unsized array"
,
"[]"
,
""
);
warn
(
loc
,
"assuming binding count of one for compile-time checking of binding numbers for unsized array"
,
"[]"
,
""
);
#endif
}
}
...
...
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