GLSL: No more restrictions on (non)shadow sampler construction.
Match https://github.com/KhronosGroup/GLSL/pull/22
This commit is contained in:
parent
62faea79d7
commit
e161cc11f7
3 changed files with 2 additions and 10 deletions
|
|
@ -2655,19 +2655,12 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const
|
|||
// second argument
|
||||
// * the constructor's second argument must be a scalar of type
|
||||
// *sampler* or *samplerShadow*
|
||||
// * if the second argument is *samplerShadow* the constructor must be a
|
||||
// shadow constructor (however, shadow constructors are allowed to have
|
||||
// a second argument of *sampler*)
|
||||
if ( function[1].type->getBasicType() != EbtSampler ||
|
||||
! function[1].type->getSampler().isPureSampler() ||
|
||||
function[1].type->isArray()) {
|
||||
error(loc, "sampler-constructor second argument must be a scalar type 'sampler'", token, "");
|
||||
return true;
|
||||
}
|
||||
if (!function.getType().getSampler().shadow && function[1].type->getSampler().shadow) {
|
||||
error(loc, "sampler-constructor second argument presence of shadow must match constructor presence of shadow", token, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue