Updates for final Vulkan ray tracing extensions (#2466)
* Fix traceRay/executeCallable to have id instead of constant. Update to final (non-provisional) SPIR-V capabilities (includes review feedback) - Change visibilty of findLinkerObjects. See merge request GLSL/glslang!78 * Add support for OpConvertUToAccelerationStructureKHR. GLSL : https://gitlab.khronos.org/GLSL/GLSL/-/merge_requests/60 SPV : https://gitlab.khronos.org/spirv/spirv-extensions/-/merge_requests/182 See merge request GLSL/glslang!77 * Add volatile qualifier to certain builtins for ray tracing. See merge request GLSL/glslang!81 * make gl_RayTmaxEXT volatile in intersection shader Vulkan Issue #2268 * Add testing for layouts on SBT vulkan/vulkan#2230 - no layout specified should be same as std430 - explicitly test std140, std430, scalar layouts See merge request GLSL/glslang!86 * Support for new opcodes OpIgnoreIntersectionKHR and OpTerminateRayKHR vulkan/vulkan#2374 Add support for ignoreIntersectionEXT and terminateRayEXT as block terminator statements. See merge request GLSL/glslang!87 * Fix code-generation issues with global ray query variables See merge request GLSL/glslang!88 * update dependencies for spirv-headers and tools And update mesh shader results * Fix indeterminate argument ordering Authored-by: David Neto <dneto@google.com> Co-authored-by: Ashwin Lele (NVIDIA Corporation) <alele@nvidia.com> Co-authored-by: Neslisah <Neslisah.Torosdagli@amd.com>
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
spv.ext.AnyHitShader.rahit
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 94
|
||||
// Id's are bound by 107
|
||||
|
||||
Capability RayTracingProvisionalKHR
|
||||
Capability GroupNonUniform
|
||||
Capability RayTracingKHR
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84
|
||||
EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 76 80 84 98
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
SourceExtension "GL_KHR_shader_subgroup_basic"
|
||||
Name 4 "main"
|
||||
Name 9 "v0"
|
||||
Name 11 "gl_LaunchIDEXT"
|
||||
@@ -48,6 +50,7 @@ spv.ext.AnyHitShader.rahit
|
||||
Name 79 "v17"
|
||||
Name 80 "gl_WorldToObject3x4EXT"
|
||||
Name 84 "incomingPayload"
|
||||
Name 98 "gl_SubgroupSize"
|
||||
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
|
||||
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
|
||||
@@ -67,6 +70,9 @@ spv.ext.AnyHitShader.rahit
|
||||
Decorate 76(gl_ObjectToWorld3x4EXT) BuiltIn ObjectToWorldKHR
|
||||
Decorate 80(gl_WorldToObject3x4EXT) BuiltIn WorldToObjectKHR
|
||||
Decorate 84(incomingPayload) Location 1
|
||||
Decorate 98(gl_SubgroupSize) RelaxedPrecision
|
||||
Decorate 98(gl_SubgroupSize) BuiltIn SubgroupSize
|
||||
Decorate 99 RelaxedPrecision
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
@@ -114,6 +120,9 @@ spv.ext.AnyHitShader.rahit
|
||||
86: 72(fvec4) ConstantComposite 85 85 85 85
|
||||
88: 16(int) Constant 1
|
||||
89: TypeBool
|
||||
94: 6(int) Constant 0
|
||||
98(gl_SubgroupSize): 57(ptr) Variable Input
|
||||
101: TypePointer IncomingRayPayloadKHR 28(float)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
@@ -176,13 +185,16 @@ spv.ext.AnyHitShader.rahit
|
||||
87: 16(int) Load 18(v2)
|
||||
90: 89(bool) IEqual 87 88
|
||||
SelectionMerge 92 None
|
||||
BranchConditional 90 91 93
|
||||
BranchConditional 90 91 92
|
||||
91: Label
|
||||
IgnoreIntersectionKHR
|
||||
Branch 92
|
||||
93: Label
|
||||
TerminateRayKHR
|
||||
Branch 92
|
||||
92: Label
|
||||
Return
|
||||
99: 6(int) Load 98(gl_SubgroupSize)
|
||||
100: 28(float) ConvertUToF 99
|
||||
102: 101(ptr) AccessChain 84(incomingPayload) 94
|
||||
103: 28(float) Load 102
|
||||
104: 28(float) FAdd 103 100
|
||||
105: 101(ptr) AccessChain 84(incomingPayload) 94
|
||||
Store 105 104
|
||||
TerminateRayKHR
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user