SPV: Further refine OpenGL vs. Vulkan differences for SPIR-V.
Includes adding test cases to verify the differences.
This commit is contained in:
11
Test/baseResults/glspv.esversion.vert.out
Executable file
11
Test/baseResults/glspv.esversion.vert.out
Executable file
@@ -0,0 +1,11 @@
|
||||
glspv.esversion.vert
|
||||
ERROR: #version: ES shaders for OpenGL SPIR-V are not supported
|
||||
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
|
||||
ERROR: 1 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
||||
13
Test/baseResults/glspv.frag.out
Executable file
13
Test/baseResults/glspv.frag.out
Executable file
@@ -0,0 +1,13 @@
|
||||
glspv.frag
|
||||
ERROR: 0:4: '#error' : GL_SPIRV is set ( correct , not an error )
|
||||
ERROR: 0:6: '#error' : GL_SPIR is 100
|
||||
ERROR: 0:14: 'input_attachment_index' : only allowed when using GLSL for Vulkan
|
||||
ERROR: 0:14: '' : syntax error
|
||||
ERROR: 4 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
||||
24
Test/baseResults/glspv.version.frag.out
Executable file
24
Test/baseResults/glspv.version.frag.out
Executable file
@@ -0,0 +1,24 @@
|
||||
glspv.version.frag
|
||||
ERROR: #version: compilation for SPIR-V does not support the compatibility profile
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 6
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main"
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source GLSL 330
|
||||
Name 4 "main"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Return
|
||||
FunctionEnd
|
||||
10
Test/baseResults/glspv.version.vert.out
Executable file
10
Test/baseResults/glspv.version.vert.out
Executable file
@@ -0,0 +1,10 @@
|
||||
glspv.version.vert
|
||||
ERROR: #version: Desktop shaders for OpenGL SPIR-V require version 330 or higher
|
||||
ERROR: 1 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
||||
18
Test/baseResults/glspv.vert.out
Executable file
18
Test/baseResults/glspv.vert.out
Executable file
@@ -0,0 +1,18 @@
|
||||
glspv.vert
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
ERROR: 0:3: 'push_constant' : only allowed when using GLSL for Vulkan
|
||||
ERROR: 0:6: 'descriptor set' : only allowed when using GLSL for Vulkan
|
||||
ERROR: 0:8: 'shared' : not allowed when generating SPIR-V
|
||||
ERROR: 0:9: 'packed' : not allowed when generating SPIR-V
|
||||
ERROR: 0:13: 'gl_VertexIndex' : undeclared identifier
|
||||
ERROR: 0:14: 'gl_InstanceIndex' : undeclared identifier
|
||||
ERROR: 0:17: 'gl_DepthRangeParameters' : undeclared identifier
|
||||
ERROR: 0:20: '' : syntax error
|
||||
ERROR: 8 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
||||
@@ -35,7 +35,9 @@ Linked compute stage:
|
||||
Name 70 "arrX"
|
||||
Name 71 "arrY"
|
||||
Name 72 "arrZ"
|
||||
Decorate 20(counter) Offset 0
|
||||
Decorate 20(counter) Binding 0
|
||||
Decorate 27(countArr) Offset 4
|
||||
Decorate 27(countArr) Binding 0
|
||||
MemberDecorate 60(dataSSB) 0 Restrict
|
||||
MemberDecorate 60(dataSSB) 0 Offset 0
|
||||
|
||||
30
Test/baseResults/spv.glFragColor.frag.out
Executable file
30
Test/baseResults/spv.glFragColor.frag.out
Executable file
@@ -0,0 +1,30 @@
|
||||
spv.glFragColor.frag
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 12
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 9
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source GLSL 330
|
||||
Name 4 "main"
|
||||
Name 9 "gl_FragColor"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypePointer Output 7(fvec4)
|
||||
9(gl_FragColor): 8(ptr) Variable Output
|
||||
10: 6(float) Constant 1065353216
|
||||
11: 7(fvec4) ConstantComposite 10 10 10 10
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
Store 9(gl_FragColor) 11
|
||||
Return
|
||||
FunctionEnd
|
||||
61
Test/baseResults/spv.specConst.vert.out
Executable file
61
Test/baseResults/spv.specConst.vert.out
Executable file
@@ -0,0 +1,61 @@
|
||||
spv.specConst.vert
|
||||
Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked vertex stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 27
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 13 25 26
|
||||
Source GLSL 450
|
||||
Name 4 "main"
|
||||
Name 11 "gl_PerVertex"
|
||||
MemberName 11(gl_PerVertex) 0 "gl_Position"
|
||||
MemberName 11(gl_PerVertex) 1 "gl_PointSize"
|
||||
MemberName 11(gl_PerVertex) 2 "gl_ClipDistance"
|
||||
MemberName 11(gl_PerVertex) 3 "gl_CullDistance"
|
||||
Name 13 ""
|
||||
Name 25 "gl_VertexID"
|
||||
Name 26 "gl_InstanceID"
|
||||
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position
|
||||
MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize
|
||||
MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance
|
||||
MemberDecorate 11(gl_PerVertex) 3 BuiltIn CullDistance
|
||||
Decorate 11(gl_PerVertex) Block
|
||||
Decorate 18 SpecId 11
|
||||
Decorate 25(gl_VertexID) BuiltIn VertexId
|
||||
Decorate 26(gl_InstanceID) BuiltIn InstanceId
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypeVector 6(float) 4
|
||||
8: TypeInt 32 0
|
||||
9: 8(int) Constant 1
|
||||
10: TypeArray 6(float) 9
|
||||
11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 10
|
||||
12: TypePointer Output 11(gl_PerVertex)
|
||||
13: 12(ptr) Variable Output
|
||||
14: TypeInt 32 1
|
||||
15: 14(int) Constant 0
|
||||
16: 6(float) Constant 1065353216
|
||||
17: 7(fvec4) ConstantComposite 16 16 16 16
|
||||
18: 14(int) SpecConstant 8
|
||||
22: TypePointer Output 7(fvec4)
|
||||
24: TypePointer Input 14(int)
|
||||
25(gl_VertexID): 24(ptr) Variable Input
|
||||
26(gl_InstanceID): 24(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
19: 6(float) ConvertSToF 18
|
||||
20: 7(fvec4) CompositeConstruct 19 19 19 19
|
||||
21: 7(fvec4) FDiv 17 20
|
||||
23: 22(ptr) AccessChain 13 15
|
||||
Store 23 21
|
||||
Return
|
||||
FunctionEnd
|
||||
Reference in New Issue
Block a user