Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
054b5e35
Commit
054b5e35
authored
Mar 26, 2020
by
Neslisah Torosdagli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pass by reference updates
parent
b366a703
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
22 additions
and
272 deletions
+22
-272
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+1
-5
rayQuery-allOps.comp.out
Test/baseResults/rayQuery-allOps.comp.out
+2
-4
rayQuery-allOps.frag.out
Test/baseResults/rayQuery-allOps.frag.out
+2
-4
rayQuery-allOps.rgen.out
Test/baseResults/rayQuery-allOps.rgen.out
+2
-4
rayQuery-array-2d-dynamic.rgen.out
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
+0
-195
rayQuery-decls.rgen.out
Test/baseResults/rayQuery-decls.rgen.out
+8
-10
rayQuery-initialize.rgen.out
Test/baseResults/rayQuery-initialize.rgen.out
+2
-4
rayQuery-no-cse.rgen.out
Test/baseResults/rayQuery-no-cse.rgen.out
+3
-5
rayQuery.rgen.out
Test/baseResults/rayQuery.rgen.out
+2
-4
rayQuery-array-2d-dynamic.rgen
Test/rayQuery-array-2d-dynamic.rgen
+0
-36
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+0
-1
No files found.
SPIRV/GlslangToSpv.cpp
View file @
054b5e35
...
@@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
...
@@ -1183,7 +1183,7 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang:
spv
::
StorageClass
TGlslangToSpvTraverser
::
TranslateStorageClass
(
const
glslang
::
TType
&
type
)
spv
::
StorageClass
TGlslangToSpvTraverser
::
TranslateStorageClass
(
const
glslang
::
TType
&
type
)
{
{
if
(
type
.
getBasicType
()
==
glslang
::
EbtRayQuery
)
if
(
type
.
getBasicType
()
==
glslang
::
EbtRayQuery
)
return
spv
::
StorageClass
Workgroup
;
return
spv
::
StorageClass
Function
;
if
(
type
.
getQualifier
().
isPipeInput
())
if
(
type
.
getQualifier
().
isPipeInput
())
return
spv
::
StorageClassInput
;
return
spv
::
StorageClassInput
;
if
(
type
.
getQualifier
().
isPipeOutput
())
if
(
type
.
getQualifier
().
isPipeOutput
())
...
@@ -2727,8 +2727,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -2727,8 +2727,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case
glslang
:
:
EOpRayQueryConfirmIntersection
:
case
glslang
:
:
EOpRayQueryConfirmIntersection
:
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addExtension
(
"SPV_KHR_variable_pointers"
);
builder
.
addCapability
(
spv
::
CapabilityVariablePointers
);
noReturnValue
=
true
;
noReturnValue
=
true
;
break
;
break
;
case
glslang
:
:
EOpRayQueryProceed
:
case
glslang
:
:
EOpRayQueryProceed
:
...
@@ -2752,8 +2750,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -2752,8 +2750,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
case
glslang
:
:
EOpRayQueryGetIntersectionWorldToObject
:
case
glslang
:
:
EOpRayQueryGetIntersectionWorldToObject
:
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addExtension
(
"SPV_KHR_ray_query"
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addCapability
(
spv
::
CapabilityRayQueryProvisionalKHR
);
builder
.
addExtension
(
"SPV_KHR_variable_pointers"
);
builder
.
addCapability
(
spv
::
CapabilityVariablePointers
);
break
;
break
;
case
glslang
:
:
EOpCooperativeMatrixLoad
:
case
glslang
:
:
EOpCooperativeMatrixLoad
:
case
glslang
:
:
EOpCooperativeMatrixStore
:
case
glslang
:
:
EOpCooperativeMatrixStore
:
...
...
Test/baseResults/rayQuery-allOps.comp.out
View file @
054b5e35
...
@@ -4,10 +4,8 @@ rayQuery-allOps.comp
...
@@ -4,10 +4,8 @@ rayQuery-allOps.comp
// Id's are bound by 257
// Id's are bound by 257
Capability Shader
Capability Shader
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
EntryPoint GLCompute 4 "main"
...
@@ -88,8 +86,7 @@ rayQuery-allOps.comp
...
@@ -88,8 +86,7 @@ rayQuery-allOps.comp
37: 18(int) Constant 3
37: 18(int) Constant 3
38: 8(float) Constant 1176255488
38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR
45: TypeRayQueryProvisionalKHR
46: TypePointer Workgroup 45
46: TypePointer Function 45
47(rayQuery): 46(ptr) Variable Workgroup
48: TypeAccelerationStructureKHR
48: TypeAccelerationStructureKHR
49: TypePointer UniformConstant 48
49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant
50(rtas): 49(ptr) Variable UniformConstant
...
@@ -115,6 +112,7 @@ rayQuery-allOps.comp
...
@@ -115,6 +112,7 @@ rayQuery-allOps.comp
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
43(ray): 25(ptr) Variable Function
43(ray): 25(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
...
...
Test/baseResults/rayQuery-allOps.frag.out
View file @
054b5e35
...
@@ -4,10 +4,8 @@ rayQuery-allOps.frag
...
@@ -4,10 +4,8 @@ rayQuery-allOps.frag
// Id's are bound by 257
// Id's are bound by 257
Capability Shader
Capability Shader
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
EntryPoint Fragment 4 "main"
...
@@ -88,8 +86,7 @@ rayQuery-allOps.frag
...
@@ -88,8 +86,7 @@ rayQuery-allOps.frag
37: 18(int) Constant 3
37: 18(int) Constant 3
38: 8(float) Constant 1176255488
38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR
45: TypeRayQueryProvisionalKHR
46: TypePointer Workgroup 45
46: TypePointer Function 45
47(rayQuery): 46(ptr) Variable Workgroup
48: TypeAccelerationStructureKHR
48: TypeAccelerationStructureKHR
49: TypePointer UniformConstant 48
49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant
50(rtas): 49(ptr) Variable UniformConstant
...
@@ -115,6 +112,7 @@ rayQuery-allOps.frag
...
@@ -115,6 +112,7 @@ rayQuery-allOps.frag
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
43(ray): 25(ptr) Variable Function
43(ray): 25(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
...
...
Test/baseResults/rayQuery-allOps.rgen.out
View file @
054b5e35
...
@@ -3,11 +3,9 @@ rayQuery-allOps.rgen
...
@@ -3,11 +3,9 @@ rayQuery-allOps.rgen
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 257
// Id's are bound by 257
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -88,8 +86,7 @@ rayQuery-allOps.rgen
...
@@ -88,8 +86,7 @@ rayQuery-allOps.rgen
37: 18(int) Constant 3
37: 18(int) Constant 3
38: 8(float) Constant 1176255488
38: 8(float) Constant 1176255488
45: TypeRayQueryProvisionalKHR
45: TypeRayQueryProvisionalKHR
46: TypePointer Workgroup 45
46: TypePointer Function 45
47(rayQuery): 46(ptr) Variable Workgroup
48: TypeAccelerationStructureKHR
48: TypeAccelerationStructureKHR
49: TypePointer UniformConstant 48
49: TypePointer UniformConstant 48
50(rtas): 49(ptr) Variable UniformConstant
50(rtas): 49(ptr) Variable UniformConstant
...
@@ -115,6 +112,7 @@ rayQuery-allOps.rgen
...
@@ -115,6 +112,7 @@ rayQuery-allOps.rgen
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
43(ray): 25(ptr) Variable Function
43(ray): 25(ptr) Variable Function
47(rayQuery): 46(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function
69(candidateType): 68(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
78(_mat4x3): 77(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
83(_mat3x4): 82(ptr) Variable Function
...
...
Test/baseResults/rayQuery-array-2d-dynamic.rgen.out
deleted
100644 → 0
View file @
b366a703
This diff is collapsed.
Click to expand it.
Test/baseResults/rayQuery-decls.rgen.out
View file @
054b5e35
...
@@ -3,11 +3,9 @@ rayQuery-decls.rgen
...
@@ -3,11 +3,9 @@ rayQuery-decls.rgen
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 130
// Id's are bound by 130
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -92,29 +90,29 @@ rayQuery-decls.rgen
...
@@ -92,29 +90,29 @@ rayQuery-decls.rgen
69: TypeRayQueryProvisionalKHR
69: TypeRayQueryProvisionalKHR
70: 6(int) Constant 4
70: 6(int) Constant 4
71: TypeArray 69 70
71: TypeArray 69 70
72: TypePointer Workgroup 71
72: TypePointer Function 71
73(g_rayQueryArray): 72(ptr) Variable Workgroup
74(block): TypeStruct 6(int)
74(block): TypeStruct 6(int)
75: TypePointer ShaderRecordBufferKHR 74(block)
75: TypePointer ShaderRecordBufferKHR 74(block)
76: 75(ptr) Variable ShaderRecordBufferKHR
76: 75(ptr) Variable ShaderRecordBufferKHR
77: TypePointer ShaderRecordBufferKHR 6(int)
77: TypePointer ShaderRecordBufferKHR 6(int)
80: TypePointer Workgroup 69
80: TypePointer Function 69
81(rayQuery0b): 80(ptr) Variable Workgroup
86(rayQuery0a): 80(ptr) Variable Workgroup
89(rayQuery0c): 80(ptr) Variable Workgroup
94: TypeAccelerationStructureKHR
94: TypeAccelerationStructureKHR
95: TypePointer UniformConstant 94
95: TypePointer UniformConstant 94
96(rtas): 95(ptr) Variable UniformConstant
96(rtas): 95(ptr) Variable UniformConstant
98: 6(int) Constant 16
98: 6(int) Constant 16
107(rayQuery1c): 80(ptr) Variable Workgroup
109: 6(int) Constant 32
109: 6(int) Constant 32
119: 6(int) Constant 3
119: 6(int) Constant 3
120: 6(int) Constant 64
120: 6(int) Constant 64
129(g_rayQueryUnused): 80(ptr) Variable Workgroup
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
38(index): 37(ptr) Variable Function
38(index): 37(ptr) Variable Function
44(ray): 43(ptr) Variable Function
44(ray): 43(ptr) Variable Function
73(g_rayQueryArray): 72(ptr) Variable Function
81(rayQuery0b): 80(ptr) Variable Function
86(rayQuery0a): 80(ptr) Variable Function
89(rayQuery0c): 80(ptr) Variable Function
107(rayQuery1c): 80(ptr) Variable Function
129(g_rayQueryUnused): 80(ptr) Variable Function
39: 6(int) FunctionCall 8(launchIndex()
39: 6(int) FunctionCall 8(launchIndex()
Store 38(index) 39
Store 38(index) 39
52: 6(int) Load 38(index)
52: 6(int) Load 38(index)
...
...
Test/baseResults/rayQuery-initialize.rgen.out
View file @
054b5e35
...
@@ -3,11 +3,9 @@ rayQuery-initialize.rgen
...
@@ -3,11 +3,9 @@ rayQuery-initialize.rgen
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 103
// Id's are bound by 103
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -58,7 +56,7 @@ rayQuery-initialize.rgen
...
@@ -58,7 +56,7 @@ rayQuery-initialize.rgen
6: TypeInt 32 0
6: TypeInt 32 0
7: TypeFunction 6(int)
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
10: TypeRayQueryProvisionalKHR
11: TypePointer
Workgroup
10
11: TypePointer
Function
10
12: TypeFloat 32
12: TypeFloat 32
13: TypeVector 12(float) 3
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...
@@ -90,12 +88,12 @@ rayQuery-initialize.rgen
...
@@ -90,12 +88,12 @@ rayQuery-initialize.rgen
75: TypePointer Uniform 74(Rays)
75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
78: TypePointer Uniform 72(Ray)
89(rayQuery): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
94: 6(int) Constant 32
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
69(index): 68(ptr) Variable Function
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
71(ray): 15(ptr) Variable Function
89(rayQuery): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function
90(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
Store 69(index) 70
...
...
Test/baseResults/rayQuery-no-cse.rgen.out
View file @
054b5e35
...
@@ -3,11 +3,9 @@ rayQuery-no-cse.rgen
...
@@ -3,11 +3,9 @@ rayQuery-no-cse.rgen
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 107
// Id's are bound by 107
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -60,7 +58,7 @@ rayQuery-no-cse.rgen
...
@@ -60,7 +58,7 @@ rayQuery-no-cse.rgen
6: TypeInt 32 0
6: TypeInt 32 0
7: TypeFunction 6(int)
7: TypeFunction 6(int)
10: TypeRayQueryProvisionalKHR
10: TypeRayQueryProvisionalKHR
11: TypePointer
Workgroup
10
11: TypePointer
Function
10
12: TypeFloat 32
12: TypeFloat 32
13: TypeVector 12(float) 3
13: TypeVector 12(float) 3
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
14(Ray): TypeStruct 13(fvec3) 12(float) 13(fvec3) 12(float)
...
@@ -92,14 +90,14 @@ rayQuery-no-cse.rgen
...
@@ -92,14 +90,14 @@ rayQuery-no-cse.rgen
75: TypePointer Uniform 74(Rays)
75: TypePointer Uniform 74(Rays)
76: 75(ptr) Variable Uniform
76: 75(ptr) Variable Uniform
78: TypePointer Uniform 72(Ray)
78: TypePointer Uniform 72(Ray)
89(rayQuery1): 11(ptr) Variable Workgroup
94: 6(int) Constant 32
94: 6(int) Constant 32
103(rayQuery2): 11(ptr) Variable Workgroup
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
69(index): 68(ptr) Variable Function
69(index): 68(ptr) Variable Function
71(ray): 15(ptr) Variable Function
71(ray): 15(ptr) Variable Function
89(rayQuery1): 11(ptr) Variable Function
90(param): 15(ptr) Variable Function
90(param): 15(ptr) Variable Function
103(rayQuery2): 11(ptr) Variable Function
104(param): 15(ptr) Variable Function
104(param): 15(ptr) Variable Function
70: 6(int) FunctionCall 8(launchIndex()
70: 6(int) FunctionCall 8(launchIndex()
Store 69(index) 70
Store 69(index) 70
...
...
Test/baseResults/rayQuery.rgen.out
View file @
054b5e35
...
@@ -3,11 +3,9 @@ rayQuery.rgen
...
@@ -3,11 +3,9 @@ rayQuery.rgen
// Generated by (magic number): 80008
// Generated by (magic number): 80008
// Id's are bound by 44
// Id's are bound by 44
Capability VariablePointers
Capability RayQueryProvisionalKHR
Capability RayQueryProvisionalKHR
Capability RayTracingNV
Capability RayTracingNV
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_ray_query"
Extension "SPV_KHR_variable_pointers"
Extension "SPV_NV_ray_tracing"
Extension "SPV_NV_ray_tracing"
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
...
@@ -40,8 +38,7 @@ rayQuery.rgen
...
@@ -40,8 +38,7 @@ rayQuery.rgen
13: 10(float) Constant 0
13: 10(float) Constant 0
15: 10(float) Constant 1148846080
15: 10(float) Constant 1148846080
16: TypeRayQueryProvisionalKHR
16: TypeRayQueryProvisionalKHR
17: TypePointer Workgroup 16
17: TypePointer Function 16
18(localRayQuery): 17(ptr) Variable Workgroup
19: TypeAccelerationStructureKHR
19: TypeAccelerationStructureKHR
20: TypePointer UniformConstant 19
20: TypePointer UniformConstant 19
21(accNV0): 20(ptr) Variable UniformConstant
21(accNV0): 20(ptr) Variable UniformConstant
...
@@ -60,6 +57,7 @@ rayQuery.rgen
...
@@ -60,6 +57,7 @@ rayQuery.rgen
8(rayFlags): 7(ptr) Variable Function
8(rayFlags): 7(ptr) Variable Function
12(tMin): 11(ptr) Variable Function
12(tMin): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function
14(tMax): 11(ptr) Variable Function
18(localRayQuery): 17(ptr) Variable Function
Store 8(rayFlags) 9
Store 8(rayFlags) 9
Store 12(tMin) 13
Store 12(tMin) 13
Store 14(tMax) 15
Store 14(tMax) 15
...
...
Test/rayQuery-array-2d-dynamic.rgen
deleted
100644 → 0
View file @
b366a703
#version 460
#extension GL_NV_ray_tracing : enable
#extension GL_EXT_ray_query : enable
struct Ray
{
vec3 pos;
float tmin;
vec3 dir;
float tmax;
};
layout(binding = 0, set = 0) uniform accelerationStructureNV rtas;
layout(std430, set = 0, binding = 2) buffer Rays { Ray rays[]; };
uint launchIndex()
{
return gl_LaunchIDNV.z*gl_LaunchSizeNV.x*gl_LaunchSizeNV.y + gl_LaunchIDNV.y*gl_LaunchSizeNV.x + gl_LaunchIDNV.x;
}
void doInitialize(rayQueryEXT rayQuery, Ray ray)
{
rayQueryInitializeEXT(rayQuery, rtas, gl_RayFlagsNoneEXT, gl_RayFlagsCullBackFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
}
int C;
void main()
{
uint index = launchIndex();
Ray ray = rays[index];
rayQueryEXT rayQuery[2];
doInitialize(rayQuery[0], rays[index]);
rayQueryInitializeEXT(rayQuery[1], rtas, gl_RayFlagsOpaqueEXT, gl_RayFlagsCullFrontFacingTrianglesEXT, ray.pos, ray.tmin, ray.dir, ray.tmax);
doInitialize(rayQuery[C], ray);
}
gtests/Spv.FromFile.cpp
View file @
054b5e35
...
@@ -231,7 +231,6 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -231,7 +231,6 @@ INSTANTIATE_TEST_CASE_P(
"spv.while-simple.vert"
,
"spv.while-simple.vert"
,
// vulkan-specific tests
// vulkan-specific tests
"rayQuery.rgen"
,
"rayQuery.rgen"
,
"rayQuery-array-2d-dynamic.rgen"
,
"rayQuery-decls.rgen"
,
"rayQuery-decls.rgen"
,
"rayQuery-no-cse.rgen"
,
"rayQuery-no-cse.rgen"
,
"rayQuery-initialize.rgen"
,
"rayQuery-initialize.rgen"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment