Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
spv.intrinsicsSpirvInstructionString.error.vert
ERROR: 0:9: 'userFunc' : 'spirv_string' can only be used as a parameter of a function defined with 'spirv_instruction' for argument 1
ERROR: 0:12: 'makeString' : 'spirv_string' cannot be used as a function return type
ERROR: 0:15: 'outParam' : 'spirv_string' parameter cannot have a qualifier other than 'in' for argument 1
ERROR: 0:18: 'arrParam' : 'spirv_string' cannot be formed into an array for argument 1
ERROR: 0:21: 'byRefParam' : 'spirv_string' parameter cannot have a qualifier other than 'in' for argument 1
ERROR: 0:31: 'spirv_string' : a literal string cannot be matched to a 'spirv_by_reference' or 'spirv_literal' variadic tail
ERROR: 0:34: 'spirv_string' : a literal string cannot be matched to a 'spirv_by_reference' or 'spirv_literal' variadic tail
ERROR: 0:37: 'string' : embedded NUL character not allowed in string literal
ERROR: 8 compilation errors. No code generated.


SPIR-V is not generated for failed compile or link
35 changes: 35 additions & 0 deletions Test/baseResults/spv.intrinsicsSpirvInstructionString.vert.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
spv.intrinsicsSpirvInstructionString.vert
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 20

Capability Shader
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "GLSL.std.450"
7: ExtInstImport "NonSemantic.EXAMPLE.DebugMarker"
15: ExtInstImport "Fictional.TestExtInstSet"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
6: String "begin"
10: String "end"
12: String ""
14: String "named"
Source GLSL 460
SourceExtension "GL_EXT_spirv_intrinsics"
SourceExtension "GL_EXT_spirv_intrinsics_string"
Name 4 "main"
2: TypeVoid
3: TypeFunction 2
17: TypeInt 32 1
18: 17(int) Constant 42
4(main): 2 Function None 3
5: Label
8: 2 ExtInst 7(NonSemantic.EXAMPLE.DebugMarker) 1(Round) 6
9: 2 ExtInst 7(NonSemantic.EXAMPLE.DebugMarker) 1(Round) 6
11: 2 ExtInst 7(NonSemantic.EXAMPLE.DebugMarker) 1(Round) 10
13: 2 ExtInst 7(NonSemantic.EXAMPLE.DebugMarker) 1(Round) 12
16: 2 ExtInst 15(Fictional.TestExtInstSet) 2(RoundEven) 14
19: 2 ExtInst 15(Fictional.TestExtInstSet) 3(Trunc) 18
Return
FunctionEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
spv.intrinsicsSpirvInstructionStringVariadic.vert
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 27

Capability Shader
Extension "SPV_KHR_non_semantic_info"
1: ExtInstImport "GLSL.std.450"
15: ExtInstImport "NonSemantic.DebugPrintf"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
14: String "no arguments
"
17: String "x = %f
"
20: String "x = %f, n = %d
"
24: String "tail string = %s
"
25: String "ok"
Source GLSL 460
SourceExtension "GL_EXT_spirv_intrinsics"
SourceExtension "GL_EXT_spirv_intrinsics_string"
SourceExtension "GL_EXT_spirv_intrinsics_variadic"
Name 4 "main"
Name 8 "x"
Name 12 "n"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Function 6(float)
9: 6(float) Constant 1065353216
10: TypeInt 32 1
11: TypePointer Function 10(int)
13: 10(int) Constant 3
4(main): 2 Function None 3
5: Label
8(x): 7(ptr) Variable Function
12(n): 11(ptr) Variable Function
Store 8(x) 9
Store 12(n) 13
16: 2 ExtInst 15(NonSemantic.DebugPrintf) 1(DebugPrintf) 14
18: 6(float) Load 8(x)
19: 2 ExtInst 15(NonSemantic.DebugPrintf) 1(DebugPrintf) 17 18
21: 6(float) Load 8(x)
22: 10(int) Load 12(n)
23: 2 ExtInst 15(NonSemantic.DebugPrintf) 1(DebugPrintf) 20 21 22
26: 2 ExtInst 15(NonSemantic.DebugPrintf) 1(DebugPrintf) 24 25
Return
FunctionEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spv.intrinsicsSpirvInstructionVariadic.error.vert
ERROR: 0:10: 'userFunc' : variadic '...' can only be used on functions defined with 'spirv_instruction'
ERROR: 0:19: 'requal' : overloaded functions must have the same qualifier on the variadic tail
ERROR: 0:29: 'spirv_literal' : Non front-end constant expressions cannot be passed for a 'spirv_literal' variadic argument.
ERROR: 0:35: 'amb' : ambiguous best function under implicit type conversion
ERROR: 0:38: 'literal string as a variadic SPIR-V instruction argument' : required extension not requested: GL_EXT_spirv_intrinsics_string
ERROR: 5 compilation errors. No code generated.


