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
5513d9d0
Commit
5513d9d0
authored
Jul 03, 2017
by
David Srbecky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Multiview extension: Accept layout(num_views) qualifier
parent
99466020
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
10 deletions
+34
-10
300.vert
Test/300.vert
+5
-0
300.vert.out
Test/baseResults/300.vert.out
+16
-10
spv.OVR_multiview.vert
Test/spv.OVR_multiview.vert
+2
-0
Types.h
glslang/Include/Types.h
+4
-0
ParseHelper.cpp
glslang/MachineIndependent/ParseHelper.cpp
+7
-0
No files found.
Test/300.vert
View file @
5513d9d0
...
...
@@ -186,6 +186,8 @@ void fooDeeparray()
yp
=
x
;
// ERROR, wrong size
}
layout
(
num_views
=
2
)
in
;
// ERROR, no extension
void
mwErr
()
{
gl_ViewID_OVR
;
// ERROR, no extension
...
...
@@ -193,6 +195,9 @@ void mwErr()
#extension GL_OVR_multiview : enable
layout
(
num_views
=
2
)
uniform
float
mwUniform
;
// ERROR, must be global
layout
(
num_views
=
2
)
in
;
// OK
void
mwOk
()
{
gl_ViewID_OVR
;
...
...
Test/baseResults/300.vert.out
View file @
5513d9d0
...
...
@@ -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: 0:1
91: 'gl_ViewID_OVR
' : required extension not requested: Possible extensions include:
ERROR: 0:1
89: 'num_views
' : required extension not requested: Possible extensions include:
GL_OVR_multiview
GL_OVR_multiview2
ERROR: 45 compilation errors. No code generated.
ERROR: 0:193: 'gl_ViewID_OVR' : required extension not requested: Possible extensions include:
GL_OVR_multiview
GL_OVR_multiview2
ERROR: 0:198: 'num_views' : can only apply to a standalone qualifier
ERROR: 47 compilation errors. No code generated.
Shader version: 300
...
...
@@ -293,14 +297,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:1
89
Function Definition: mwErr( ( global void)
0:1
89
Function Parameters:
0:19
1
Sequence
0:19
1
'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:1
91
Function Definition: mwErr( ( global void)
0:1
91
Function Parameters:
0:19
3
Sequence
0:19
3
'gl_ViewID_OVR' ( in highp uint ViewIndex)
0:
201
Function Definition: mwOk( ( global void)
0:
201
Function Parameters:
0:
203
Sequence
0:
203
'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)
...
...
@@ -335,6 +339,7 @@ ERROR: node is still EOpNull!
0:? 'Binst' (layout( column_major shared) uniform block{layout( column_major shared) uniform highp int a})
0:? 'Bfoo' ( global highp int)
0:? 'B430i' (layout( column_major std430) uniform block{layout( column_major std430 offset=0) uniform highp int a})
0:? 'mwUniform' ( uniform highp float)
0:? 'gl_VertexID' ( gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
...
...
@@ -494,6 +499,7 @@ ERROR: node is still EOpNull!
0:? 'Binst' (layout( column_major shared) uniform block{layout( column_major shared) uniform highp int a})
0:? 'Bfoo' ( global highp int)
0:? 'B430i' (layout( column_major std430) uniform block{layout( column_major std430 offset=0) uniform highp int a})
0:? 'mwUniform' ( uniform highp float)
0:? 'gl_VertexID' ( gl_VertexId highp int VertexId)
0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId)
Test/spv.OVR_multiview.vert
View file @
5513d9d0
...
...
@@ -2,6 +2,8 @@
#extension GL_OVR_multiview : enable
layout
(
num_views
=
2
)
in
;
void
main
()
{
gl_Position
=
vec4
(
gl_ViewID_OVR
,
0
,
0
,
0
);
}
glslang/Include/Types.h
View file @
5513d9d0
...
...
@@ -970,6 +970,7 @@ struct TShaderQualifiers {
bool
earlyFragmentTests
;
// fragment input
TLayoutDepth
layoutDepth
;
bool
blendEquation
;
// true if any blend equation was specified
int
numViews
;
// multiview extenstions
#ifdef NV_EXTENSIONS
bool
layoutOverrideCoverage
;
// true if layout override_coverage set
...
...
@@ -994,6 +995,7 @@ struct TShaderQualifiers {
earlyFragmentTests
=
false
;
layoutDepth
=
EldNone
;
blendEquation
=
false
;
numViews
=
TQualifier
::
layoutNotSet
;
#ifdef NV_EXTENSIONS
layoutOverrideCoverage
=
false
;
#endif
...
...
@@ -1033,6 +1035,8 @@ struct TShaderQualifiers {
layoutDepth
=
src
.
layoutDepth
;
if
(
src
.
blendEquation
)
blendEquation
=
src
.
blendEquation
;
if
(
src
.
numViews
!=
TQualifier
::
layoutNotSet
)
numViews
=
src
.
numViews
;
#ifdef NV_EXTENSIONS
if
(
src
.
layoutOverrideCoverage
)
layoutOverrideCoverage
=
src
.
layoutOverrideCoverage
;
...
...
glslang/MachineIndependent/ParseHelper.cpp
View file @
5513d9d0
...
...
@@ -4206,6 +4206,11 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
}
return
;
}
if
(
id
==
"num_views"
)
{
requireExtensions
(
loc
,
Num_OVR_multiview_EXTs
,
OVR_multiview_EXTs
,
"num_views"
);
publicType
.
shaderQualifiers
.
numViews
=
value
;
return
;
}
#if NV_EXTENSIONS
if
(
language
==
EShLangVertex
||
...
...
@@ -4804,6 +4809,8 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua
}
if
(
shaderQualifiers
.
blendEquation
)
error
(
loc
,
message
,
"blend equation"
,
""
);
if
(
shaderQualifiers
.
numViews
!=
TQualifier
::
layoutNotSet
)
error
(
loc
,
message
,
"num_views"
,
""
);
}
// Correct and/or advance an object's offset layout qualifier.
...
...
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