Error when initializing rayQuery with assignment
This commit is contained in:
parent
517f39eee4
commit
ed7a097d19
6
Test/baseResults/rayQuery-initialization.Error.comp.out
Normal file
6
Test/baseResults/rayQuery-initialization.Error.comp.out
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
rayQuery-initialization.Error.comp
|
||||||
|
ERROR: 0:7: '=' : ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic: bar
|
||||||
|
ERROR: 1 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
|
SPIR-V is not generated for failed compile or link
|
8
Test/rayQuery-initialization.Error.comp
Normal file
8
Test/rayQuery-initialization.Error.comp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#version 460
|
||||||
|
|
||||||
|
#extension GL_EXT_ray_query : enable
|
||||||
|
|
||||||
|
void main () {
|
||||||
|
rayQueryEXT foo;
|
||||||
|
rayQueryEXT bar = foo;
|
||||||
|
}
|
@ -6561,6 +6561,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
|
|||||||
type.copyArrayInnerSizes(publicType.arraySizes);
|
type.copyArrayInnerSizes(publicType.arraySizes);
|
||||||
arrayOfArrayVersionCheck(loc, type.getArraySizes());
|
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()) {
|
if (type.isCoopMat()) {
|
||||||
intermediate.setUseVulkanMemoryModel();
|
intermediate.setUseVulkanMemoryModel();
|
||||||
intermediate.setUseStorageBuffer();
|
intermediate.setUseStorageBuffer();
|
||||||
|
@ -238,6 +238,7 @@ INSTANTIATE_TEST_SUITE_P(
|
|||||||
"rayQuery-committed.Error.rgen",
|
"rayQuery-committed.Error.rgen",
|
||||||
"rayQuery-allOps.comp",
|
"rayQuery-allOps.comp",
|
||||||
"rayQuery-allOps.frag",
|
"rayQuery-allOps.frag",
|
||||||
|
"rayQuery-initialization.Error.comp",
|
||||||
"spv.set.vert",
|
"spv.set.vert",
|
||||||
"spv.double.comp",
|
"spv.double.comp",
|
||||||
"spv.100ops.frag",
|
"spv.100ops.frag",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user