|
|
@@ -2799,7 +2799,10 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu
|
|
|
TOperator op = intermediate.mapTypeToConstructorOp(type);
|
|
|
|
|
|
if (op == EOpNull) {
|
|
|
- error(loc, "cannot construct this type", type.getBasicString(), "");
|
|
|
+ if (intermediate.getEnhancedMsgs() && type.getBasicType() == EbtSampler)
|
|
|
+ error(loc, "function not supported in this version; use texture() instead", "texture*D*", "");
|
|
|
+ else
|
|
|
+ error(loc, "cannot construct this type", type.getBasicString(), "");
|
|
|
op = EOpConstructFloat;
|
|
|
TType errorType(EbtFloat);
|
|
|
type.shallowCopy(errorType);
|
|
|
@@ -4608,7 +4611,7 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS
|
|
|
|
|
|
if (ssoPre150 ||
|
|
|
(identifier == "gl_FragDepth" && ((nonEsRedecls && version >= 420) || esRedecls)) ||
|
|
|
- (identifier == "gl_FragCoord" && ((nonEsRedecls && version >= 150) || esRedecls)) ||
|
|
|
+ (identifier == "gl_FragCoord" && ((nonEsRedecls && version >= 140) || esRedecls)) ||
|
|
|
identifier == "gl_ClipDistance" ||
|
|
|
identifier == "gl_CullDistance" ||
|
|
|
identifier == "gl_ShadingRateEXT" ||
|
|
|
@@ -5518,12 +5521,19 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|
|
}
|
|
|
if (language == EShLangFragment) {
|
|
|
if (id == "origin_upper_left") {
|
|
|
- requireProfile(loc, ECoreProfile | ECompatibilityProfile, "origin_upper_left");
|
|
|
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile | ENoProfile, "origin_upper_left");
|
|
|
+ if (profile == ENoProfile) {
|
|
|
+ profileRequires(loc,ECoreProfile | ECompatibilityProfile, 140, E_GL_ARB_fragment_coord_conventions, "origin_upper_left");
|
|
|
+ }
|
|
|
+
|
|
|
publicType.shaderQualifiers.originUpperLeft = true;
|
|
|
return;
|
|
|
}
|
|
|
if (id == "pixel_center_integer") {
|
|
|
- requireProfile(loc, ECoreProfile | ECompatibilityProfile, "pixel_center_integer");
|
|
|
+ requireProfile(loc, ECoreProfile | ECompatibilityProfile | ENoProfile, "pixel_center_integer");
|
|
|
+ if (profile == ENoProfile) {
|
|
|
+ profileRequires(loc,ECoreProfile | ECompatibilityProfile, 140, E_GL_ARB_fragment_coord_conventions, "pixel_center_integer");
|
|
|
+ }
|
|
|
publicType.shaderQualifiers.pixelCenterInteger = true;
|
|
|
return;
|
|
|
}
|