Commit e96ee859 by John Kessenich

Establish desktop completeness through version 1.50. (gl_MaxVaryingFloats,…

Establish desktop completeness through version 1.50. (gl_MaxVaryingFloats, implicit-cconversion safety, cube-sampler-array fix, add tests) git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26253 e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent 447c65c9
...@@ -15,4 +15,31 @@ layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR, ...@@ -15,4 +15,31 @@ layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; // ERROR,
in struct S { float f; } s; in struct S { float f; } s;
float patch = 3.1; float patch = 3.1;
\ No newline at end of file
uniform sampler2DMS sms;
uniform isampler2DMS isms;
uniform usampler2DMS usms;
uniform sampler2DMSArray smsa;
uniform isampler2DMSArray ismsa;
uniform usampler2DMSArray usmsa;
flat in ivec2 p2;
flat in ivec3 p3;
flat in int samp;
void barWxyz()
{
ivec2 t11 = textureSize( sms);
ivec2 t12 = textureSize(isms);
ivec2 t13 = textureSize(usms);
ivec3 t21 = textureSize( smsa);
ivec3 t22 = textureSize(ismsa);
ivec3 t23 = textureSize(usmsa);
vec4 t31 = texelFetch( sms, p2, samp);
ivec4 t32 = texelFetch(isms, p2, samp);
uvec4 t33 = texelFetch(usms, p2, 3);
vec4 t41 = texelFetch( smsa, p3, samp);
ivec4 t42 = texelFetch(ismsa, ivec3(2), samp);
uvec4 t43 = texelFetch(usmsa, p3, samp);
}
...@@ -247,8 +247,8 @@ ERROR: node is still EOpNull! ...@@ -247,8 +247,8 @@ ERROR: node is still EOpNull!
0:111 Sequence 0:111 Sequence
0:111 move second child to first child (4-component vector of int) 0:111 move second child to first child (4-component vector of int)
0:111 'c' (4-component vector of int) 0:111 'c' (4-component vector of int)
0:111 Function Call: texture(isA31;vf4;f1; (4-component vector of int) 0:111 Function Call: texture(isAC1;vf4;f1; (4-component vector of int)
0:111 'Isca' (uniform isampler3DArray) 0:111 'Isca' (uniform isamplerCubeArray)
0:111 'i' (smooth in 4-component vector of float) 0:111 'i' (smooth in 4-component vector of float)
0:111 Constant: 0:111 Constant:
0:111 0.700000 0:111 0.700000
...@@ -285,8 +285,8 @@ ERROR: node is still EOpNull! ...@@ -285,8 +285,8 @@ ERROR: node is still EOpNull!
0:116 1 (const int) 0:116 1 (const int)
0:117 move second child to first child (4-component vector of int) 0:117 move second child to first child (4-component vector of int)
0:117 'c' (4-component vector of int) 0:117 'c' (4-component vector of int)
0:117 Function Call: textureGrad(isA31;vf4;vf3;vf3; (4-component vector of int) 0:117 Function Call: textureGrad(isAC1;vf4;vf3;vf3; (4-component vector of int)
0:117 'Isca' (uniform isampler3DArray) 0:117 'Isca' (uniform isamplerCubeArray)
0:117 'i' (smooth in 4-component vector of float) 0:117 'i' (smooth in 4-component vector of float)
0:117 Constant: 0:117 Constant:
0:117 0.100000 0:117 0.100000
...@@ -342,7 +342,7 @@ ERROR: node is still EOpNull! ...@@ -342,7 +342,7 @@ ERROR: node is still EOpNull!
0:? 'samp2DR' (uniform sampler2DRect) 0:? 'samp2DR' (uniform sampler2DRect)
0:? 'samp2DA' (uniform sampler2DArray) 0:? 'samp2DA' (uniform sampler2DArray)
0:? 'Sca' (uniform samplerCubeArray) 0:? 'Sca' (uniform samplerCubeArray)
0:? 'Isca' (uniform isampler3DArray) 0:? 'Isca' (uniform isamplerCubeArray)
0:? 'Usca' (uniform usamplerCubeArray) 0:? 'Usca' (uniform usamplerCubeArray)
0:? 'Scas' (uniform samplerCubeArrayShadow) 0:? 'Scas' (uniform samplerCubeArrayShadow)
0:? 'ai' (const 3-element array of int) 0:? 'ai' (const 3-element array of int)
...@@ -580,8 +580,8 @@ ERROR: node is still EOpNull! ...@@ -580,8 +580,8 @@ ERROR: node is still EOpNull!
0:111 Sequence 0:111 Sequence
0:111 move second child to first child (4-component vector of int) 0:111 move second child to first child (4-component vector of int)
0:111 'c' (4-component vector of int) 0:111 'c' (4-component vector of int)
0:111 Function Call: texture(isA31;vf4;f1; (4-component vector of int) 0:111 Function Call: texture(isAC1;vf4;f1; (4-component vector of int)
0:111 'Isca' (uniform isampler3DArray) 0:111 'Isca' (uniform isamplerCubeArray)
0:111 'i' (smooth in 4-component vector of float) 0:111 'i' (smooth in 4-component vector of float)
0:111 Constant: 0:111 Constant:
0:111 0.700000 0:111 0.700000
...@@ -618,8 +618,8 @@ ERROR: node is still EOpNull! ...@@ -618,8 +618,8 @@ ERROR: node is still EOpNull!
0:116 1 (const int) 0:116 1 (const int)
0:117 move second child to first child (4-component vector of int) 0:117 move second child to first child (4-component vector of int)
0:117 'c' (4-component vector of int) 0:117 'c' (4-component vector of int)
0:117 Function Call: textureGrad(isA31;vf4;vf3;vf3; (4-component vector of int) 0:117 Function Call: textureGrad(isAC1;vf4;vf3;vf3; (4-component vector of int)
0:117 'Isca' (uniform isampler3DArray) 0:117 'Isca' (uniform isamplerCubeArray)
0:117 'i' (smooth in 4-component vector of float) 0:117 'i' (smooth in 4-component vector of float)
0:117 Constant: 0:117 Constant:
0:117 0.100000 0:117 0.100000
...@@ -675,7 +675,7 @@ ERROR: node is still EOpNull! ...@@ -675,7 +675,7 @@ ERROR: node is still EOpNull!
0:? 'samp2DR' (uniform sampler2DRect) 0:? 'samp2DR' (uniform sampler2DRect)
0:? 'samp2DA' (uniform sampler2DArray) 0:? 'samp2DA' (uniform sampler2DArray)
0:? 'Sca' (uniform samplerCubeArray) 0:? 'Sca' (uniform samplerCubeArray)
0:? 'Isca' (uniform isampler3DArray) 0:? 'Isca' (uniform isamplerCubeArray)
0:? 'Usca' (uniform usamplerCubeArray) 0:? 'Usca' (uniform usamplerCubeArray)
0:? 'Scas' (uniform samplerCubeArrayShadow) 0:? 'Scas' (uniform samplerCubeArrayShadow)
0:? 'ai' (const 3-element array of int) 0:? 'ai' (const 3-element array of int)
......
150.geom 150.geom
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:15: 'fromVertex' : block instance name redefinition ERROR: 0:15: 'fromVertex' : block instance name redefinition
ERROR: 0:19: 'fromVertex' : redefinition ERROR: 0:19: 'fromVertex' : redefinition
ERROR: 0:21: 'fooC' : block instance name redefinition ERROR: 0:21: 'fooC' : block instance name redefinition
......
150.tesc 150.tesc
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
Shader version: 150 Shader version: 150
Requested GL_ARB_tessellation_shader Requested GL_ARB_tessellation_shader
...@@ -109,7 +108,6 @@ vertices = 4 ...@@ -109,7 +108,6 @@ vertices = 4
0:? 'patchOut' (patch out 4-component vector of float) 0:? 'patchOut' (patch out 4-component vector of float)
150.tese 150.tese
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:12: 'barrier' : no matching overloaded function found ERROR: 0:12: 'barrier' : no matching overloaded function found
ERROR: 1 compilation errors. No code generated. ERROR: 1 compilation errors. No code generated.
......
150.vert 150.vert
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 0:22: 'a' : cannot redeclare a user-block member array ERROR: 0:22: 'a' : cannot redeclare a user-block member array
ERROR: 1 compilation errors. No code generated. ERROR: 1 compilation errors. No code generated.
......
...@@ -16,7 +16,6 @@ Shader version: 110 ...@@ -16,7 +16,6 @@ Shader version: 110
noMain1.geom noMain1.geom
ERROR: #version: geometry shaders require non-es profile and version 150 or above ERROR: #version: geometry shaders require non-es profile and version 150 or above
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
ERROR: 1 compilation errors. No code generated. ERROR: 1 compilation errors. No code generated.
...@@ -31,7 +30,6 @@ ERROR: node is still EOpNull! ...@@ -31,7 +30,6 @@ ERROR: node is still EOpNull!
0:? Linker Objects 0:? Linker Objects
noMain2.geom noMain2.geom
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
Shader version: 150 Shader version: 150
invocations = 0 invocations = 0
......
../../LunarGLASS/test/matrix2.frag ../../LunarGLASS/test/matrix2.frag
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
WARNING: 0:4: varying deprecated in version 130; may be removed in future release WARNING: 0:4: varying deprecated in version 130; may be removed in future release
WARNING: 0:13: varying deprecated in version 130; may be removed in future release WARNING: 0:13: varying deprecated in version 130; may be removed in future release
WARNING: 0:15: varying deprecated in version 130; may be removed in future release WARNING: 0:15: varying deprecated in version 130; may be removed in future release
......
../../LunarGLASS/test/simpleFunctionCall.frag ../../LunarGLASS/test/simpleFunctionCall.frag
Warning, version 150 is not yet complete; most version-specific features are present, but some are missing.
WARNING: 0:4: varying deprecated in version 130; may be removed in future release WARNING: 0:4: varying deprecated in version 130; may be removed in future release
Shader version: 150 Shader version: 150
......
Current functionality level: ESSL 3.0 Current functionality level: ESSL 3.0, GLSL 1.5
+ create version system + create version system
...@@ -91,13 +91,13 @@ Shader Functionality to Implement/Finish ...@@ -91,13 +91,13 @@ Shader Functionality to Implement/Finish
+ Fixed functionality for a programmable stage. + Fixed functionality for a programmable stage.
+ ftransform(). Use invariant outputs instead. + ftransform(). Use invariant outputs instead.
GLSL 1.5 (Non-ES) GLSL 1.5 (Non-ES)
- Deprecated gl_MaxVaryingComponents + Deprecated gl_MaxVaryingComponents
+ Add new minimum maximums for gl_MaxVertexOutputComponents, gl_MaxGeometryInputComponents, gl_MaxGeometryOutputComponents, and gl_MaxFragmentInputComponents, + Add new minimum maximums for gl_MaxVertexOutputComponents, gl_MaxGeometryInputComponents, gl_MaxGeometryOutputComponents, and gl_MaxFragmentInputComponents,
rather than relying on gl_MaxVaryingComponents. Also, corrected gl_MaxVaryingComponents to be 60 instead of 64. rather than relying on gl_MaxVaryingComponents. Also, corrected gl_MaxVaryingComponents to be 60 instead of 64.
+ Added gl_PrimitiveID as an input to fragment shaders. + Added gl_PrimitiveID as an input to fragment shaders.
+ Added gl_FragCoord qualifiers origin_upper_left, and pixel_center_integer to modify the values returned by gl_FragCoord (and have no affect on any other aspect of the pipeline or language). + Added gl_FragCoord qualifiers origin_upper_left, and pixel_center_integer to modify the values returned by gl_FragCoord (and have no affect on any other aspect of the pipeline or language).
+ including redeclaration of gl_FragCoord that adds nothing + including redeclaration of gl_FragCoord that adds nothing
- Added support for multi-sample textures through sampler2DMS and sampler2DMSArray support in texelFetch() and textureSize(). + Added support for multi-sample textures through sampler2DMS and sampler2DMSArray support in texelFetch() and textureSize().
+ Broadened interface blocks from just uniforms to in and out interfaces as well. + Broadened interface blocks from just uniforms to in and out interfaces as well.
+ Broaden array usage to include vertex shader inputs (vertex in). + Broaden array usage to include vertex shader inputs (vertex in).
+ Added geometry shaders. This includes targeting layers in FBO rendering. + Added geometry shaders. This includes targeting layers in FBO rendering.
......
...@@ -1423,7 +1423,7 @@ void TBuiltIns::initialize(int version, EProfile profile) ...@@ -1423,7 +1423,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
if (version >= 130) if (version >= 130)
add2ndGenerationSamplingImaging(version, profile); add2ndGenerationSamplingImaging(version, profile);
//printf("%s\n", commonBuiltins.c_str(); // printf("%s\n", commonBuiltins.c_str());
} }
// //
...@@ -1914,8 +1914,10 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf ...@@ -1914,8 +1914,10 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents); snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
s.append(builtInConstant); s.append(builtInConstant);
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats); if (version < 150 || ARBCompatibility) {
s.append(builtInConstant); snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
s.append(builtInConstant);
}
snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents); snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents);
s.append(builtInConstant); s.append(builtInConstant);
......
...@@ -368,7 +368,7 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o ...@@ -368,7 +368,7 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o
} }
// //
// Convert the node's type to the given type, as allowed by the operation involved 'op'. // Convert the node's type to the given type, as allowed by the operation involved: 'op'.
// For implicit conversions, 'op' is not the requested conversion, it is the explicit // For implicit conversions, 'op' is not the requested conversion, it is the explicit
// operation requiring the implicit conversion. // operation requiring the implicit conversion.
// //
...@@ -384,9 +384,13 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt ...@@ -384,9 +384,13 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
// //
switch (node->getBasicType()) { switch (node->getBasicType()) {
case EbtVoid: case EbtVoid:
case EbtSampler:
return 0; return 0;
default: break; case EbtSampler:
if (op != EOpFunctionCall)
return 0;
break;
default:
break;
} }
// //
...@@ -450,6 +454,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt ...@@ -450,6 +454,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case EOpMatrixTimesVector: case EOpMatrixTimesVector:
case EOpMatrixTimesScalar: case EOpMatrixTimesScalar:
case EOpFunctionCall:
case EOpAssign: case EOpAssign:
case EOpAddAssign: case EOpAddAssign:
case EOpSubAssign: case EOpSubAssign:
......
...@@ -1078,11 +1078,13 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte ...@@ -1078,11 +1078,13 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte
if (function[i].type->getQualifier().isParamInput()) { if (function[i].type->getQualifier().isParamInput()) {
// In-qualified arguments just need an extra node added above the argument to // In-qualified arguments just need an extra node added above the argument to
// convert to the correct type. // convert to the correct type.
arg = intermediate.addConversion(EOpAssign, *function[i].type, arg); arg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg);
if (aggregate) if (arg) {
aggregate->getSequence()[i] = arg; if (aggregate)
else aggregate->getSequence()[i] = arg;
arguments = arg; else
arguments = arg;
}
} }
} }
} }
......
...@@ -377,17 +377,24 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo ...@@ -377,17 +377,24 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines"); infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines");
} }
// A metecheck on the condition of the compiler itself... // A metacheck on the condition of the compiler itself...
switch (version) { switch (version) {
// ES versions
case 100: case 100:
case 300: case 300:
// versions are complete
break;
// Desktop versions
case 110: case 110:
case 120: case 120:
case 130: case 130:
case 140: case 140:
case 150:
// versions are complete // versions are complete
break; break;
default: default:
infoSink.info << "Warning, version " << version << " is not yet complete; most version-specific features are present, but some are missing.\n"; infoSink.info << "Warning, version " << version << " is not yet complete; most version-specific features are present, but some are missing.\n";
break; break;
......
...@@ -1679,7 +1679,7 @@ type_specifier_nonarray ...@@ -1679,7 +1679,7 @@ type_specifier_nonarray
| ISAMPLERCUBEARRAY { | ISAMPLERCUBEARRAY {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtSampler; $$.basicType = EbtSampler;
$$.sampler.set(EbtInt, Esd3D, true); $$.sampler.set(EbtInt, EsdCube, true);
} }
| USAMPLER1D { | USAMPLER1D {
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment