Merge pull request #2388 from Tobski/rq-initialization-error

Error when initializing rayQuery with assignment
This commit is contained in:
John Kessenich 2020-09-08 05:39:06 -06:00 committed by GitHub
commit 6a6e311d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 0 deletions

View file

@ -6561,6 +6561,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
type.copyArrayInnerSizes(publicType.arraySizes);
arrayOfArrayVersionCheck(loc, type.getArraySizes());
if (initializer) {
if (type.getBasicType() == EbtRayQuery) {
error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str());
}
}
if (type.isCoopMat()) {
intermediate.setUseVulkanMemoryModel();
intermediate.setUseStorageBuffer();