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
9c3204a1
Commit
9c3204a1
authored
Apr 07, 2020
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error message: Finish addressing #2097, better texture error message.
parent
b5757b95
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
vulkan.frag.out
Test/baseResults/vulkan.frag.out
+7
-7
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+4
-3
No files found.
Test/baseResults/vulkan.frag.out
View file @
9c3204a1
...
@@ -7,14 +7,14 @@ ERROR: 0:8: 'binding' : sampler/texture/image requires layout(binding=X)
...
@@ -7,14 +7,14 @@ ERROR: 0:8: 'binding' : sampler/texture/image requires layout(binding=X)
ERROR: 0:9: 'binding' : sampler/texture/image requires layout(binding=X)
ERROR: 0:9: 'binding' : sampler/texture/image requires layout(binding=X)
ERROR: 0:10: 'binding' : sampler/texture/image requires layout(binding=X)
ERROR: 0:10: 'binding' : sampler/texture/image requires layout(binding=X)
ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments
ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments
ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar
textureXXX
type
ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar
*texture*
type
ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar
textureXXX
type
ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar
*texture*
type
ERROR: 0:17: 'sampler2D' : sampler-constructor second argument must be a scalar
type 'sampler'
ERROR: 0:17: 'sampler2D' : sampler-constructor second argument must be a scalar
sampler or samplerShadow
ERROR: 0:18: 'sampler2D' : sampler-constructor second argument must be a scalar
type 'sampler'
ERROR: 0:18: 'sampler2D' : sampler-constructor second argument must be a scalar
sampler or samplerShadow
ERROR: 0:19: 'sampler2D' : sampler-constructor second argument must be a scalar
type 'sampler'
ERROR: 0:19: 'sampler2D' : sampler-constructor second argument must be a scalar
sampler or samplerShadow
ERROR: 0:21: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:21: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:22: 'sampler2D' : sampler-constructor first argument must be a scalar
textureXXX
type
ERROR: 0:22: 'sampler2D' : sampler-constructor first argument must be a scalar
*texture*
type
ERROR: 0:23: 'sampler2D' : sampler-constructor first argument must
match type and dimensionality of constructor type
ERROR: 0:23: 'sampler2D' : sampler-constructor first argument must
be a *texture* type matching the dimensionality and sampled type of the constructor
ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D
ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform variables or function parameters: s2D
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
9c3204a1
...
@@ -3152,7 +3152,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
...
@@ -3152,7 +3152,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
if
(
function
[
0
].
type
->
getBasicType
()
!=
EbtSampler
||
if
(
function
[
0
].
type
->
getBasicType
()
!=
EbtSampler
||
!
function
[
0
].
type
->
getSampler
().
isTexture
()
||
!
function
[
0
].
type
->
getSampler
().
isTexture
()
||
function
[
0
].
type
->
isArray
())
{
function
[
0
].
type
->
isArray
())
{
error
(
loc
,
"sampler-constructor first argument must be a scalar
textureXXX
type"
,
token
,
""
);
error
(
loc
,
"sampler-constructor first argument must be a scalar
*texture*
type"
,
token
,
""
);
return
true
;
return
true
;
}
}
// simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=()
// simulate the first argument's impact on the result type, so it can be compared with the encapsulated operator!=()
...
@@ -3160,7 +3160,8 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
...
@@ -3160,7 +3160,8 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
texture
.
setCombined
(
false
);
texture
.
setCombined
(
false
);
texture
.
shadow
=
false
;
texture
.
shadow
=
false
;
if
(
texture
!=
function
[
0
].
type
->
getSampler
())
{
if
(
texture
!=
function
[
0
].
type
->
getSampler
())
{
error
(
loc
,
"sampler-constructor first argument must match type and dimensionality of constructor type"
,
token
,
""
);
error
(
loc
,
"sampler-constructor first argument must be a *texture* type"
" matching the dimensionality and sampled type of the constructor"
,
token
,
""
);
return
true
;
return
true
;
}
}
...
@@ -3170,7 +3171,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
...
@@ -3170,7 +3171,7 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
if
(
function
[
1
].
type
->
getBasicType
()
!=
EbtSampler
||
if
(
function
[
1
].
type
->
getBasicType
()
!=
EbtSampler
||
!
function
[
1
].
type
->
getSampler
().
isPureSampler
()
||
!
function
[
1
].
type
->
getSampler
().
isPureSampler
()
||
function
[
1
].
type
->
isArray
())
{
function
[
1
].
type
->
isArray
())
{
error
(
loc
,
"sampler-constructor second argument must be a scalar
type 'sampler'
"
,
token
,
""
);
error
(
loc
,
"sampler-constructor second argument must be a scalar
sampler or samplerShadow
"
,
token
,
""
);
return
true
;
return
true
;
}
}
...
...
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