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
e161cc11
Commit
e161cc11
authored
Jul 25, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: No more restrictions on (non)shadow sampler construction.
Match
https://github.com/KhronosGroup/GLSL/pull/22
parent
62faea79
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
10 deletions
+2
-10
vulkan.frag.out
Test/baseResults/vulkan.frag.out
+1
-2
vulkan.frag
Test/vulkan.frag
+1
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+0
-7
No files found.
Test/baseResults/vulkan.frag.out
View file @
e161cc11
...
@@ -15,7 +15,6 @@ ERROR: 0:19: 'sampler2D' : sampler-constructor second argument must be a scalar
...
@@ -15,7 +15,6 @@ ERROR: 0:19: 'sampler2D' : sampler-constructor second argument must be a scalar
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 textureXXX 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 match type and dimensionality of constructor type
ERROR: 0:24: 'sampler2D' : sampler-constructor second argument presence of shadow must match constructor presence of shadow
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
...
@@ -55,7 +54,7 @@ ERROR: 0:101: 'noise1' : no matching overloaded function found
...
@@ -55,7 +54,7 @@ ERROR: 0:101: 'noise1' : no matching overloaded function found
ERROR: 0:102: 'noise2' : no matching overloaded function found
ERROR: 0:102: 'noise2' : no matching overloaded function found
ERROR: 0:103: 'noise3' : no matching overloaded function found
ERROR: 0:103: 'noise3' : no matching overloaded function found
ERROR: 0:104: 'noise4' : no matching overloaded function found
ERROR: 0:104: 'noise4' : no matching overloaded function found
ERROR: 5
4
compilation errors. No code generated.
ERROR: 5
3
compilation errors. No code generated.
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
...
...
Test/vulkan.frag
View file @
e161cc11
...
@@ -21,7 +21,7 @@ void badConst()
...
@@ -21,7 +21,7 @@ void badConst()
sampler3D
[
4
](
t3d5
,
sA
[
2
]);
// ERROR, can't make array
sampler3D
[
4
](
t3d5
,
sA
[
2
]);
// ERROR, can't make array
sampler2D
(
i2d
,
s
);
// ERROR, image instead of texture
sampler2D
(
i2d
,
s
);
// ERROR, image instead of texture
sampler2D
(
t3d
[
1
],
s
);
// ERROR, 3D not 2D
sampler2D
(
t3d
[
1
],
s
);
// ERROR, 3D not 2D
sampler2D
(
t2d
,
sShadow
);
// ERROR, shadow mismatch
sampler2D
(
t2d
,
sShadow
);
sampler2DShadow
(
t2d
,
s
);
sampler2DShadow
(
t2d
,
s
);
}
}
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
e161cc11
...
@@ -2655,19 +2655,12 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
...
@@ -2655,19 +2655,12 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
// second argument
// second argument
// * the constructor's second argument must be a scalar of type
// * the constructor's second argument must be a scalar of type
// *sampler* or *samplerShadow*
// *sampler* or *samplerShadow*
// * if the second argument is *samplerShadow* the constructor must be a
// shadow constructor (however, shadow constructors are allowed to have
// a second argument of *sampler*)
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 type 'sampler'"
,
token
,
""
);
return
true
;
return
true
;
}
}
if
(
!
function
.
getType
().
getSampler
().
shadow
&&
function
[
1
].
type
->
getSampler
().
shadow
)
{
error
(
loc
,
"sampler-constructor second argument presence of shadow must match constructor presence of shadow"
,
token
,
""
);
return
true
;
}
return
false
;
return
false
;
}
}
...
...
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