Add support for GL_NV_displacement_micromap.
* Add support for GL_NV_displacement_micromap. * Update known_good for spirv-headers and spirv-tools.
This commit is contained in:
96
Test/baseResults/spv.nv.dmm-allops.comp.out
Normal file
96
Test/baseResults/spv.nv.dmm-allops.comp.out
Normal file
@@ -0,0 +1,96 @@
|
||||
spv.nv.dmm-allops.comp
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 59
|
||||
|
||||
Capability Shader
|
||||
Capability RayQueryKHR
|
||||
Capability DisplacementMicromapNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_displacement_micromap"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint GLCompute 4 "main" 11 16
|
||||
ExecutionMode 4 LocalSize 16 1 1
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_displacement_micromap"
|
||||
Name 4 "main"
|
||||
Name 9 "block"
|
||||
MemberName 9(block) 0 "op_pos"
|
||||
MemberName 9(block) 1 "op_bary"
|
||||
Name 11 ""
|
||||
Name 16 "as"
|
||||
MemberDecorate 9(block) 0 Offset 0
|
||||
MemberDecorate 9(block) 1 Offset 16
|
||||
Decorate 9(block) Block
|
||||
Decorate 11 DescriptorSet 0
|
||||
Decorate 11 Binding 0
|
||||
Decorate 16(as) DescriptorSet 0
|
||||
Decorate 16(as) Binding 1
|
||||
Decorate 58 BuiltIn WorkgroupSize
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeVector 6(float) 2
|
||||
9(block): TypeStruct 7(fvec3) 8(fvec2)
|
||||
10: TypePointer StorageBuffer 9(block)
|
||||
11: 10(ptr) Variable StorageBuffer
|
||||
12: TypeInt 32 1
|
||||
13: 12(int) Constant 0
|
||||
14: TypeAccelerationStructureKHR
|
||||
15: TypePointer UniformConstant 14
|
||||
16(as): 15(ptr) Variable UniformConstant
|
||||
18: 12(int) Constant 1
|
||||
19: TypeVector 12(int) 2
|
||||
20: 19(ivec2) ConstantComposite 13 13
|
||||
22: TypePointer StorageBuffer 7(fvec3)
|
||||
25: 19(ivec2) ConstantComposite 13 18
|
||||
32: 19(ivec2) ConstantComposite 18 13
|
||||
40: TypePointer StorageBuffer 8(fvec2)
|
||||
54: TypeInt 32 0
|
||||
55: TypeVector 54(int) 3
|
||||
56: 54(int) Constant 16
|
||||
57: 54(int) Constant 1
|
||||
58: 55(ivec3) ConstantComposite 56 57 57
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
17: 14 Load 16(as)
|
||||
21: 7(fvec3) FetchMicroTriangleVertexPositionNV 17 18 18 18 20
|
||||
23: 22(ptr) AccessChain 11 13
|
||||
Store 23 21
|
||||
24: 14 Load 16(as)
|
||||
26: 7(fvec3) FetchMicroTriangleVertexPositionNV 24 18 18 18 25
|
||||
27: 22(ptr) AccessChain 11 13
|
||||
28: 7(fvec3) Load 27
|
||||
29: 7(fvec3) FAdd 28 26
|
||||
30: 22(ptr) AccessChain 11 13
|
||||
Store 30 29
|
||||
31: 14 Load 16(as)
|
||||
33: 7(fvec3) FetchMicroTriangleVertexPositionNV 31 18 18 18 32
|
||||
34: 22(ptr) AccessChain 11 13
|
||||
35: 7(fvec3) Load 34
|
||||
36: 7(fvec3) FAdd 35 33
|
||||
37: 22(ptr) AccessChain 11 13
|
||||
Store 37 36
|
||||
38: 14 Load 16(as)
|
||||
39: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 38 18 18 18 20
|
||||
41: 40(ptr) AccessChain 11 18
|
||||
Store 41 39
|
||||
42: 14 Load 16(as)
|
||||
43: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 42 18 18 18 25
|
||||
44: 40(ptr) AccessChain 11 18
|
||||
45: 8(fvec2) Load 44
|
||||
46: 8(fvec2) FAdd 45 43
|
||||
47: 40(ptr) AccessChain 11 18
|
||||
Store 47 46
|
||||
48: 14 Load 16(as)
|
||||
49: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 48 18 18 18 32
|
||||
50: 40(ptr) AccessChain 11 18
|
||||
51: 8(fvec2) Load 50
|
||||
52: 8(fvec2) FAdd 51 49
|
||||
53: 40(ptr) AccessChain 11 18
|
||||
Store 53 52
|
||||
Return
|
||||
FunctionEnd
|
||||
95
Test/baseResults/spv.nv.dmm-allops.mesh.out
Normal file
95
Test/baseResults/spv.nv.dmm-allops.mesh.out
Normal file
@@ -0,0 +1,95 @@
|
||||
spv.nv.dmm-allops.mesh
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 54
|
||||
|
||||
Capability RayQueryKHR
|
||||
Capability MeshShadingNV
|
||||
Capability DisplacementMicromapNV
|
||||
Extension "SPV_KHR_ray_query"
|
||||
Extension "SPV_NV_displacement_micromap"
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint MeshNV 4 "main" 11 16
|
||||
ExecutionMode 4 LocalSize 1 1 1
|
||||
ExecutionMode 4 OutputVertices 8
|
||||
ExecutionMode 4 OutputPrimitivesNV 16
|
||||
ExecutionMode 4 OutputTrianglesNV
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_displacement_micromap"
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 9 "block"
|
||||
MemberName 9(block) 0 "op_pos"
|
||||
MemberName 9(block) 1 "op_bary"
|
||||
Name 11 ""
|
||||
Name 16 "as"
|
||||
MemberDecorate 9(block) 0 Offset 0
|
||||
MemberDecorate 9(block) 1 Offset 16
|
||||
Decorate 9(block) Block
|
||||
Decorate 11 DescriptorSet 0
|
||||
Decorate 11 Binding 0
|
||||
Decorate 16(as) DescriptorSet 0
|
||||
Decorate 16(as) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeVector 6(float) 2
|
||||
9(block): TypeStruct 7(fvec3) 8(fvec2)
|
||||
10: TypePointer StorageBuffer 9(block)
|
||||
11: 10(ptr) Variable StorageBuffer
|
||||
12: TypeInt 32 1
|
||||
13: 12(int) Constant 0
|
||||
14: TypeAccelerationStructureKHR
|
||||
15: TypePointer UniformConstant 14
|
||||
16(as): 15(ptr) Variable UniformConstant
|
||||
18: 12(int) Constant 1
|
||||
19: TypeVector 12(int) 2
|
||||
20: 19(ivec2) ConstantComposite 13 13
|
||||
22: TypePointer StorageBuffer 7(fvec3)
|
||||
25: 19(ivec2) ConstantComposite 13 18
|
||||
32: 19(ivec2) ConstantComposite 18 13
|
||||
40: TypePointer StorageBuffer 8(fvec2)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
17: 14 Load 16(as)
|
||||
21: 7(fvec3) FetchMicroTriangleVertexPositionNV 17 18 18 18 20
|
||||
23: 22(ptr) AccessChain 11 13
|
||||
Store 23 21
|
||||
24: 14 Load 16(as)
|
||||
26: 7(fvec3) FetchMicroTriangleVertexPositionNV 24 18 18 18 25
|
||||
27: 22(ptr) AccessChain 11 13
|
||||
28: 7(fvec3) Load 27
|
||||
29: 7(fvec3) FAdd 28 26
|
||||
30: 22(ptr) AccessChain 11 13
|
||||
Store 30 29
|
||||
31: 14 Load 16(as)
|
||||
33: 7(fvec3) FetchMicroTriangleVertexPositionNV 31 18 18 18 32
|
||||
34: 22(ptr) AccessChain 11 13
|
||||
35: 7(fvec3) Load 34
|
||||
36: 7(fvec3) FAdd 35 33
|
||||
37: 22(ptr) AccessChain 11 13
|
||||
Store 37 36
|
||||
38: 14 Load 16(as)
|
||||
39: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 38 18 18 18 20
|
||||
41: 40(ptr) AccessChain 11 18
|
||||
Store 41 39
|
||||
42: 14 Load 16(as)
|
||||
43: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 42 18 18 18 25
|
||||
44: 40(ptr) AccessChain 11 18
|
||||
45: 8(fvec2) Load 44
|
||||
46: 8(fvec2) FAdd 45 43
|
||||
47: 40(ptr) AccessChain 11 18
|
||||
Store 47 46
|
||||
48: 14 Load 16(as)
|
||||
49: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 48 18 18 18 32
|
||||
50: 40(ptr) AccessChain 11 18
|
||||
51: 8(fvec2) Load 50
|
||||
52: 8(fvec2) FAdd 51 49
|
||||
53: 40(ptr) AccessChain 11 18
|
||||
Store 53 52
|
||||
Return
|
||||
FunctionEnd
|
||||
126
Test/baseResults/spv.nv.dmm-allops.rahit.out
Normal file
126
Test/baseResults/spv.nv.dmm-allops.rahit.out
Normal file
@@ -0,0 +1,126 @@
|
||||
spv.nv.dmm-allops.rahit
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 77
|
||||
|
||||
Capability RayTracingKHR
|
||||
Capability CapabilityRayTracingDisplacementMicromapNV
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
Extension "SPV_NV_displacement_micromap"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint AnyHitKHR 4 "main" 12 18 40 59 64 67 76
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
SourceExtension "GL_NV_displacement_micromap"
|
||||
Name 4 "main"
|
||||
Name 10 "block"
|
||||
MemberName 10(block) 0 "op_pos"
|
||||
MemberName 10(block) 1 "op_bary"
|
||||
MemberName 10(block) 2 "op_hit"
|
||||
Name 12 ""
|
||||
Name 18 "gl_HitMicroTriangleVertexPositionsNV"
|
||||
Name 40 "gl_HitMicroTriangleVertexBarycentricsNV"
|
||||
Name 59 "gl_HitKindEXT"
|
||||
Name 64 "gl_HitKindFrontFacingMicroTriangleNV"
|
||||
Name 67 "gl_HitKindBackFacingMicroTriangleNV"
|
||||
Name 76 "as"
|
||||
MemberDecorate 10(block) 0 Offset 0
|
||||
MemberDecorate 10(block) 1 Offset 16
|
||||
MemberDecorate 10(block) 2 Offset 24
|
||||
Decorate 10(block) Block
|
||||
Decorate 12 DescriptorSet 0
|
||||
Decorate 12 Binding 0
|
||||
Decorate 18(gl_HitMicroTriangleVertexPositionsNV) BuiltIn HitMicroTriangleVertexPositionsNV
|
||||
Decorate 40(gl_HitMicroTriangleVertexBarycentricsNV) BuiltIn HitMicroTriangleVertexBarycentricsNV
|
||||
Decorate 59(gl_HitKindEXT) BuiltIn HitKindKHR
|
||||
Decorate 64(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV
|
||||
Decorate 67(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV
|
||||
Decorate 76(as) DescriptorSet 0
|
||||
Decorate 76(as) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeVector 6(float) 2
|
||||
9: TypeInt 32 0
|
||||
10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int)
|
||||
11: TypePointer StorageBuffer 10(block)
|
||||
12: 11(ptr) Variable StorageBuffer
|
||||
13: TypeInt 32 1
|
||||
14: 13(int) Constant 0
|
||||
15: 9(int) Constant 3
|
||||
16: TypeArray 7(fvec3) 15
|
||||
17: TypePointer Input 16
|
||||
18(gl_HitMicroTriangleVertexPositionsNV): 17(ptr) Variable Input
|
||||
19: TypePointer Input 7(fvec3)
|
||||
22: TypePointer StorageBuffer 7(fvec3)
|
||||
24: 13(int) Constant 1
|
||||
31: 13(int) Constant 2
|
||||
38: TypeArray 8(fvec2) 15
|
||||
39: TypePointer Input 38
|
||||
40(gl_HitMicroTriangleVertexBarycentricsNV): 39(ptr) Variable Input
|
||||
41: TypePointer Input 8(fvec2)
|
||||
44: TypePointer StorageBuffer 8(fvec2)
|
||||
58: TypePointer Input 9(int)
|
||||
59(gl_HitKindEXT): 58(ptr) Variable Input
|
||||
61: TypePointer StorageBuffer 9(int)
|
||||
63: 9(int) Constant 255
|
||||
64(gl_HitKindFrontFacingMicroTriangleNV): 58(ptr) Variable Input
|
||||
67(gl_HitKindBackFacingMicroTriangleNV): 58(ptr) Variable Input
|
||||
74: TypeAccelerationStructureKHR
|
||||
75: TypePointer UniformConstant 74
|
||||
76(as): 75(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
20: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 14
|
||||
21: 7(fvec3) Load 20
|
||||
23: 22(ptr) AccessChain 12 14
|
||||
Store 23 21
|
||||
25: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 24
|
||||
26: 7(fvec3) Load 25
|
||||
27: 22(ptr) AccessChain 12 14
|
||||
28: 7(fvec3) Load 27
|
||||
29: 7(fvec3) FAdd 28 26
|
||||
30: 22(ptr) AccessChain 12 14
|
||||
Store 30 29
|
||||
32: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 31
|
||||
33: 7(fvec3) Load 32
|
||||
34: 22(ptr) AccessChain 12 14
|
||||
35: 7(fvec3) Load 34
|
||||
36: 7(fvec3) FAdd 35 33
|
||||
37: 22(ptr) AccessChain 12 14
|
||||
Store 37 36
|
||||
42: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 14
|
||||
43: 8(fvec2) Load 42
|
||||
45: 44(ptr) AccessChain 12 24
|
||||
Store 45 43
|
||||
46: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 24
|
||||
47: 8(fvec2) Load 46
|
||||
48: 44(ptr) AccessChain 12 24
|
||||
49: 8(fvec2) Load 48
|
||||
50: 8(fvec2) FAdd 49 47
|
||||
51: 44(ptr) AccessChain 12 24
|
||||
Store 51 50
|
||||
52: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 31
|
||||
53: 8(fvec2) Load 52
|
||||
54: 44(ptr) AccessChain 12 24
|
||||
55: 8(fvec2) Load 54
|
||||
56: 8(fvec2) FAdd 55 53
|
||||
57: 44(ptr) AccessChain 12 24
|
||||
Store 57 56
|
||||
60: 9(int) Load 59(gl_HitKindEXT)
|
||||
62: 61(ptr) AccessChain 12 31
|
||||
Store 62 60
|
||||
65: 9(int) Load 64(gl_HitKindFrontFacingMicroTriangleNV)
|
||||
66: 9(int) BitwiseOr 63 65
|
||||
68: 9(int) Load 67(gl_HitKindBackFacingMicroTriangleNV)
|
||||
69: 9(int) BitwiseOr 66 68
|
||||
70: 61(ptr) AccessChain 12 31
|
||||
71: 9(int) Load 70
|
||||
72: 9(int) BitwiseAnd 71 69
|
||||
73: 61(ptr) AccessChain 12 31
|
||||
Store 73 72
|
||||
Return
|
||||
FunctionEnd
|
||||
126
Test/baseResults/spv.nv.dmm-allops.rchit.out
Normal file
126
Test/baseResults/spv.nv.dmm-allops.rchit.out
Normal file
@@ -0,0 +1,126 @@
|
||||
spv.nv.dmm-allops.rchit
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 77
|
||||
|
||||
Capability RayTracingKHR
|
||||
Capability CapabilityRayTracingDisplacementMicromapNV
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
Extension "SPV_NV_displacement_micromap"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint ClosestHitKHR 4 "main" 12 18 40 59 64 67 76
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_EXT_ray_tracing"
|
||||
SourceExtension "GL_NV_displacement_micromap"
|
||||
Name 4 "main"
|
||||
Name 10 "block"
|
||||
MemberName 10(block) 0 "op_pos"
|
||||
MemberName 10(block) 1 "op_bary"
|
||||
MemberName 10(block) 2 "op_hit"
|
||||
Name 12 ""
|
||||
Name 18 "gl_HitMicroTriangleVertexPositionsNV"
|
||||
Name 40 "gl_HitMicroTriangleVertexBarycentricsNV"
|
||||
Name 59 "gl_HitKindEXT"
|
||||
Name 64 "gl_HitKindFrontFacingMicroTriangleNV"
|
||||
Name 67 "gl_HitKindBackFacingMicroTriangleNV"
|
||||
Name 76 "as"
|
||||
MemberDecorate 10(block) 0 Offset 0
|
||||
MemberDecorate 10(block) 1 Offset 16
|
||||
MemberDecorate 10(block) 2 Offset 24
|
||||
Decorate 10(block) Block
|
||||
Decorate 12 DescriptorSet 0
|
||||
Decorate 12 Binding 0
|
||||
Decorate 18(gl_HitMicroTriangleVertexPositionsNV) BuiltIn HitMicroTriangleVertexPositionsNV
|
||||
Decorate 40(gl_HitMicroTriangleVertexBarycentricsNV) BuiltIn HitMicroTriangleVertexBarycentricsNV
|
||||
Decorate 59(gl_HitKindEXT) BuiltIn HitKindKHR
|
||||
Decorate 64(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV
|
||||
Decorate 67(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV
|
||||
Decorate 76(as) DescriptorSet 0
|
||||
Decorate 76(as) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeVector 6(float) 2
|
||||
9: TypeInt 32 0
|
||||
10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int)
|
||||
11: TypePointer StorageBuffer 10(block)
|
||||
12: 11(ptr) Variable StorageBuffer
|
||||
13: TypeInt 32 1
|
||||
14: 13(int) Constant 0
|
||||
15: 9(int) Constant 3
|
||||
16: TypeArray 7(fvec3) 15
|
||||
17: TypePointer Input 16
|
||||
18(gl_HitMicroTriangleVertexPositionsNV): 17(ptr) Variable Input
|
||||
19: TypePointer Input 7(fvec3)
|
||||
22: TypePointer StorageBuffer 7(fvec3)
|
||||
24: 13(int) Constant 1
|
||||
31: 13(int) Constant 2
|
||||
38: TypeArray 8(fvec2) 15
|
||||
39: TypePointer Input 38
|
||||
40(gl_HitMicroTriangleVertexBarycentricsNV): 39(ptr) Variable Input
|
||||
41: TypePointer Input 8(fvec2)
|
||||
44: TypePointer StorageBuffer 8(fvec2)
|
||||
58: TypePointer Input 9(int)
|
||||
59(gl_HitKindEXT): 58(ptr) Variable Input
|
||||
61: TypePointer StorageBuffer 9(int)
|
||||
63: 9(int) Constant 255
|
||||
64(gl_HitKindFrontFacingMicroTriangleNV): 58(ptr) Variable Input
|
||||
67(gl_HitKindBackFacingMicroTriangleNV): 58(ptr) Variable Input
|
||||
74: TypeAccelerationStructureKHR
|
||||
75: TypePointer UniformConstant 74
|
||||
76(as): 75(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
20: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 14
|
||||
21: 7(fvec3) Load 20
|
||||
23: 22(ptr) AccessChain 12 14
|
||||
Store 23 21
|
||||
25: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 24
|
||||
26: 7(fvec3) Load 25
|
||||
27: 22(ptr) AccessChain 12 14
|
||||
28: 7(fvec3) Load 27
|
||||
29: 7(fvec3) FAdd 28 26
|
||||
30: 22(ptr) AccessChain 12 14
|
||||
Store 30 29
|
||||
32: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 31
|
||||
33: 7(fvec3) Load 32
|
||||
34: 22(ptr) AccessChain 12 14
|
||||
35: 7(fvec3) Load 34
|
||||
36: 7(fvec3) FAdd 35 33
|
||||
37: 22(ptr) AccessChain 12 14
|
||||
Store 37 36
|
||||
42: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 14
|
||||
43: 8(fvec2) Load 42
|
||||
45: 44(ptr) AccessChain 12 24
|
||||
Store 45 43
|
||||
46: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 24
|
||||
47: 8(fvec2) Load 46
|
||||
48: 44(ptr) AccessChain 12 24
|
||||
49: 8(fvec2) Load 48
|
||||
50: 8(fvec2) FAdd 49 47
|
||||
51: 44(ptr) AccessChain 12 24
|
||||
Store 51 50
|
||||
52: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 31
|
||||
53: 8(fvec2) Load 52
|
||||
54: 44(ptr) AccessChain 12 24
|
||||
55: 8(fvec2) Load 54
|
||||
56: 8(fvec2) FAdd 55 53
|
||||
57: 44(ptr) AccessChain 12 24
|
||||
Store 57 56
|
||||
60: 9(int) Load 59(gl_HitKindEXT)
|
||||
62: 61(ptr) AccessChain 12 31
|
||||
Store 62 60
|
||||
65: 9(int) Load 64(gl_HitKindFrontFacingMicroTriangleNV)
|
||||
66: 9(int) BitwiseOr 63 65
|
||||
68: 9(int) Load 67(gl_HitKindBackFacingMicroTriangleNV)
|
||||
69: 9(int) BitwiseOr 66 68
|
||||
70: 61(ptr) AccessChain 12 31
|
||||
71: 9(int) Load 70
|
||||
72: 9(int) BitwiseAnd 71 69
|
||||
73: 61(ptr) AccessChain 12 31
|
||||
Store 73 72
|
||||
Return
|
||||
FunctionEnd
|
||||
108
Test/baseResults/spv.nv.dmm-allops.rgen.out
Normal file
108
Test/baseResults/spv.nv.dmm-allops.rgen.out
Normal file
@@ -0,0 +1,108 @@
|
||||
spv.nv.dmm-allops.rgen
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000b
|
||||
// Id's are bound by 66
|
||||
|
||||
Capability RayTracingKHR
|
||||
Capability DisplacementMicromapNV
|
||||
Capability CapabilityRayTracingDisplacementMicromapNV
|
||||
Extension "SPV_KHR_ray_tracing"
|
||||
Extension "SPV_NV_displacement_micromap"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint RayGenerationKHR 4 "main" 12 17 58 61
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_NV_displacement_micromap"
|
||||
Name 4 "main"
|
||||
Name 10 "block"
|
||||
MemberName 10(block) 0 "op_pos"
|
||||
MemberName 10(block) 1 "op_bary"
|
||||
MemberName 10(block) 2 "op_hitmask"
|
||||
Name 12 ""
|
||||
Name 17 "as"
|
||||
Name 58 "gl_HitKindFrontFacingMicroTriangleNV"
|
||||
Name 61 "gl_HitKindBackFacingMicroTriangleNV"
|
||||
MemberDecorate 10(block) 0 Offset 0
|
||||
MemberDecorate 10(block) 1 Offset 16
|
||||
MemberDecorate 10(block) 2 Offset 24
|
||||
Decorate 10(block) Block
|
||||
Decorate 12 DescriptorSet 0
|
||||
Decorate 12 Binding 0
|
||||
Decorate 17(as) DescriptorSet 0
|
||||
Decorate 17(as) Binding 1
|
||||
Decorate 58(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV
|
||||
Decorate 61(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 3
|
||||
8: TypeVector 6(float) 2
|
||||
9: TypeInt 32 0
|
||||
10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int)
|
||||
11: TypePointer StorageBuffer 10(block)
|
||||
12: 11(ptr) Variable StorageBuffer
|
||||
13: TypeInt 32 1
|
||||
14: 13(int) Constant 0
|
||||
15: TypeAccelerationStructureKHR
|
||||
16: TypePointer UniformConstant 15
|
||||
17(as): 16(ptr) Variable UniformConstant
|
||||
19: 13(int) Constant 1
|
||||
20: TypeVector 13(int) 2
|
||||
21: 20(ivec2) ConstantComposite 14 14
|
||||
23: TypePointer StorageBuffer 7(fvec3)
|
||||
26: 20(ivec2) ConstantComposite 14 19
|
||||
33: 20(ivec2) ConstantComposite 19 14
|
||||
41: TypePointer StorageBuffer 8(fvec2)
|
||||
55: 13(int) Constant 2
|
||||
56: 9(int) Constant 255
|
||||
57: TypePointer Input 9(int)
|
||||
58(gl_HitKindFrontFacingMicroTriangleNV): 57(ptr) Variable Input
|
||||
61(gl_HitKindBackFacingMicroTriangleNV): 57(ptr) Variable Input
|
||||
64: TypePointer StorageBuffer 9(int)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
18: 15 Load 17(as)
|
||||
22: 7(fvec3) FetchMicroTriangleVertexPositionNV 18 19 19 19 21
|
||||
24: 23(ptr) AccessChain 12 14
|
||||
Store 24 22
|
||||
25: 15 Load 17(as)
|
||||
27: 7(fvec3) FetchMicroTriangleVertexPositionNV 25 19 19 19 26
|
||||
28: 23(ptr) AccessChain 12 14
|
||||
29: 7(fvec3) Load 28
|
||||
30: 7(fvec3) FAdd 29 27
|
||||
31: 23(ptr) AccessChain 12 14
|
||||
Store 31 30
|
||||
32: 15 Load 17(as)
|
||||
34: 7(fvec3) FetchMicroTriangleVertexPositionNV 32 19 19 19 33
|
||||
35: 23(ptr) AccessChain 12 14
|
||||
36: 7(fvec3) Load 35
|
||||
37: 7(fvec3) FAdd 36 34
|
||||
38: 23(ptr) AccessChain 12 14
|
||||
Store 38 37
|
||||
39: 15 Load 17(as)
|
||||
40: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 39 19 19 19 21
|
||||
42: 41(ptr) AccessChain 12 19
|
||||
Store 42 40
|
||||
43: 15 Load 17(as)
|
||||
44: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 43 19 19 19 26
|
||||
45: 41(ptr) AccessChain 12 19
|
||||
46: 8(fvec2) Load 45
|
||||
47: 8(fvec2) FAdd 46 44
|
||||
48: 41(ptr) AccessChain 12 19
|
||||
Store 48 47
|
||||
49: 15 Load 17(as)
|
||||
50: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 49 19 19 19 33
|
||||
51: 41(ptr) AccessChain 12 19
|
||||
52: 8(fvec2) Load 51
|
||||
53: 8(fvec2) FAdd 52 50
|
||||
54: 41(ptr) AccessChain 12 19
|
||||
Store 54 53
|
||||
59: 9(int) Load 58(gl_HitKindFrontFacingMicroTriangleNV)
|
||||
60: 9(int) BitwiseOr 56 59
|
||||
62: 9(int) Load 61(gl_HitKindBackFacingMicroTriangleNV)
|
||||
63: 9(int) BitwiseOr 60 62
|
||||
65: 64(ptr) AccessChain 12 55
|
||||
Store 65 63
|
||||
Return
|
||||
FunctionEnd
|
||||
19
Test/spv.nv.dmm-allops.comp
Normal file
19
Test/spv.nv.dmm-allops.comp
Normal file
@@ -0,0 +1,19 @@
|
||||
#version 460
|
||||
#extension GL_NV_displacement_micromap : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
layout(local_size_x = 16) in;
|
||||
layout(binding = 1) uniform accelerationStructureEXT as;
|
||||
layout(binding = 0) buffer block {
|
||||
vec3 op_pos;
|
||||
vec2 op_bary;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0));
|
||||
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1));
|
||||
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0));
|
||||
|
||||
op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0));
|
||||
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1));
|
||||
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0));
|
||||
}
|
||||
20
Test/spv.nv.dmm-allops.mesh
Normal file
20
Test/spv.nv.dmm-allops.mesh
Normal file
@@ -0,0 +1,20 @@
|
||||
#version 460
|
||||
#extension GL_NV_displacement_micromap : enable
|
||||
#extension GL_NV_mesh_shader : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
layout(max_vertices = 8, max_primitives = 16, triangles) out;
|
||||
layout(binding = 1) uniform accelerationStructureEXT as;
|
||||
layout(binding = 0) buffer block {
|
||||
vec3 op_pos;
|
||||
vec2 op_bary;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0));
|
||||
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1));
|
||||
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0));
|
||||
|
||||
op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0));
|
||||
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1));
|
||||
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0));
|
||||
}
|
||||
26
Test/spv.nv.dmm-allops.rahit
Normal file
26
Test/spv.nv.dmm-allops.rahit
Normal file
@@ -0,0 +1,26 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
#extension GL_NV_displacement_micromap : enable
|
||||
layout(binding = 1) uniform accelerationStructureEXT as;
|
||||
layout(binding = 0) buffer block {
|
||||
vec3 op_pos;
|
||||
vec2 op_bary;
|
||||
uint op_hit;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
op_pos = gl_HitMicroTriangleVertexPositionsNV[0];
|
||||
op_pos += gl_HitMicroTriangleVertexPositionsNV[1];
|
||||
op_pos += gl_HitMicroTriangleVertexPositionsNV[2];
|
||||
|
||||
op_bary = gl_HitMicroTriangleVertexBarycentricsNV[0];
|
||||
op_bary += gl_HitMicroTriangleVertexBarycentricsNV[1];
|
||||
op_bary += gl_HitMicroTriangleVertexBarycentricsNV[2];
|
||||
|
||||
op_hit = gl_HitKindEXT;
|
||||
op_hit &= gl_HitKindFrontFacingTriangleEXT |
|
||||
gl_HitKindBackFacingTriangleEXT |
|
||||
gl_HitKindFrontFacingMicroTriangleNV |
|
||||
gl_HitKindBackFacingMicroTriangleNV;
|
||||
}
|
||||
26
Test/spv.nv.dmm-allops.rchit
Normal file
26
Test/spv.nv.dmm-allops.rchit
Normal file
@@ -0,0 +1,26 @@
|
||||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
#extension GL_NV_displacement_micromap : enable
|
||||
layout(binding = 1) uniform accelerationStructureEXT as;
|
||||
layout(binding = 0) buffer block {
|
||||
vec3 op_pos;
|
||||
vec2 op_bary;
|
||||
uint op_hit;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
op_pos = gl_HitMicroTriangleVertexPositionsNV[0];
|
||||
op_pos += gl_HitMicroTriangleVertexPositionsNV[1];
|
||||
op_pos += gl_HitMicroTriangleVertexPositionsNV[2];
|
||||
|
||||
op_bary = gl_HitMicroTriangleVertexBarycentricsNV[0];
|
||||
op_bary += gl_HitMicroTriangleVertexBarycentricsNV[1];
|
||||
op_bary += gl_HitMicroTriangleVertexBarycentricsNV[2];
|
||||
|
||||
op_hit = gl_HitKindEXT;
|
||||
op_hit &= gl_HitKindFrontFacingTriangleEXT |
|
||||
gl_HitKindBackFacingTriangleEXT |
|
||||
gl_HitKindFrontFacingMicroTriangleNV |
|
||||
gl_HitKindBackFacingMicroTriangleNV;
|
||||
}
|
||||
24
Test/spv.nv.dmm-allops.rgen
Normal file
24
Test/spv.nv.dmm-allops.rgen
Normal file
@@ -0,0 +1,24 @@
|
||||
#version 460
|
||||
#extension GL_NV_displacement_micromap : enable
|
||||
#extension GL_EXT_ray_query : enable
|
||||
layout(binding = 1) uniform accelerationStructureEXT as;
|
||||
layout(binding = 0) buffer block {
|
||||
vec3 op_pos;
|
||||
vec2 op_bary;
|
||||
uint op_hitmask;
|
||||
};
|
||||
void main()
|
||||
{
|
||||
op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0));
|
||||
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1));
|
||||
op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0));
|
||||
|
||||
op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0));
|
||||
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1));
|
||||
op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0));
|
||||
|
||||
op_hitmask = gl_HitKindFrontFacingTriangleEXT |
|
||||
gl_HitKindBackFacingTriangleEXT |
|
||||
gl_HitKindFrontFacingMicroTriangleNV |
|
||||
gl_HitKindBackFacingMicroTriangleNV;
|
||||
}
|
||||
Reference in New Issue
Block a user