update spirv-headers and fix handling of gl_HitTEXT (#2471)
* update spirv-headers and fix handling of gl_HitTEXT Update spirv-headers known_good to f027d53ded7e230e008d37c8b47ede7cd308e19d and update SPIRV/spirv.hpp to copy from that version as well. In GLSL gl_HitTNV/gl_HitTEXT is defined as an alias of gl_RayTmaxNV/gl_RayTmaxEXT SPV_NV_ray_tracing has a dedicated HitTNV which gl_HitTNV maps to. For SPV_KHR_ray_tracing, gl_HitTEXT gets mapped to a RayTmaxKHR decoraged variable to simplify the SPIRV consumer. This change fixes the mapping for the GL_EXT_ray_tracing extension, and updates the test results to match. * update MissNV shader test to not use ObjectRay builtins They shouldn't existing in the miss stage because there is no object intersected
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
spv.MissShader.rmiss
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 60
|
||||
// Id's are bound by 59
|
||||
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MissKHR 4 "main" 11 14 21 24 27 30 35 38
|
||||
EntryPoint MissKHR 4 "main" 11 14 21 24 29 34 37
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_ray_tracing"
|
||||
Name 4 "main"
|
||||
@@ -19,29 +19,26 @@ spv.MissShader.rmiss
|
||||
Name 21 "gl_WorldRayOriginNV"
|
||||
Name 23 "v3"
|
||||
Name 24 "gl_WorldRayDirectionNV"
|
||||
Name 26 "v4"
|
||||
Name 27 "gl_ObjectRayOriginNV"
|
||||
Name 29 "v5"
|
||||
Name 30 "gl_ObjectRayDirectionNV"
|
||||
Name 33 "v6"
|
||||
Name 35 "gl_RayTminNV"
|
||||
Name 37 "v7"
|
||||
Name 38 "gl_RayTmaxNV"
|
||||
Name 42 "accNV"
|
||||
Name 57 "localPayload"
|
||||
Name 59 "incomingPayload"
|
||||
Name 27 "v4"
|
||||
Name 29 "gl_IncomingRayFlagsNV"
|
||||
Name 32 "v6"
|
||||
Name 34 "gl_RayTminNV"
|
||||
Name 36 "v7"
|
||||
Name 37 "gl_RayTmaxNV"
|
||||
Name 41 "accNV"
|
||||
Name 56 "localPayload"
|
||||
Name 58 "incomingPayload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdKHR
|
||||
Decorate 14(gl_LaunchSizeNV) BuiltIn LaunchSizeKHR
|
||||
Decorate 21(gl_WorldRayOriginNV) BuiltIn WorldRayOriginKHR
|
||||
Decorate 24(gl_WorldRayDirectionNV) BuiltIn WorldRayDirectionKHR
|
||||
Decorate 27(gl_ObjectRayOriginNV) BuiltIn ObjectRayOriginKHR
|
||||
Decorate 30(gl_ObjectRayDirectionNV) BuiltIn ObjectRayDirectionKHR
|
||||
Decorate 35(gl_RayTminNV) BuiltIn RayTminKHR
|
||||
Decorate 38(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||
Decorate 42(accNV) DescriptorSet 0
|
||||
Decorate 42(accNV) Binding 0
|
||||
Decorate 57(localPayload) Location 0
|
||||
Decorate 59(incomingPayload) Location 1
|
||||
Decorate 29(gl_IncomingRayFlagsNV) BuiltIn IncomingRayFlagsKHR
|
||||
Decorate 34(gl_RayTminNV) BuiltIn RayTminKHR
|
||||
Decorate 37(gl_RayTmaxNV) BuiltIn RayTmaxKHR
|
||||
Decorate 41(accNV) DescriptorSet 0
|
||||
Decorate 41(accNV) Binding 0
|
||||
Decorate 56(localPayload) Location 0
|
||||
Decorate 58(incomingPayload) Location 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
@@ -56,41 +53,41 @@ spv.MissShader.rmiss
|
||||
20: TypePointer Input 17(fvec3)
|
||||
21(gl_WorldRayOriginNV): 20(ptr) Variable Input
|
||||
24(gl_WorldRayDirectionNV): 20(ptr) Variable Input
|
||||
27(gl_ObjectRayOriginNV): 20(ptr) Variable Input
|
||||
30(gl_ObjectRayDirectionNV): 20(ptr) Variable Input
|
||||
32: TypePointer Function 16(float)
|
||||
34: TypePointer Input 16(float)
|
||||
35(gl_RayTminNV): 34(ptr) Variable Input
|
||||
38(gl_RayTmaxNV): 34(ptr) Variable Input
|
||||
40: TypeAccelerationStructureKHR
|
||||
41: TypePointer UniformConstant 40
|
||||
42(accNV): 41(ptr) Variable UniformConstant
|
||||
44: 6(int) Constant 0
|
||||
45: 6(int) Constant 1
|
||||
46: 6(int) Constant 2
|
||||
47: 6(int) Constant 3
|
||||
48: 16(float) Constant 1056964608
|
||||
49: 17(fvec3) ConstantComposite 48 48 48
|
||||
50: 16(float) Constant 1065353216
|
||||
51: 17(fvec3) ConstantComposite 50 50 50
|
||||
52: 16(float) Constant 1061158912
|
||||
53: TypeInt 32 1
|
||||
54: 53(int) Constant 1
|
||||
55: TypeVector 16(float) 4
|
||||
56: TypePointer RayPayloadKHR 55(fvec4)
|
||||
57(localPayload): 56(ptr) Variable RayPayloadKHR
|
||||
58: TypePointer IncomingRayPayloadKHR 55(fvec4)
|
||||
59(incomingPayload): 58(ptr) Variable IncomingRayPayloadKHR
|
||||
26: TypePointer Function 6(int)
|
||||
28: TypePointer Input 6(int)
|
||||
29(gl_IncomingRayFlagsNV): 28(ptr) Variable Input
|
||||
31: TypePointer Function 16(float)
|
||||
33: TypePointer Input 16(float)
|
||||
34(gl_RayTminNV): 33(ptr) Variable Input
|
||||
37(gl_RayTmaxNV): 33(ptr) Variable Input
|
||||
39: TypeAccelerationStructureKHR
|
||||
40: TypePointer UniformConstant 39
|
||||
41(accNV): 40(ptr) Variable UniformConstant
|
||||
43: 6(int) Constant 0
|
||||
44: 6(int) Constant 1
|
||||
45: 6(int) Constant 2
|
||||
46: 6(int) Constant 3
|
||||
47: 16(float) Constant 1056964608
|
||||
48: 17(fvec3) ConstantComposite 47 47 47
|
||||
49: 16(float) Constant 1065353216
|
||||
50: 17(fvec3) ConstantComposite 49 49 49
|
||||
51: 16(float) Constant 1061158912
|
||||
52: TypeInt 32 1
|
||||
53: 52(int) Constant 1
|
||||
54: TypeVector 16(float) 4
|
||||
55: TypePointer RayPayloadKHR 54(fvec4)
|
||||
56(localPayload): 55(ptr) Variable RayPayloadKHR
|
||||
57: TypePointer IncomingRayPayloadKHR 54(fvec4)
|
||||
58(incomingPayload): 57(ptr) Variable IncomingRayPayloadKHR
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
9(v0): 8(ptr) Variable Function
|
||||
13(v1): 8(ptr) Variable Function
|
||||
19(v2): 18(ptr) Variable Function
|
||||
23(v3): 18(ptr) Variable Function
|
||||
26(v4): 18(ptr) Variable Function
|
||||
29(v5): 18(ptr) Variable Function
|
||||
33(v6): 32(ptr) Variable Function
|
||||
37(v7): 32(ptr) Variable Function
|
||||
27(v4): 26(ptr) Variable Function
|
||||
32(v6): 31(ptr) Variable Function
|
||||
36(v7): 31(ptr) Variable Function
|
||||
12: 7(ivec3) Load 11(gl_LaunchIDNV)
|
||||
Store 9(v0) 12
|
||||
15: 7(ivec3) Load 14(gl_LaunchSizeNV)
|
||||
@@ -99,15 +96,13 @@ spv.MissShader.rmiss
|
||||
Store 19(v2) 22
|
||||
25: 17(fvec3) Load 24(gl_WorldRayDirectionNV)
|
||||
Store 23(v3) 25
|
||||
28: 17(fvec3) Load 27(gl_ObjectRayOriginNV)
|
||||
Store 26(v4) 28
|
||||
31: 17(fvec3) Load 30(gl_ObjectRayDirectionNV)
|
||||
Store 29(v5) 31
|
||||
36: 16(float) Load 35(gl_RayTminNV)
|
||||
Store 33(v6) 36
|
||||
39: 16(float) Load 38(gl_RayTmaxNV)
|
||||
Store 37(v7) 39
|
||||
43: 40 Load 42(accNV)
|
||||
TraceNV 43 44 45 46 47 44 49 48 51 52 54
|
||||
30: 6(int) Load 29(gl_IncomingRayFlagsNV)
|
||||
Store 27(v4) 30
|
||||
35: 16(float) Load 34(gl_RayTminNV)
|
||||
Store 32(v6) 35
|
||||
38: 16(float) Load 37(gl_RayTmaxNV)
|
||||
Store 36(v7) 38
|
||||
42: 39 Load 41(accNV)
|
||||
TraceNV 42 43 44 45 46 43 48 47 50 51 53
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user