SPIR-V is not generated for failed compile or link
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
spv.intrinsicsSpirvInstructionVariadic.syntaxBadTail.vert
ERROR: 0:6: '' : syntax error, unexpected COMMA, expecting RIGHT_PAREN
ERROR: 1 compilation errors. No code generated.


ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point

SPIR-V is not generated for failed compile or link
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
spv.intrinsicsSpirvInstructionVariadic.syntaxSpacedDots.vert
ERROR: 0:7: '' : syntax error, unexpected DOT
ERROR: 1 compilation errors. No code generated.


ERROR: Linking vertex stage: Missing entry point: Each stage requires one entry point

SPIR-V is not generated for failed compile or link
60 changes: 60 additions & 0 deletions Test/baseResults/spv.intrinsicsSpirvInstructionVariadic.vert.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
spv.intrinsicsSpirvInstructionVariadic.vert
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 33

Capability Shader
1: ExtInstImport "GLSL.std.450"
22: ExtInstImport "Fictional.TestExtInstSet"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 8 11
Source GLSL 460
SourceExtension "GL_EXT_spirv_intrinsics"
SourceExtension "GL_EXT_spirv_intrinsics_variadic"
Name 4 "main"
Name 8 "floatOut"
Name 11 "vec4In"
Name 16 "base"
Name 18 "arg"
Name 27 "p"
Name 29 "q"
Decorate 8(floatOut) Location 0
Decorate 11(vec4In) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Output 6(float)
8(floatOut): 7(ptr) Variable Output
9: TypeVector 6(float) 4
10: TypePointer Input 9(fvec4)
11(vec4In): 10(ptr) Variable Input
14: TypeInt 32 0
15: TypePointer Function 14(int)
17: 14(int) Constant 1
19: 14(int) Constant 7
26: TypePointer Function 6(float)
28: 6(float) Constant 1065353216
30: 6(float) Constant 1073741824
4(main): 2 Function None 3
5: Label
16(base): 15(ptr) Variable Function
18(arg): 15(ptr) Variable Function
27(p): 26(ptr) Variable Function
29(q): 26(ptr) Variable Function
12: 9(fvec4) Load 11(vec4In)
13: 6(float) CompositeExtract 12 2
Store 8(floatOut) 13
Store 16(base) 17
Store 18(arg) 19
20: 14(int) Load 16(base)
21: 14(int) Load 18(arg)
23: 2 ExtInst 22(Fictional.TestExtInstSet) 1(Round) 20 21
24: 14(int) Load 16(base)
25: 2 ExtInst 22(Fictional.TestExtInstSet) 1(Round) 24
Store 27(p) 28
Store 29(q) 30
31: 2 ExtInst 22(Fictional.TestExtInstSet) 2(RoundEven) 27(p) 29(q)
32: 2 ExtInst 22(Fictional.TestExtInstSet) 2(RoundEven) 27(p)
Return
FunctionEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
spv.intrinsicsSpirvInstructionVariadic330.vert
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 60

