Add support for extension GL_ARB_vertex_attrib_64bit (#2193)
This commit is contained in:
parent
f03cb290ac
commit
39281fb710
@ -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
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
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!
|
|||||||
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:
|
|||||||
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!
|
|||||||
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)
|
||||||
|
|
||||||
|
@ -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
|
|||||||
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;
|
||||||
|
@ -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()
|
|||||||
|
|
||||||
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())
|
||||||
|
@ -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)
|
|||||||
"#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,7 +948,12 @@ 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);
|
||||||
|
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);
|
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader_fp64, op);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user