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
39281fb7
Unverified
Commit
39281fb7
authored
Apr 29, 2020
by
pmistryNV
Committed by
GitHub
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for extension GL_ARB_vertex_attrib_64bit (#2193)
parent
f03cb290
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
70 additions
and
6 deletions
+70
-6
150.vert
Test/150.vert
+16
-0
150.vert.out
Test/baseResults/150.vert.out
+34
-1
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+6
-1
Scan.cpp
glslang/MachineIndependent/Scan.cpp
+5
-3
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+8
-1
Versions.h
glslang/MachineIndependent/Versions.h
+1
-0
No files found.
Test/150.vert
View file @
39281fb7
...
@@ -25,5 +25,21 @@ uniform foob {
...
@@ -25,5 +25,21 @@ uniform foob {
};
};
int
a
[
5
];
// ERROR, resizing user-block member
int
a
[
5
];
// ERROR, resizing user-block member
in
double
dvarerr
;
// Error since extension GL_ARB_vertex_attrib_64bit is not enabled
#extension GL_ARB_vertex_attrib_64bit: enable
in
double
dvar
;
in
dvec2
dv2var
;
in
dvec3
dv3var
;
in
dvec4
dv4var
;
in
dmat2
dmat2var
;
in
dmat3
dmat3var
;
in
dmat4
dmat4var
;
in
dmat2x3
dmat23var
;
in
dmat2x4
dmat24var
;
in
dmat3x2
dmat32var
;
in
dmat3x4
dmat34var
;
in
dmat4x2
dmat42var
;
in
dmat4x3
dmat43var
;
#line 3000
#line 3000
#error line of this error should be 3001
#error line of this error should be 3001
Test/baseResults/150.vert.out
View file @
39281fb7
150.vert
150.vert
ERROR: 0:26: 'a' : cannot redeclare a user-block member array
ERROR: 0:26: 'a' : cannot redeclare a user-block member array
ERROR: 0:28: 'double' : Reserved word.
ERROR: 0:28: 'double' : not supported for this version or the enabled extensions
ERROR: 0:28: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
ERROR: 0:3001: '#error' : line of this error should be 3001
ERROR: 0:3001: '#error' : line of this error should be 3001
ERROR:
2
compilation errors. No code generated.
ERROR:
5
compilation errors. No code generated.
Shader version: 150
Shader version: 150
Requested GL_ARB_vertex_attrib_64bit
ERROR: node is still EOpNull!
ERROR: node is still EOpNull!
0:13 Function Definition: main( ( global void)
0:13 Function Definition: main( ( global void)
0:13 Function Parameters:
0:13 Function Parameters:
...
@@ -43,6 +47,20 @@ ERROR: node is still EOpNull!
...
@@ -43,6 +47,20 @@ ERROR: node is still EOpNull!
0:? 'iv4' ( in 4-component vector of float)
0:? 'iv4' ( in 4-component vector of float)
0:? 'ps' ( uniform float)
0:? 'ps' ( uniform float)
0:? 'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform unsized 1-element array of int a})
0:? 'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform unsized 1-element array of int a})
0:? 'dvarerr' ( in double)
0:? 'dvar' ( in double)
0:? 'dv2var' ( in 2-component vector of double)
0:? 'dv3var' ( in 3-component vector of double)
0:? 'dv4var' ( in 4-component vector of double)
0:? 'dmat2var' ( in 2X2 matrix of double)
0:? 'dmat3var' ( in 3X3 matrix of double)
0:? 'dmat4var' ( in 4X4 matrix of double)
0:? 'dmat23var' ( in 2X3 matrix of double)
0:? 'dmat24var' ( in 2X4 matrix of double)
0:? 'dmat32var' ( in 3X2 matrix of double)
0:? 'dmat34var' ( in 3X4 matrix of double)
0:? 'dmat42var' ( in 4X2 matrix of double)
0:? 'dmat43var' ( in 4X3 matrix of double)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
...
@@ -52,6 +70,7 @@ Linked vertex stage:
...
@@ -52,6 +70,7 @@ Linked vertex stage:
ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)
ERROR: Linking vertex stage: Can only use one of gl_ClipDistance or gl_ClipVertex (gl_ClipDistance is preferred)
Shader version: 150
Shader version: 150
Requested GL_ARB_vertex_attrib_64bit
ERROR: node is still EOpNull!
ERROR: node is still EOpNull!
0:13 Function Definition: main( ( global void)
0:13 Function Definition: main( ( global void)
0:13 Function Parameters:
0:13 Function Parameters:
...
@@ -90,6 +109,20 @@ ERROR: node is still EOpNull!
...
@@ -90,6 +109,20 @@ ERROR: node is still EOpNull!
0:? 'iv4' ( in 4-component vector of float)
0:? 'iv4' ( in 4-component vector of float)
0:? 'ps' ( uniform float)
0:? 'ps' ( uniform float)
0:? 'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform 1-element array of int a})
0:? 'anon@1' (layout( column_major shared) uniform block{layout( column_major shared) uniform 1-element array of int a})
0:? 'dvarerr' ( in double)
0:? 'dvar' ( in double)
0:? 'dv2var' ( in 2-component vector of double)
0:? 'dv3var' ( in 3-component vector of double)
0:? 'dv4var' ( in 4-component vector of double)
0:? 'dmat2var' ( in 2X2 matrix of double)
0:? 'dmat3var' ( in 3X3 matrix of double)
0:? 'dmat4var' ( in 4X4 matrix of double)
0:? 'dmat23var' ( in 2X3 matrix of double)
0:? 'dmat24var' ( in 2X4 matrix of double)
0:? 'dmat32var' ( in 3X2 matrix of double)
0:? 'dmat34var' ( in 3X4 matrix of double)
0:? 'dmat42var' ( in 4X2 matrix of double)
0:? 'dmat43var' ( in 4X3 matrix of double)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_VertexID' ( gl_VertexId int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId)
glslang/MachineIndependent/ParseHelper.cpp
View file @
39281fb7
...
@@ -3354,6 +3354,11 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
...
@@ -3354,6 +3354,11 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
!
qualifier
.
hasBufferReference
())
!
qualifier
.
hasBufferReference
())
error
(
loc
,
"buffers can be declared only as blocks"
,
"buffer"
,
""
);
error
(
loc
,
"buffers can be declared only as blocks"
,
"buffer"
,
""
);
if
(
qualifier
.
storage
!=
EvqVaryingIn
&&
publicType
.
basicType
==
EbtDouble
&&
extensionTurnedOn
(
E_GL_ARB_vertex_attrib_64bit
)
&&
language
==
EShLangVertex
&&
version
<
400
)
{
profileRequires
(
loc
,
ECoreProfile
|
ECompatibilityProfile
,
410
,
E_GL_ARB_gpu_shader_fp64
,
"vertex-shader `double` type"
);
}
if
(
qualifier
.
storage
!=
EvqVaryingIn
&&
qualifier
.
storage
!=
EvqVaryingOut
)
if
(
qualifier
.
storage
!=
EvqVaryingIn
&&
qualifier
.
storage
!=
EvqVaryingOut
)
return
;
return
;
...
@@ -3404,7 +3409,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
...
@@ -3404,7 +3409,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
profileRequires
(
loc
,
ENoProfile
,
150
,
nullptr
,
"vertex input arrays"
);
profileRequires
(
loc
,
ENoProfile
,
150
,
nullptr
,
"vertex input arrays"
);
}
}
if
(
publicType
.
basicType
==
EbtDouble
)
if
(
publicType
.
basicType
==
EbtDouble
)
profileRequires
(
loc
,
~
EEsProfile
,
410
,
nullptr
,
"vertex-shader `double` type input"
);
profileRequires
(
loc
,
~
EEsProfile
,
410
,
E_GL_ARB_vertex_attrib_64bit
,
"vertex-shader `double` type input"
);
if
(
qualifier
.
isAuxiliary
()
||
qualifier
.
isInterpolation
()
||
qualifier
.
isMemory
()
||
qualifier
.
invariant
)
if
(
qualifier
.
isAuxiliary
()
||
qualifier
.
isInterpolation
()
||
qualifier
.
isMemory
()
||
qualifier
.
invariant
)
error
(
loc
,
"vertex input cannot be further qualified"
,
""
,
""
);
error
(
loc
,
"vertex input cannot be further qualified"
,
""
,
""
);
break
;
break
;
...
...
glslang/MachineIndependent/Scan.cpp
View file @
39281fb7
...
@@ -1196,8 +1196,8 @@ int TScanContext::tokenizeIdentifier()
...
@@ -1196,8 +1196,8 @@ int TScanContext::tokenizeIdentifier()
afterType
=
true
;
afterType
=
true
;
if
(
parseContext
.
isEsProfile
()
||
parseContext
.
version
<
150
||
if
(
parseContext
.
isEsProfile
()
||
parseContext
.
version
<
150
||
(
!
parseContext
.
symbolTable
.
atBuiltInLevel
()
&&
(
!
parseContext
.
symbolTable
.
atBuiltInLevel
()
&&
parseContext
.
version
<
400
&&
(
parseContext
.
version
<
400
&&
!
parseContext
.
extensionTurnedOn
(
E_GL_ARB_gpu_shader_fp64
)
&&
!
parseContext
.
extensionTurnedOn
(
E_GL_ARB_gpu_shader_fp64
)))
(
parseContext
.
version
<
410
&&
!
parseContext
.
extensionTurnedOn
(
E_GL_ARB_vertex_attrib_64bit
))
)))
reservedWord
();
reservedWord
();
return
keyword
;
return
keyword
;
...
@@ -1774,7 +1774,9 @@ int TScanContext::dMat()
...
@@ -1774,7 +1774,9 @@ int TScanContext::dMat()
if
(
!
parseContext
.
isEsProfile
()
&&
(
parseContext
.
version
>=
400
||
if
(
!
parseContext
.
isEsProfile
()
&&
(
parseContext
.
version
>=
400
||
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
parseContext
.
symbolTable
.
atBuiltInLevel
()
||
(
parseContext
.
version
>=
150
&&
parseContext
.
extensionTurnedOn
(
E_GL_ARB_gpu_shader_fp64
))))
(
parseContext
.
version
>=
150
&&
parseContext
.
extensionTurnedOn
(
E_GL_ARB_gpu_shader_fp64
))
||
(
parseContext
.
version
>=
150
&&
parseContext
.
extensionTurnedOn
(
E_GL_ARB_vertex_attrib_64bit
)
&&
parseContext
.
language
==
EShLangVertex
)))
return
keyword
;
return
keyword
;
if
(
parseContext
.
isForwardCompatible
())
if
(
parseContext
.
isForwardCompatible
())
...
...
glslang/MachineIndependent/Versions.cpp
View file @
39281fb7
...
@@ -202,6 +202,7 @@ void TParseVersions::initializeExtensionBehavior()
...
@@ -202,6 +202,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior
[
E_GL_ARB_shader_storage_buffer_object
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_shader_storage_buffer_object
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_shading_language_packing
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_shading_language_packing
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_texture_query_lod
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_texture_query_lod
]
=
EBhDisable
;
extensionBehavior
[
E_GL_ARB_vertex_attrib_64bit
]
=
EBhDisable
;
extensionBehavior
[
E_GL_KHR_shader_subgroup_basic
]
=
EBhDisable
;
extensionBehavior
[
E_GL_KHR_shader_subgroup_basic
]
=
EBhDisable
;
extensionBehavior
[
E_GL_KHR_shader_subgroup_vote
]
=
EBhDisable
;
extensionBehavior
[
E_GL_KHR_shader_subgroup_vote
]
=
EBhDisable
;
...
@@ -419,6 +420,7 @@ void TParseVersions::getPreamble(std::string& preamble)
...
@@ -419,6 +420,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_ARB_shader_bit_encoding 1
\n
"
"#define GL_ARB_shader_bit_encoding 1
\n
"
"#define GL_ARB_shader_storage_buffer_object 1
\n
"
"#define GL_ARB_shader_storage_buffer_object 1
\n
"
"#define GL_ARB_texture_query_lod 1
\n
"
"#define GL_ARB_texture_query_lod 1
\n
"
"#define GL_ARB_vertex_attrib_64bit 1
\n
"
"#define GL_EXT_shader_non_constant_global_initializers 1
\n
"
"#define GL_EXT_shader_non_constant_global_initializers 1
\n
"
"#define GL_EXT_shader_image_load_formatted 1
\n
"
"#define GL_EXT_shader_image_load_formatted 1
\n
"
"#define GL_EXT_post_depth_coverage 1
\n
"
"#define GL_EXT_post_depth_coverage 1
\n
"
...
@@ -946,8 +948,13 @@ void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
...
@@ -946,8 +948,13 @@ void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
// Call for any operation needing GLSL double data-type support.
// Call for any operation needing GLSL double data-type support.
void
TParseVersions
::
doubleCheck
(
const
TSourceLoc
&
loc
,
const
char
*
op
)
void
TParseVersions
::
doubleCheck
(
const
TSourceLoc
&
loc
,
const
char
*
op
)
{
{
//requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
//requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires
(
loc
,
ECoreProfile
|
ECompatibilityProfile
,
400
,
E_GL_ARB_gpu_shader_fp64
,
op
);
if
(
language
==
EShLangVertex
)
{
const
char
*
const
f64_Extensions
[]
=
{
E_GL_ARB_gpu_shader_fp64
,
E_GL_ARB_vertex_attrib_64bit
};
profileRequires
(
loc
,
ECoreProfile
|
ECompatibilityProfile
,
400
,
2
,
f64_Extensions
,
op
);
}
else
profileRequires
(
loc
,
ECoreProfile
|
ECompatibilityProfile
,
400
,
E_GL_ARB_gpu_shader_fp64
,
op
);
}
}
// Call for any operation needing GLSL float16 data-type support.
// Call for any operation needing GLSL float16 data-type support.
...
...
glslang/MachineIndependent/Versions.h
View file @
39281fb7
...
@@ -157,6 +157,7 @@ const char* const E_GL_ARB_shader_image_size = "GL_ARB_shader_image_s
...
@@ -157,6 +157,7 @@ const char* const E_GL_ARB_shader_image_size = "GL_ARB_shader_image_s
const
char
*
const
E_GL_ARB_shader_storage_buffer_object
=
"GL_ARB_shader_storage_buffer_object"
;
const
char
*
const
E_GL_ARB_shader_storage_buffer_object
=
"GL_ARB_shader_storage_buffer_object"
;
const
char
*
const
E_GL_ARB_shading_language_packing
=
"GL_ARB_shading_language_packing"
;
const
char
*
const
E_GL_ARB_shading_language_packing
=
"GL_ARB_shading_language_packing"
;
const
char
*
const
E_GL_ARB_texture_query_lod
=
"GL_ARB_texture_query_lod"
;
const
char
*
const
E_GL_ARB_texture_query_lod
=
"GL_ARB_texture_query_lod"
;
const
char
*
const
E_GL_ARB_vertex_attrib_64bit
=
"GL_ARB_vertex_attrib_64bit"
;
const
char
*
const
E_GL_KHR_shader_subgroup_basic
=
"GL_KHR_shader_subgroup_basic"
;
const
char
*
const
E_GL_KHR_shader_subgroup_basic
=
"GL_KHR_shader_subgroup_basic"
;
const
char
*
const
E_GL_KHR_shader_subgroup_vote
=
"GL_KHR_shader_subgroup_vote"
;
const
char
*
const
E_GL_KHR_shader_subgroup_vote
=
"GL_KHR_shader_subgroup_vote"
;
...
...
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