Unverified Commit 6a6e311d by John Kessenich Committed by GitHub

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

Error when initializing rayQuery with assignment
parents dc1b9762 395bce6c
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
#version 460
#extension GL_EXT_ray_query : enable
void main () {
rayQueryEXT foo;
rayQueryEXT bar = foo;
}
\ No newline at end of file
...@@ -6561,6 +6561,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden ...@@ -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();
......
// //
// Copyright (C) 2016 Google, Inc. // Copyright (C) 2016 Google, Inc.
// Copyright (C) 2019 ARM Limited. // Copyright (C) 2019 ARM Limited.
// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
// //
// All rights reserved. // All rights reserved.
// //
...@@ -238,6 +239,7 @@ INSTANTIATE_TEST_SUITE_P( ...@@ -238,6 +239,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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment