Merge pull request #1728 from alelenv/shaderrecord_fix
Error out writes to shaderRecordNV buffer blocks.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
spv.RayGenShader.rgen
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 61
|
||||
// Id's are bound by 54
|
||||
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
@@ -18,23 +18,22 @@ spv.RayGenShader.rgen
|
||||
Name 21 "gl_LaunchSizeNV"
|
||||
Name 24 "sy"
|
||||
Name 29 "accNV0"
|
||||
Name 48 "block"
|
||||
MemberName 48(block) 0 "arr"
|
||||
MemberName 48(block) 1 "pad"
|
||||
Name 50 ""
|
||||
Name 56 "payload"
|
||||
Name 60 "accNV1"
|
||||
Name 37 "block"
|
||||
MemberName 37(block) 0 "dir"
|
||||
MemberName 37(block) 1 "origin"
|
||||
Name 39 ""
|
||||
Name 50 "accNV1"
|
||||
Name 53 "payload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 29(accNV0) DescriptorSet 0
|
||||
Decorate 29(accNV0) Binding 0
|
||||
Decorate 46 ArrayStride 4
|
||||
MemberDecorate 48(block) 0 Offset 0
|
||||
MemberDecorate 48(block) 1 Offset 16
|
||||
Decorate 48(block) BufferBlock
|
||||
Decorate 56(payload) Location 0
|
||||
Decorate 60(accNV1) DescriptorSet 0
|
||||
Decorate 60(accNV1) Binding 1
|
||||
MemberDecorate 37(block) 0 Offset 0
|
||||
MemberDecorate 37(block) 1 Offset 16
|
||||
Decorate 37(block) BufferBlock
|
||||
Decorate 50(accNV1) DescriptorSet 0
|
||||
Decorate 50(accNV1) Binding 1
|
||||
Decorate 53(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
@@ -51,27 +50,19 @@ spv.RayGenShader.rgen
|
||||
29(accNV0): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37: 35(float) Constant 0
|
||||
38: 36(fvec3) ConstantComposite 37 37 37
|
||||
39: 35(float) Constant 1056964608
|
||||
40: 35(float) Constant 1065353216
|
||||
41: 36(fvec3) ConstantComposite 40 40 40
|
||||
42: 35(float) Constant 1061158912
|
||||
43: TypeInt 32 1
|
||||
44: 43(int) Constant 1
|
||||
45: 6(int) Constant 4
|
||||
46: TypeArray 35(float) 45
|
||||
47: TypeVector 35(float) 4
|
||||
48(block): TypeStruct 46 47(fvec4)
|
||||
49: TypePointer ShaderRecordBufferNV 48(block)
|
||||
50: 49(ptr) Variable ShaderRecordBufferNV
|
||||
51: 43(int) Constant 0
|
||||
52: 43(int) Constant 3
|
||||
53: TypePointer ShaderRecordBufferNV 35(float)
|
||||
55: TypePointer RayPayloadNV 47(fvec4)
|
||||
56(payload): 55(ptr) Variable RayPayloadNV
|
||||
58: TypePointer ShaderRecordBufferNV 47(fvec4)
|
||||
60(accNV1): 28(ptr) Variable UniformConstant
|
||||
37(block): TypeStruct 36(fvec3) 36(fvec3)
|
||||
38: TypePointer ShaderRecordBufferNV 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferNV
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 1
|
||||
42: TypePointer ShaderRecordBufferNV 36(fvec3)
|
||||
45: 35(float) Constant 1056964608
|
||||
46: 40(int) Constant 0
|
||||
49: 35(float) Constant 1061158912
|
||||
50(accNV1): 28(ptr) Variable UniformConstant
|
||||
51: TypeVector 35(float) 4
|
||||
52: TypePointer RayPayloadNV 51(fvec4)
|
||||
53(payload): 52(ptr) Variable RayPayloadNV
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
@@ -95,11 +86,10 @@ spv.RayGenShader.rgen
|
||||
32: 6(int) Load 16(ly)
|
||||
33: 6(int) Load 20(sx)
|
||||
34: 6(int) Load 24(sy)
|
||||
TraceNV 30 31 32 33 34 12 38 39 41 42 44
|
||||
54: 53(ptr) AccessChain 50 51 52
|
||||
Store 54 40
|
||||
57: 47(fvec4) Load 56(payload)
|
||||
59: 58(ptr) AccessChain 50 44
|
||||
Store 59 57
|
||||
43: 42(ptr) AccessChain 39 41
|
||||
44: 36(fvec3) Load 43
|
||||
47: 42(ptr) AccessChain 39 46
|
||||
48: 36(fvec3) Load 47
|
||||
TraceNV 30 31 32 33 34 12 44 45 48 49 41
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
spv.RayGenShader11.rgen
|
||||
// Module Version 10300
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 60
|
||||
// Id's are bound by 53
|
||||
|
||||
Capability RayTracingNV
|
||||
Extension "SPV_NV_ray_tracing"
|
||||
@@ -18,20 +18,19 @@ spv.RayGenShader11.rgen
|
||||
Name 21 "gl_LaunchSizeNV"
|
||||
Name 24 "sy"
|
||||
Name 29 "accNV"
|
||||
Name 48 "block"
|
||||
MemberName 48(block) 0 "arr"
|
||||
MemberName 48(block) 1 "pad"
|
||||
Name 50 ""
|
||||
Name 56 "payload"
|
||||
Name 37 "block"
|
||||
MemberName 37(block) 0 "dir"
|
||||
MemberName 37(block) 1 "origin"
|
||||
Name 39 ""
|
||||
Name 52 "payload"
|
||||
Decorate 11(gl_LaunchIDNV) BuiltIn LaunchIdNV
|
||||
Decorate 21(gl_LaunchSizeNV) BuiltIn LaunchSizeNV
|
||||
Decorate 29(accNV) DescriptorSet 0
|
||||
Decorate 29(accNV) Binding 0
|
||||
Decorate 46 ArrayStride 4
|
||||
MemberDecorate 48(block) 0 Offset 0
|
||||
MemberDecorate 48(block) 1 Offset 16
|
||||
Decorate 48(block) Block
|
||||
Decorate 56(payload) Location 0
|
||||
MemberDecorate 37(block) 0 Offset 0
|
||||
MemberDecorate 37(block) 1 Offset 16
|
||||
Decorate 37(block) Block
|
||||
Decorate 52(payload) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 0
|
||||
@@ -48,26 +47,18 @@ spv.RayGenShader11.rgen
|
||||
29(accNV): 28(ptr) Variable UniformConstant
|
||||
35: TypeFloat 32
|
||||
36: TypeVector 35(float) 3
|
||||
37: 35(float) Constant 0
|
||||
38: 36(fvec3) ConstantComposite 37 37 37
|
||||
39: 35(float) Constant 1056964608
|
||||
40: 35(float) Constant 1065353216
|
||||
41: 36(fvec3) ConstantComposite 40 40 40
|
||||
42: 35(float) Constant 1061158912
|
||||
43: TypeInt 32 1
|
||||
44: 43(int) Constant 1
|
||||
45: 6(int) Constant 4
|
||||
46: TypeArray 35(float) 45
|
||||
47: TypeVector 35(float) 4
|
||||
48(block): TypeStruct 46 47(fvec4)
|
||||
49: TypePointer ShaderRecordBufferNV 48(block)
|
||||
50: 49(ptr) Variable ShaderRecordBufferNV
|
||||
51: 43(int) Constant 0
|
||||
52: 43(int) Constant 3
|
||||
53: TypePointer ShaderRecordBufferNV 35(float)
|
||||
55: TypePointer RayPayloadNV 47(fvec4)
|
||||
56(payload): 55(ptr) Variable RayPayloadNV
|
||||
58: TypePointer ShaderRecordBufferNV 47(fvec4)
|
||||
37(block): TypeStruct 36(fvec3) 36(fvec3)
|
||||
38: TypePointer ShaderRecordBufferNV 37(block)
|
||||
39: 38(ptr) Variable ShaderRecordBufferNV
|
||||
40: TypeInt 32 1
|
||||
41: 40(int) Constant 1
|
||||
42: TypePointer ShaderRecordBufferNV 36(fvec3)
|
||||
45: 35(float) Constant 1056964608
|
||||
46: 40(int) Constant 0
|
||||
49: 35(float) Constant 1061158912
|
||||
50: TypeVector 35(float) 4
|
||||
51: TypePointer RayPayloadNV 50(fvec4)
|
||||
52(payload): 51(ptr) Variable RayPayloadNV
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(lx): 7(ptr) Variable Function
|
||||
@@ -91,11 +82,10 @@ spv.RayGenShader11.rgen
|
||||
32: 6(int) Load 16(ly)
|
||||
33: 6(int) Load 20(sx)
|
||||
34: 6(int) Load 24(sy)
|
||||
TraceNV 30 31 32 33 34 12 38 39 41 42 44
|
||||
54: 53(ptr) AccessChain 50 51 52
|
||||
Store 54 40
|
||||
57: 47(fvec4) Load 56(payload)
|
||||
59: 58(ptr) AccessChain 50 44
|
||||
Store 59 57
|
||||
43: 42(ptr) AccessChain 39 41
|
||||
44: 36(fvec3) Load 43
|
||||
47: 42(ptr) AccessChain 39 46
|
||||
48: 36(fvec3) Load 47
|
||||
TraceNV 30 31 32 33 34 12 44 45 48 49 41
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
@@ -31,7 +31,8 @@ ERROR: 0:36: 'gl_HitKindNV' : undeclared identifier
|
||||
ERROR: 0:37: 'reportIntersectionNV' : no matching overloaded function found
|
||||
ERROR: 0:38: 'ignoreIntersectionNV' : no matching overloaded function found
|
||||
ERROR: 0:39: 'terminateRayNV' : no matching overloaded function found
|
||||
ERROR: 32 compilation errors. No code generated.
|
||||
ERROR: 0:40: 'assign' : l-value required "anon@3" (can't modify a shaderrecordnv qualified buffer)
|
||||
ERROR: 33 compilation errors. No code generated.
|
||||
|
||||
|
||||
ERROR: Linking ray-generation stage: Only one shaderRecordNV buffer block is allowed per stage
|
||||
|
||||
Reference in New Issue
Block a user