Add support for GLSL_EXT_ray_tracing

and SPV_KHR_ray_tracing
This commit is contained in:
Daniel Koch
2020-03-17 20:42:47 -04:00
parent f368dcbb7d
commit db32b243ff
69 changed files with 6912 additions and 4972 deletions

View File

@@ -7,7 +7,7 @@ spv.ClosestHitShader.rchit
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint ClosestHitNV 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67
Source GLSL 460
SourceExtension "GL_NV_ray_tracing"
Name 4 "main"
@@ -44,21 +44,21 @@ spv.ClosestHitShader.rchit
Name 71 "accNV"
Name 85 "localPayload"
Name 87 "incomingPayload"
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 23(gl_InstanceID) BuiltIn InstanceId
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexNV
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginNV
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionNV
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginNV
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionNV
Decorate 47(gl_RayTminNV) BuiltIn RayTminNV
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxNV
Decorate 53(gl_HitTNV) BuiltIn HitTNV
Decorate 58(gl_HitKindNV) BuiltIn HitKindNV
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldNV
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectNV
Decorate 26(gl_InstanceCustomIndexNV) BuiltIn InstanceCustomIndexKHR
Decorate 33(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
Decorate 36(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
Decorate 39(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
Decorate 42(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
Decorate 47(gl_RayTminNV) BuiltIn RayTminKHR
Decorate 50(gl_RayTmaxNV) BuiltIn RayTmaxKHR
Decorate 53(gl_HitTNV) BuiltIn HitTKHR
Decorate 58(gl_HitKindNV) BuiltIn HitKindKHR
Decorate 64(gl_ObjectToWorldNV) BuiltIn ObjectToWorldKHR
Decorate 67(gl_WorldToObjectNV) BuiltIn WorldToObjectKHR
Decorate 71(accNV) DescriptorSet 0
Decorate 71(accNV) Binding 0
Decorate 85(localPayload) Location 0
@@ -98,7 +98,7 @@ spv.ClosestHitShader.rchit
63: TypePointer Input 60
64(gl_ObjectToWorldNV): 63(ptr) Variable Input
67(gl_WorldToObjectNV): 63(ptr) Variable Input
69: TypeAccelerationStructureNV
69: TypeAccelerationStructureKHR
70: TypePointer UniformConstant 69
71(accNV): 70(ptr) Variable UniformConstant
73: 6(int) Constant 0
@@ -112,10 +112,10 @@ spv.ClosestHitShader.rchit
81: 28(float) Constant 1061158912
82: 16(int) Constant 1
83: TypeVector 28(float) 4
84: TypePointer RayPayloadNV 83(fvec4)
85(localPayload): 84(ptr) Variable RayPayloadNV
86: TypePointer IncomingRayPayloadNV 83(fvec4)
87(incomingPayload): 86(ptr) Variable IncomingRayPayloadNV
84: TypePointer RayPayloadKHR 83(fvec4)
85(localPayload): 84(ptr) Variable RayPayloadKHR
86: TypePointer IncomingRayPayloadKHR 83(fvec4)
87(incomingPayload): 86(ptr) Variable IncomingRayPayloadKHR
4(main): 2 Function None 3
5: Label
9(v0): 8(ptr) Variable Function
@@ -164,6 +164,6 @@ spv.ClosestHitShader.rchit
68: 60 Load 67(gl_WorldToObjectNV)
Store 66(v14) 68
72: 69 Load 71(accNV)
TraceNV 72 73 74 75 76 73 78 77 80 81 82
TraceRayKHR 72 73 74 75 76 73 78 77 80 81 82
Return
FunctionEnd