From c754c0b4b91634196fd2bec8d5622bde8cccaf98 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 5 Sep 2023 22:10:20 -0700 Subject: Fix HLSL SER Intrinsics. (#3183) * Fix HLSL SER Intrinsics. * Fix GFX Vulkan shader creation bug. --------- Co-authored-by: Yong He --- source/slang/hlsl.meta.slang | 7 ++++--- tools/gfx/vulkan/vk-shader-program.h | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index c195428e3..babd16f6e 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -8543,7 +8543,7 @@ struct HitObject /// tracing a ray. The provided shader table index must reference a valid miss record in the shader /// table. [__requiresNVAPI] - __target_intrinsic(hlsl, "NvMakeMiss") + __target_intrinsic(hlsl, "($2=NvMakeMiss($0,$1))") static HitObject MakeMiss( uint MissShaderIndex, RayDesc Ray); @@ -8575,7 +8575,7 @@ struct HitObject /// scenarios where future control flow for some threads is known to process neither a hit nor a /// miss. [__requiresNVAPI] - __target_intrinsic(hlsl, "NvMakeNop") + __target_intrinsic(hlsl, "($0 = NvMakeNop())") static HitObject MakeNop(); [ForceInline] @@ -8724,7 +8724,8 @@ struct HitObject __target_intrinsic(hlsl, "NvMakeHitWithRecordIndex") [__requiresNVAPI] - static void __hlslMakeHitWithRecordIndex(uint HitGroupRecordIndex, + static void __hlslMakeHitWithRecordIndex( + uint HitGroupRecordIndex, RaytracingAccelerationStructure AccelerationStructure, uint InstanceIndex, uint GeometryIndex, diff --git a/tools/gfx/vulkan/vk-shader-program.h b/tools/gfx/vulkan/vk-shader-program.h index f24f95e5c..49fd6d256 100644 --- a/tools/gfx/vulkan/vk-shader-program.h +++ b/tools/gfx/vulkan/vk-shader-program.h @@ -23,10 +23,10 @@ public: BreakableReference m_device; - Array m_stageCreateInfos; - Array m_entryPointNames; - Array, 8> m_codeBlobs; //< To keep storage of code in scope - Array m_modules; + List m_stageCreateInfos; + List m_entryPointNames; + List> m_codeBlobs; //< To keep storage of code in scope + List m_modules; RefPtr m_rootObjectLayout; VkPipelineShaderStageCreateInfo compileEntryPoint( -- cgit v1.2.3