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
5313613d
Commit
5313613d
authored
Oct 17, 2017
by
Aaron Muir Hamilton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't try to swizzle void.
parent
856502cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
1 deletion
+45
-1
invalidSwizzle.vert.out
Test/baseResults/invalidSwizzle.vert.out
+34
-0
invalidSwizzle.vert
Test/invalidSwizzle.vert
+9
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+1
-1
AST.FromFile.cpp
gtests/AST.FromFile.cpp
+1
-0
No files found.
Test/baseResults/invalidSwizzle.vert.out
0 → 100644
View file @
5313613d
invalidSwizzle.vert
ERROR: 0:6: 'xx' : does not apply to this type: global void
ERROR: 0:7: 'xy' : does not apply to this type: global void
ERROR: 2 compilation errors. No code generated.
Shader version: 420
ERROR: node is still EOpNull!
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:6 Sequence
0:6 Function Call: f( ( global void)
0:7 Function Call: f( ( global void)
0:? Linker Objects
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Linked vertex stage:
ERROR: Linking vertex stage: No function definition (body) found:
f(
Shader version: 420
ERROR: node is still EOpNull!
0:5 Function Definition: main( ( global void)
0:5 Function Parameters:
0:6 Sequence
0:6 Function Call: f( ( global void)
0:7 Function Call: f( ( global void)
0:? Linker Objects
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
Test/invalidSwizzle.vert
0 → 100644
View file @
5313613d
#version 420
void
f
();
void
main
()
{
f
().
xx
;
// Scalar swizzle does not apply to void
f
().
xy
;
// Vector swizzle does not apply either
}
\ No newline at end of file
glslang/MachineIndependent/ParseHelper.cpp
View file @
5313613d
...
@@ -663,7 +663,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
...
@@ -663,7 +663,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
// leaving swizzles and struct/block dereferences.
// leaving swizzles and struct/block dereferences.
TIntermTyped
*
result
=
base
;
TIntermTyped
*
result
=
base
;
if
(
base
->
isVector
()
||
base
->
isScalar
(
))
{
if
(
base
->
getBasicType
()
!=
EbtVoid
&&
(
base
->
isVector
()
||
base
->
isScalar
()
))
{
if
(
base
->
isScalar
())
{
if
(
base
->
isScalar
())
{
const
char
*
dotFeature
=
"scalar swizzle"
;
const
char
*
dotFeature
=
"scalar swizzle"
;
requireProfile
(
loc
,
~
EEsProfile
,
dotFeature
);
requireProfile
(
loc
,
~
EEsProfile
,
dotFeature
);
...
...
gtests/AST.FromFile.cpp
View file @
5313613d
...
@@ -188,6 +188,7 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -188,6 +188,7 @@ INSTANTIATE_TEST_CASE_P(
"structDeref.frag"
,
"structDeref.frag"
,
"structure.frag"
,
"structure.frag"
,
"swizzle.frag"
,
"swizzle.frag"
,
"invalidSwizzle.vert"
,
"syntaxError.frag"
,
"syntaxError.frag"
,
"test.frag"
,
"test.frag"
,
"texture.frag"
,
"texture.frag"
,
...
...
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