Front-end: Fix issue #146: which versions allow double in/out.
This commit is contained in:
parent
133253b6ee
commit
80cb324ff6
9
Test/400.vert
Normal file
9
Test/400.vert
Normal file
@ -0,0 +1,9 @@
|
||||
#version 400 core
|
||||
|
||||
in double d; // ERROR, no doubles
|
||||
in dvec3 d3; // ERROR, no doubles
|
||||
in dmat4 dm4; // ERROR, no doubles
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
9
Test/410.vert
Normal file
9
Test/410.vert
Normal file
@ -0,0 +1,9 @@
|
||||
#version 410 core
|
||||
|
||||
in double d;
|
||||
in dvec3 d3;
|
||||
in dmat4 dm4;
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
||||
34
Test/baseResults/400.vert.out
Executable file
34
Test/baseResults/400.vert.out
Executable file
@ -0,0 +1,34 @@
|
||||
400.vert
|
||||
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
|
||||
ERROR: 0:3: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:4: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:5: 'vertex-shader `double` type input' : not supported for this version or the enabled extensions
|
||||
ERROR: 3 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 400
|
||||
ERROR: node is still EOpNull!
|
||||
0:7 Function Definition: main( (global void)
|
||||
0:7 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'd' (in double)
|
||||
0:? 'd3' (in 3-component vector of double)
|
||||
0:? 'dm4' (in 4X4 matrix of double)
|
||||
0:? 'gl_VertexID' (gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 400
|
||||
ERROR: node is still EOpNull!
|
||||
0:7 Function Definition: main( (global void)
|
||||
0:7 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'd' (in double)
|
||||
0:? 'd3' (in 3-component vector of double)
|
||||
0:? 'dm4' (in 4X4 matrix of double)
|
||||
0:? 'gl_VertexID' (gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
|
||||
|
||||
29
Test/baseResults/410.vert.out
Executable file
29
Test/baseResults/410.vert.out
Executable file
@ -0,0 +1,29 @@
|
||||
410.vert
|
||||
Warning, version 410 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
Shader version: 410
|
||||
0:? Sequence
|
||||
0:7 Function Definition: main( (global void)
|
||||
0:7 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'd' (in double)
|
||||
0:? 'd3' (in 3-component vector of double)
|
||||
0:? 'dm4' (in 4X4 matrix of double)
|
||||
0:? 'gl_VertexID' (gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
Shader version: 410
|
||||
0:? Sequence
|
||||
0:7 Function Definition: main( (global void)
|
||||
0:7 Function Parameters:
|
||||
0:? Linker Objects
|
||||
0:? 'd' (in double)
|
||||
0:? 'd3' (in 3-component vector of double)
|
||||
0:? 'dm4' (in 4X4 matrix of double)
|
||||
0:? 'gl_VertexID' (gl_VertexId int VertexId)
|
||||
0:? 'gl_InstanceID' (gl_InstanceId int InstanceId)
|
||||
|
||||
@ -2661,6 +2661,8 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
||||
requireProfile(loc, ~EEsProfile, "vertex input arrays");
|
||||
profileRequires(loc, ENoProfile, 150, nullptr, "vertex input arrays");
|
||||
}
|
||||
if (publicType.basicType == EbtDouble)
|
||||
profileRequires(loc, ~EEsProfile, 410, nullptr, "vertex-shader `double` type input");
|
||||
if (qualifier.isAuxiliary() || qualifier.isInterpolation() || qualifier.isMemory() || qualifier.invariant)
|
||||
error(loc, "vertex input cannot be further qualified", "", "");
|
||||
break;
|
||||
@ -2735,6 +2737,8 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali
|
||||
error(loc, "can't use auxiliary qualifier on a fragment output", "centroid/sample/patch", "");
|
||||
if (qualifier.isInterpolation())
|
||||
error(loc, "can't use interpolation qualifier on a fragment output", "flat/smooth/noperspective", "");
|
||||
if (publicType.basicType == EbtDouble)
|
||||
error(loc, "cannot contain a double", GetStorageQualifierString(qualifier.storage), "");
|
||||
break;
|
||||
|
||||
case EShLangCompute:
|
||||
|
||||
@ -113,6 +113,8 @@ INSTANTIATE_TEST_CASE_P(
|
||||
"110scope.vert",
|
||||
"300scope.vert",
|
||||
"400.frag",
|
||||
"400.vert",
|
||||
"410.vert",
|
||||
"420.comp",
|
||||
"420.frag",
|
||||
"420.vert",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user