Capability Shader
1: ExtInstImport "GLSL.std.450"
22: ExtInstImport "Fictional.TestExtInstSet"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 8 11
Source GLSL 330
SourceExtension "GL_EXT_spirv_intrinsics"
SourceExtension "GL_EXT_spirv_intrinsics_variadic"
Name 4 "main"
Name 8 "floatOut"
Name 11 "vec4In"
Name 16 "base"
Name 18 "arg"
Name 27 "p"
Name 29 "q"
Name 35 "i"
Name 37 "f"
Decorate 8(floatOut) Location 0
Decorate 11(vec4In) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Output 6(float)
8(floatOut): 7(ptr) Variable Output
9: TypeVector 6(float) 4
10: TypePointer Input 9(fvec4)
11(vec4In): 10(ptr) Variable Input
14: TypeInt 32 0
15: TypePointer Function 14(int)
17: 14(int) Constant 1
19: 14(int) Constant 7
26: TypePointer Function 6(float)
28: 6(float) Constant 1065353216
30: 6(float) Constant 1073741824
33: TypeInt 32 1
34: TypePointer Function 33(int)
36: 33(int) Constant 1
4(main): 2 Function None 3
5: Label
16(base): 15(ptr) Variable Function
18(arg): 15(ptr) Variable Function
27(p): 26(ptr) Variable Function
29(q): 26(ptr) Variable Function
35(i): 34(ptr) Variable Function
37(f): 26(ptr) Variable Function
12: 9(fvec4) Load 11(vec4In)
13: 6(float) CompositeExtract 12 2
Store 8(floatOut) 13
Store 16(base) 17
Store 18(arg) 19
20: 14(int) Load 16(base)
21: 14(int) Load 18(arg)
23: 2 ExtInst 22(Fictional.TestExtInstSet) 1(Round) 20 21
24: 14(int) Load 16(base)
25: 2 ExtInst 22(Fictional.TestExtInstSet) 1(Round) 24
Store 27(p) 28
Store 29(q) 30
31: 2 ExtInst 22(Fictional.TestExtInstSet) 2(RoundEven) 27(p) 29(q)
32: 2 ExtInst 22(Fictional.TestExtInstSet) 2(RoundEven) 27(p)
Store 35(i) 36
Store 37(f) 28
38: 33(int) Load 35(i)
39: 2 ExtInst 22(Fictional.TestExtInstSet) 10(Fract) 38
40: 6(float) Load 37(f)
41: 2 ExtInst 22(Fictional.TestExtInstSet) 20(Cosh) 40
42: 33(int) Load 35(i)
43: 33(int) Load 35(i)
44: 33(int) Load 35(i)
45: 2 ExtInst 22(Fictional.TestExtInstSet) 10(Fract) 42 43 44
46: 33(int) Load 35(i)
47: 2 ExtInst 22(Fictional.TestExtInstSet) 30(Log2) 46
48: 33(int) Load 35(i)
49: 33(int) Load 35(i)
50: 2 ExtInst 22(Fictional.TestExtInstSet) 40(FMax) 48 49
51: 33(int) Load 35(i)
52: 6(float) ConvertSToF 51
53: 33(int) Load 35(i)
54: 2 ExtInst 22(Fictional.TestExtInstSet) 50(Fma) 52 53
55: 33(int) Load 35(i)
56: 6(float) ConvertSToF 55
57: 33(int) Load 35(i)
58: 33(int) Load 35(i)
59: 2 ExtInst 22(Fictional.TestExtInstSet) 60(UnpackSnorm2x16) 56 57 58
Return
FunctionEnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
spv.intrinsicsSpirvInstructionVariadicOverload.vert
Validation failed
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 35

Capability Shader
1: ExtInstImport "GLSL.std.450"
15: ExtInstImport "Fictional.TestExtInstSet"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
Source GLSL 460
SourceExtension "GL_EXT_spirv_intrinsics"
SourceExtension "GL_EXT_spirv_intrinsics_variadic"
Name 4 "main"
Name 8 "i"
Name 12 "f"
Name 25 "u"
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 1
7: TypePointer Function 6(int)
9: 6(int) Constant 1
10: TypeFloat 32
11: TypePointer Function 10(float)
13: 10(float) Constant 1065353216
23: TypeInt 32 0
24: TypePointer Function 23(int)
26: 23(int) Constant 2
4(main): 2 Function None 3
5: Label
8(i): 7(ptr) Variable Function
12(f): 11(ptr) Variable Function
25(u): 24(ptr) Variable Function
Store 8(i) 9
Store 12(f) 13
14: 6(int) Load 8(i)
16: 2 ExtInst 15(Fictional.TestExtInstSet) 10(Fract) 14
17: 10(float) Load 12(f)
18: 2 ExtInst 15(Fictional.TestExtInstSet) 20(Cosh) 17
19: 6(int) Load 8(i)
20: 6(int) Load 8(i)
21: 6(int) Load 8(i)
22: 2 ExtInst 15(Fictional.TestExtInstSet) 10(Fract) 19 20 21
Store 25(u) 26
27: 23(int) Load 25(u)
28: 2 ExtInst 15(Fictional.TestExtInstSet) 30(Log2) 27
29: 6(int) Load 8(i)
30: 23(int) Bitcast 29
31: 2 ExtInst 15(Fictional.TestExtInstSet) 30(Log2) 30
32: 23(int) Load 25(u)
33: 23(int) Load 25(u)
34: 2 ExtInst 15(Fictional.TestExtInstSet) 40(FMax) 32 33
Return
FunctionEnd
4 changes: 4 additions & 0 deletions Test/baseResults/validation_fails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ Test/baseResults/spv.functionNestedOpaque.vert.out
Test/baseResults/spv.imageAtomic64.frag.out
Test/baseResults/spv.image.frag.out
Test/baseResults/spv.int64.frag.out
Test/baseResults/spv.intrinsicsSpirvInstructionString.vert.out
Test/baseResults/spv.intrinsicsSpirvInstructionVariadic330.vert.out
Test/baseResults/spv.intrinsicsSpirvInstructionVariadicOverload.vert.out
Test/baseResults/spv.intrinsicsSpirvInstructionVariadic.vert.out
Test/baseResults/spv.memoryQualifier.frag.out
Test/baseResults/spv.newTexture.frag.out
Test/baseResults/spv.nvgpushader5.frag.out
Expand Down
Loading
Loading