Skip to content

Commit 61de741

Browse files
ChristianReinboldChristian Reinbolds-perron
authored
lower spirv ray query type to opaque debug type (#7139)
Pull request for Issue [#7033](#7033). It is still lacking a test though. If you can give me a quick pointer to a test directory where I can reformulate my reproducer as a test, I will add it as well. --------- Co-authored-by: Christian Reinbold <[email protected]> Co-authored-by: Steven Perron <[email protected]>
1 parent b0245e3 commit 61de741

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tools/clang/lib/SPIRV/DebugTypeVisitor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ SpirvDebugType *DebugTypeVisitor::lowerToDebugType(const SpirvType *spirvType) {
323323
}
324324
case SpirvType::TK_Image:
325325
case SpirvType::TK_Sampler:
326+
case SpirvType::TK_RayQueryKHR:
326327
case SpirvType::TK_Struct: {
327328
debugType = lowerToDebugTypeComposite(spirvType);
328329
break;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %dxc -T cs_6_5 -E main -fspv-target-env=vulkan1.2 -fspv-debug=vulkan-with-source -spirv %s | FileCheck %s
2+
3+
// CHECK: [[rayQueryKHR_name_id:%[0-9]+]] = OpString "@rayQueryKHR"
4+
// CHECK: [[rayQueryKHR_linkage_name_id:%[0-9]+]] = OpString "rayQueryKHR"
5+
// CHECK: [[debug_info_none_id:%[0-9]+]] = OpExtInst %void [[_:%[0-9]+]] DebugInfoNone
6+
// CHECK: [[_:%[0-9]+]] = OpExtInst %void [[_:%[0-9]+]] DebugTypeComposite [[rayQueryKHR_name_id]] %uint_0 [[_:%[0-9]+]] %uint_0 %uint_0 [[_:%[0-9]+]] [[rayQueryKHR_linkage_name_id]] [[debug_info_none_id]] %uint_3{{$}}
7+
8+
[numthreads(64, 1, 1)]
9+
void main() {
10+
RayQuery<RAY_FLAG_NONE> q;
11+
}

0 commit comments

Comments
 (0)