GL_EXT_ray_query updates

This commit is contained in:
Torosdagli 2020-03-19 11:09:57 -04:00 committed by Neslisah Torosdagli
parent 3f7c957e0a
commit 06c2eee720
23 changed files with 4626 additions and 4066 deletions

View file

@ -3,6 +3,7 @@
// Copyright (C) 2012-2015 LunarG, Inc.
// Copyright (C) 2015-2018 Google, Inc.
// Copyright (C) 2017, 2019 ARM Limited.
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
//
// All rights reserved.
//
@ -2041,6 +2042,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
error(loc, "argument must be compile-time constant", "callable data number", "");
break;
case EOpRayQueryGetIntersectionType:
case EOpRayQueryGetIntersectionT:
case EOpRayQueryGetIntersectionInstanceCustomIndex:
case EOpRayQueryGetIntersectionInstanceId:
case EOpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffset:
case EOpRayQueryGetIntersectionGeometryIndex:
case EOpRayQueryGetIntersectionPrimitiveIndex:
case EOpRayQueryGetIntersectionBarycentrics:
case EOpRayQueryGetIntersectionFrontFace:
case EOpRayQueryGetIntersectionObjectRayDirection:
case EOpRayQueryGetIntersectionObjectRayOrigin:
case EOpRayQueryGetIntersectionObjectToWorld:
case EOpRayQueryGetIntersectionWorldToObject:
if (!(*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "committed", "");
break;
case EOpTextureQuerySamples:
case EOpImageQuerySamples:
// GL_ARB_shader_texture_image_samples
@ -3241,6 +3259,11 @@ void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, con
}
void TParseContext::rayQueryCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
{
return;
}
#endif // GLSLANG_WEB
void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier)
@ -3992,7 +4015,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType
}
// check for additional things allowed by GL_EXT_nonuniform_qualifier
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct ||
if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery ||
(base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer()))
requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index");
else
@ -6488,6 +6511,7 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
#ifndef GLSLANG_WEB
atomicUintCheck(loc, type, identifier);
accStructCheck(loc, type, identifier);
rayQueryCheck(loc, type, identifier);
checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false);
#endif
if (type.getQualifier().storage == EvqConst && type.containsReference()) {