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:
Daniel Koch
2020-11-23 15:41:27 -05:00
committed by GitHub
parent 7f6559d280
commit ffccefddfd
76 changed files with 4951 additions and 3663 deletions

View File

@@ -1,15 +1,25 @@
spv.ext.MissShader.rmiss
// Module Version 10400
// Generated by (magic number): 8000a
// Id's are bound by 54
// Id's are bound by 71
Capability RayTracingProvisionalKHR
Capability GroupNonUniform
Capability GroupNonUniformBallot
Capability SubgroupBallotKHR
Capability RayTracingKHR
Capability ShaderSMBuiltinsNV
Extension "SPV_KHR_ray_tracing"
Extension "SPV_KHR_shader_ballot"
Extension "SPV_NV_shader_sm_builtins"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53
EntryPoint MissKHR 4 "main" 11 14 21 24 29 32 36 51 53 58 63 70
Source GLSL 460
SourceExtension "GL_ARB_shader_ballot"
SourceExtension "GL_EXT_ray_tracing"
SourceExtension "GL_KHR_shader_subgroup_ballot"
SourceExtension "GL_KHR_shader_subgroup_basic"
SourceExtension "GL_NV_shader_sm_builtins"
Name 4 "main"
Name 9 "v0"
Name 11 "gl_LaunchIDEXT"
@@ -24,8 +34,11 @@ spv.ext.MissShader.rmiss
Name 31 "v5"
Name 32 "gl_RayTmaxEXT"
Name 36 "accEXT"
Name 51 "localPayload"
Name 53 "incomingPayload"
Name 51 "incomingPayload"
Name 53 "gl_SubGroupSizeARB"
Name 58 "gl_SubgroupEqMask"
Name 63 "gl_WarpIDNV"
Name 70 "localPayload"
Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR
Decorate 21(gl_WorldRayOriginEXT) BuiltIn WorldRayOriginKHR
@@ -34,8 +47,17 @@ spv.ext.MissShader.rmiss
Decorate 32(gl_RayTmaxEXT) BuiltIn RayTmaxKHR
Decorate 36(accEXT) DescriptorSet 0
Decorate 36(accEXT) Binding 0
Decorate 51(localPayload) Location 0
Decorate 53(incomingPayload) Location 1
Decorate 51(incomingPayload) Location 1
Decorate 53(gl_SubGroupSizeARB) BuiltIn SubgroupSize
Decorate 53(gl_SubGroupSizeARB) Volatile
Decorate 53(gl_SubGroupSizeARB) Coherent
Decorate 58(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR
Decorate 58(gl_SubgroupEqMask) Volatile
Decorate 58(gl_SubgroupEqMask) Coherent
Decorate 63(gl_WarpIDNV) BuiltIn WarpIDNV
Decorate 63(gl_WarpIDNV) Volatile
Decorate 63(gl_WarpIDNV) Coherent
Decorate 70(localPayload) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
@@ -69,10 +91,17 @@ spv.ext.MissShader.rmiss
47: TypeInt 32 1
48: 47(int) Constant 1
49: TypeVector 16(float) 4
50: TypePointer RayPayloadKHR 49(fvec4)
51(localPayload): 50(ptr) Variable RayPayloadKHR
52: TypePointer IncomingRayPayloadKHR 49(fvec4)
53(incomingPayload): 52(ptr) Variable IncomingRayPayloadKHR
50: TypePointer IncomingRayPayloadKHR 49(fvec4)
51(incomingPayload): 50(ptr) Variable IncomingRayPayloadKHR
52: TypePointer Input 6(int)
53(gl_SubGroupSizeARB): 52(ptr) Variable Input
56: TypeVector 6(int) 4
57: TypePointer Input 56(ivec4)
58(gl_SubgroupEqMask): 57(ptr) Variable Input
63(gl_WarpIDNV): 52(ptr) Variable Input
67: TypePointer IncomingRayPayloadKHR 16(float)
69: TypePointer RayPayloadKHR 49(fvec4)
70(localPayload): 69(ptr) Variable RayPayloadKHR
4(main): 2 Function None 3
5: Label
9(v0): 8(ptr) Variable Function
@@ -94,6 +123,17 @@ spv.ext.MissShader.rmiss
33: 16(float) Load 32(gl_RayTmaxEXT)
Store 31(v5) 33
37: 34 Load 36(accEXT)
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 48
TraceRayKHR 37 38 39 40 41 38 43 42 45 46 51(incomingPayload)
54: 6(int) Load 53(gl_SubGroupSizeARB)
55: 16(float) ConvertUToF 54
59: 56(ivec4) Load 58(gl_SubgroupEqMask)
60: 49(fvec4) ConvertUToF 59
61: 16(float) CompositeExtract 60 0
62: 16(float) FAdd 55 61
64: 6(int) Load 63(gl_WarpIDNV)
65: 16(float) ConvertUToF 64
66: 16(float) FAdd 62 65
68: 67(ptr) AccessChain 51(incomingPayload) 38
Store 68 66
Return
FunctionEnd