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
1afa2b8c
Unverified
Commit
1afa2b8c
authored
Dec 09, 2019
by
John Kessenich
Committed by
GitHub
Dec 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2019 from KhronosGroup/fix-2014-dont-and-versions-extensions
Fix: #2014: Don't do "extension-on && version >= ..." keyword checks.
parents
ff61c18f
71b0100a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
41 deletions
+28
-41
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+28
-41
No files found.
glslang/MachineIndependent/Scan.cpp
View file @
1afa2b8c
...
@@ -990,8 +990,7 @@ int TScanContext::tokenizeIdentifier()
...
@@ -990,8 +990,7 @@ int TScanContext::tokenizeIdentifier()
#ifndef GLSLANG_WEB
#ifndef GLSLANG_WEB
case
NOPERSPECTIVE
:
case
NOPERSPECTIVE
:
if
(
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
300
&&
if
(
parseContext
.
extensionTurnedOn
(
E_GL_NV_shader_noperspective_interpolation
))
parseContext
.
extensionTurnedOn
(
E_GL_NV_shader_noperspective_interpolation
))
return
keyword
;
return
keyword
;
return
es30ReservedFromGLSL
(
130
);
return
es30ReservedFromGLSL
(
130
);
...
@@ -1012,8 +1011,7 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1012,8 +1011,7 @@ int TScanContext::tokenizeIdentifier()
case
CALLDATAINNV
:
case
CALLDATAINNV
:
case
ACCSTRUCTNV
:
case
ACCSTRUCTNV
:
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
460
parseContext
.
extensionTurnedOn
(
E_GL_NV_ray_tracing
))
&&
parseContext
.
extensionTurnedOn
(
E_GL_NV_ray_tracing
)))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
case
ATOMIC_UINT
:
case
ATOMIC_UINT
:
...
@@ -1182,10 +1180,9 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1182,10 +1180,9 @@ int TScanContext::tokenizeIdentifier()
case
U64VEC4
:
case
U64VEC4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
&&
parseContext
.
extensionTurnedOn
(
E_GL_ARB_gpu_shader_int64
)
||
(
parseContext
.
extensionTurnedOn
(
E_GL_ARB_gpu_shader_int64
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int64
))
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int64
))))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
@@ -1199,10 +1196,9 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1199,10 +1196,9 @@ int TScanContext::tokenizeIdentifier()
case
U8VEC4
:
case
U8VEC4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
((
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_8bit_storage
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_8bit_storage
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int8
))
&&
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int8
))
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
@@ -1216,11 +1212,10 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1216,11 +1212,10 @@ int TScanContext::tokenizeIdentifier()
case
U16VEC4
:
case
U16VEC4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
&&
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_int16
)
||
(
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_int16
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_16bit_storage
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_16bit_storage
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int16
))
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int16
))))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
case
INT32_T
:
case
INT32_T
:
...
@@ -1233,9 +1228,8 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1233,9 +1228,8 @@ int TScanContext::tokenizeIdentifier()
case
U32VEC4
:
case
U32VEC4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
((
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int32
))
&&
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_int32
))
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
case
FLOAT32_T
:
case
FLOAT32_T
:
...
@@ -1256,9 +1250,8 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1256,9 +1250,8 @@ int TScanContext::tokenizeIdentifier()
case
F32MAT4X4
:
case
F32MAT4X4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
((
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float32
))
&&
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float32
))
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
@@ -1280,9 +1273,8 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1280,9 +1273,8 @@ int TScanContext::tokenizeIdentifier()
case
F64MAT4X4
:
case
F64MAT4X4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
((
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float64
))
&&
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float64
))
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
@@ -1292,11 +1284,10 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1292,11 +1284,10 @@ int TScanContext::tokenizeIdentifier()
case
F16VEC4
:
case
F16VEC4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
&&
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_half_float
)
||
(
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_half_float
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_16bit_storage
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_16bit_storage
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float16
))
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float16
))))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
@@ -1315,10 +1306,9 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1315,10 +1306,9 @@ int TScanContext::tokenizeIdentifier()
case
F16MAT4X4
:
case
F16MAT4X4
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
&&
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_half_float
)
||
(
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_half_float
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types
)
||
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float16
))
parseContext
.
extensionTurnedOn
(
E_GL_EXT_shader_explicit_arithmetic_types_float16
))))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
@@ -1567,20 +1557,17 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1567,20 +1557,17 @@ int TScanContext::tokenizeIdentifier()
case
F16SUBPASSINPUTMS
:
case
F16SUBPASSINPUTMS
:
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
if
(
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_half_float_fetch
)
&&
parseContext
.
extensionTurnedOn
(
E_GL_AMD_gpu_shader_half_float_fetch
))
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
case
EXPLICITINTERPAMD
:
case
EXPLICITINTERPAMD
:
if
(
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
&&
if
(
parseContext
.
extensionTurnedOn
(
E_GL_AMD_shader_explicit_vertex_parameter
))
parseContext
.
extensionTurnedOn
(
E_GL_AMD_shader_explicit_vertex_parameter
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
case
PERVERTEXNV
:
case
PERVERTEXNV
:
if
(((
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
)
||
if
((
!
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
450
)
||
(
parseContext
.
isEsProfile
()
&&
parseContext
.
version
>=
320
))
&&
parseContext
.
extensionTurnedOn
(
E_GL_NV_fragment_shader_barycentric
))
parseContext
.
extensionTurnedOn
(
E_GL_NV_fragment_shader_barycentric
))
return
keyword
;
return
keyword
;
return
identifierOrType
();
return
identifierOrType
();
...
...
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