Add ray query capability if acceleration structure or ray query types declared (#2469)
* Add ray query capability if acceleration structure used Fixes #2430 in non-ray tracing stages and the extension is enabled * Add ray query capability if ray query declared * Fix printing of TypeRayQueryKHR It's no longer spelled with "Provisional"
This commit is contained in:
@@ -86,7 +86,7 @@ rayQuery-allOps.comp
|
||||
35: TypePointer Function 8(float)
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
45: TypeRayQueryKHR
|
||||
46: TypePointer Private 45
|
||||
47(rayQuery): 46(ptr) Variable Private
|
||||
48: TypeAccelerationStructureKHR
|
||||
|
||||
@@ -85,7 +85,7 @@ rayQuery-allOps.frag
|
||||
35: TypePointer Function 8(float)
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
45: TypeRayQueryKHR
|
||||
46: TypePointer Private 45
|
||||
47(rayQuery): 46(ptr) Variable Private
|
||||
48: TypeAccelerationStructureKHR
|
||||
|
||||
@@ -85,7 +85,7 @@ rayQuery-allOps.rgen
|
||||
35: TypePointer Function 8(float)
|
||||
37: 18(int) Constant 3
|
||||
38: 8(float) Constant 1176255488
|
||||
45: TypeRayQueryProvisionalKHR
|
||||
45: TypeRayQueryKHR
|
||||
46: TypePointer Private 45
|
||||
47(rayQuery): 46(ptr) Variable Private
|
||||
48: TypeAccelerationStructureKHR
|
||||
|
||||
@@ -26,7 +26,7 @@ rayQuery-global.rgen
|
||||
Decorate 27(rtas) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeRayQueryProvisionalKHR
|
||||
6: TypeRayQueryKHR
|
||||
7: TypePointer Private 6
|
||||
8: TypeFunction 2 7(ptr)
|
||||
15: TypeBool
|
||||
|
||||
@@ -55,7 +55,7 @@ rayQuery-initialize.rgen
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
10: TypeRayQueryKHR
|
||||
11: TypePointer Private 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
|
||||
@@ -57,7 +57,7 @@ rayQuery-no-cse.rgen
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
7: TypeFunction 6(int)
|
||||
10: TypeRayQueryProvisionalKHR
|
||||
10: TypeRayQueryKHR
|
||||
11: TypePointer Private 10
|
||||
12: TypeFloat 32
|
||||
13: TypeVector 12(float) 3
|
||||
|
||||
@@ -39,7 +39,7 @@ rayQuery.rgen
|
||||
11: TypePointer Function 10(float)
|
||||
13: 10(float) Constant 0
|
||||
15: 10(float) Constant 1148846080
|
||||
16: TypeRayQueryProvisionalKHR
|
||||
16: TypeRayQueryKHR
|
||||
17: TypePointer Private 16
|
||||
18(localRayQuery): 17(ptr) Variable Private
|
||||
19: TypeAccelerationStructureKHR
|
||||
|
||||
41
Test/baseResults/spv.ext.AccelDecl.frag.out
Normal file
41
Test/baseResults/spv.ext.AccelDecl.frag.out
Normal file
@@ -0,0 +1,41 @@
|
||||
spv.ext.AccelDecl.frag
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 15
|
||||
|
||||
Capability Shader
|
||||
Capability RayQueryKHR
|
||||
Extension "SPV_KHR_ray_query"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9 14
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_ARB_separate_shader_objects"
|
||||
SourceExtension "GL_EXT_nonuniform_qualifier"
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_EXT_scalar_block_layout"
|
||||
SourceExtension "GL_GOOGLE_cpp_style_line_directive"
|
||||
SourceExtension "GL_GOOGLE_include_directive"
|
||||
Name 4 "main"
|
||||
Name 9 "outColor"
|
||||
Name 14 "topLevelAS"
|
||||
Decorate 9(outColor) Location 0
|
||||
Decorate 14(topLevelAS) DescriptorSet 0
|
||||
Decorate 14(topLevelAS) Binding 1
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(outColor): 8(ptr) Variable Output
|
||||
10: 6(float) Constant 0
|
||||
11: 7(fvec4) ConstantComposite 10 10 10 10
|
||||
12: TypeAccelerationStructureKHR
|
||||
13: TypePointer UniformConstant 12
|
||||
14(topLevelAS): 13(ptr) Variable UniformConstant
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 9(outColor) 11
|
||||
Return
|
||||
FunctionEnd
|
||||
39
Test/baseResults/spv.ext.RayQueryDecl.frag.out
Normal file
39
Test/baseResults/spv.ext.RayQueryDecl.frag.out
Normal file
@@ -0,0 +1,39 @@
|
||||
spv.ext.RayQueryDecl.frag
|
||||
// Module Version 10400
|
||||
// Generated by (magic number): 8000a
|
||||
// Id's are bound by 15
|
||||
|
||||
Capability Shader
|
||||
Capability RayQueryKHR
|
||||
Extension "SPV_KHR_ray_query"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9 14
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_ARB_separate_shader_objects"
|
||||
SourceExtension "GL_EXT_nonuniform_qualifier"
|
||||
SourceExtension "GL_EXT_ray_query"
|
||||
SourceExtension "GL_EXT_scalar_block_layout"
|
||||
SourceExtension "GL_GOOGLE_cpp_style_line_directive"
|
||||
SourceExtension "GL_GOOGLE_include_directive"
|
||||
Name 4 "main"
|
||||
Name 9 "outColor"
|
||||
Name 14 "rq"
|
||||
Decorate 9(outColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(outColor): 8(ptr) Variable Output
|
||||
10: 6(float) Constant 0
|
||||
11: 7(fvec4) ConstantComposite 10 10 10 10
|
||||
12: TypeRayQueryKHR
|
||||
13: TypePointer Private 12
|
||||
14(rq): 13(ptr) Variable Private
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 9(outColor) 11
|
||||
Return
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user