Implement extensions GL_OVR_multiview and GL_OVR_multiview2

They are almost identical to the already supported GL_EXT_multiview
This commit is contained in:
David Srbecký
2017-06-30 18:33:51 +01:00
parent 2ae23ca1ca
commit 0fbe02c6a0
9 changed files with 135 additions and 6 deletions

View File

@@ -43,10 +43,14 @@ ERROR: 0:172: 'std430' : requires the 'buffer' storage qualifier
ERROR: 0:175: '' : array size required
ERROR: 0:185: 'assign' : cannot convert from ' temp 4-element array of highp float' to ' temp 3-element array of highp float'
ERROR: 0:186: 'assign' : cannot convert from ' temp 3-element array of highp float' to ' temp 4-element array of highp float'
ERROR: 44 compilation errors. No code generated.
ERROR: 0:191: 'gl_ViewID_OVR' : required extension not requested: Possible extensions include:
GL_OVR_multiview
GL_OVR_multiview2
ERROR: 45 compilation errors. No code generated.
Shader version: 300
Requested GL_OVR_multiview
ERROR: node is still EOpNull!
0:27 Function Definition: main( ( global void)
0:27 Function Parameters:
@@ -289,6 +293,14 @@ ERROR: node is still EOpNull!
0:184 'y' ( temp 4-element array of highp float)
0:185 'xp' ( temp 3-element array of highp float)
0:186 'yp' ( temp 4-element array of highp float)
0:189 Function Definition: mwErr( ( global void)
0:189 Function Parameters:
0:191 Sequence
0:191 'gl_ViewID_OVR' ( in highp uint ViewIndex)
0:196 Function Definition: mwOk( ( global void)
0:196 Function Parameters:
0:198 Sequence
0:198 'gl_ViewID_OVR' ( in highp uint ViewIndex)
0:? Linker Objects
0:? 'm43' ( uniform highp 4X3 matrix of float)
0:? 'm33' ( uniform highp 3X3 matrix of float)
@@ -331,6 +343,7 @@ Linked vertex stage:
Shader version: 300
Requested GL_OVR_multiview
ERROR: node is still EOpNull!
0:27 Function Definition: main( ( global void)
0:27 Function Parameters:

View File

@@ -0,0 +1,57 @@
spv.OVR_multiview.vert
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 27
Capability Shader
Capability MultiView
Extension "SPV_KHR_multiview"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 13 17 25 26
Source GLSL 330
SourceExtension "GL_OVR_multiview"
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"
Name 13 ""
Name 17 "gl_ViewID_OVR"
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
Decorate 11(gl_PerVertex) Block
Decorate 17(gl_ViewID_OVR) BuiltIn ViewIndex
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
12: TypePointer Output 11(gl_PerVertex)
13: 12(ptr) Variable Output
14: TypeInt 32 1
15: 14(int) Constant 0
16: TypePointer Input 8(int)
17(gl_ViewID_OVR): 16(ptr) Variable Input
20: 6(float) Constant 0
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
18: 8(int) Load 17(gl_ViewID_OVR)
19: 6(float) ConvertUToF 18
21: 7(fvec4) CompositeConstruct 19 20 20 20
23: 22(ptr) AccessChain 13 15
Store 23 21
Return
FunctionEnd

View File

@@ -11,7 +11,7 @@ spv.specConstant.vert
Source GLSL 400
Name 4 "main"
Name 9 "arraySize"
Name 14 "foo(vf4[s1521];"
Name 14 "foo(vf4[s1522];"
Name 13 "p"
Name 17 "builtin_spec_constant("
Name 20 "color"
@@ -102,10 +102,10 @@ spv.specConstant.vert
Store 20(color) 46
48: 10 Load 22(ucol)
Store 47(param) 48
49: 2 FunctionCall 14(foo(vf4[s1521];) 47(param)
49: 2 FunctionCall 14(foo(vf4[s1522];) 47(param)
Return
FunctionEnd
14(foo(vf4[s1521];): 2 Function None 12
14(foo(vf4[s1522];): 2 Function None 12
13(p): 11(ptr) FunctionParameter
15: Label
54: 24(ptr) AccessChain 53(dupUcol) 23