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
30314590
Commit
30314590
authored
Aug 16, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement GL_OES_primitive_bounding_box.
parent
cee88e36
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
127 additions
and
5 deletions
+127
-5
310.tesc
Test/310.tesc
+14
-0
310.tese
Test/310.tese
+7
-0
310.tesc.out
Test/baseResults/310.tesc.out
+81
-1
310.tese.out
Test/baseResults/310.tese.out
+12
-1
BaseTypes.h
glslang/Include/BaseTypes.h
+2
-0
revision.h
glslang/Include/revision.h
+1
-1
Initialize.cpp
glslang/MachineIndependent/Initialize.cpp
+8
-0
Versions.cpp
glslang/MachineIndependent/Versions.cpp
+2
-2
No files found.
Test/310.tesc
View file @
30314590
...
...
@@ -127,3 +127,17 @@ void pointSize2()
// d = fma(d, d, d);
//}
//
void bbBad()
{
gl_BoundingBoxOES; // ERROR without GL_OES_primitive_bounding_box
}
#extension GL_OES_primitive_bounding_box : enable
void bb()
{
gl_BoundingBoxOES[0] = vec4(0.0);
gl_BoundingBoxOES[1] = vec4(1.0);
gl_BoundingBoxOES[2] = vec4(2.0); // ERROR, overflow
}
Test/310.tese
View file @
30314590
...
...
@@ -119,3 +119,10 @@ void pointSize2()
float ps = gl_in[1].gl_PointSize; // ERROR, not in the redeclaration, but no error on use of gl_PointSize
gl_PointSize = ps;
}
#extension GL_EXT_primitive_bounding_box : enable
void bbbad()
{
gl_BoundingBoxOES; // ERROR, wrong stage
}
Test/baseResults/310.tesc.out
View file @
30314590
...
...
@@ -37,11 +37,16 @@ GL_OES_gpu_shader5
ERROR: 0:104: 'sample' : Reserved word.
ERROR: 0:106: 'vertices' : can only apply to a standalone qualifier
ERROR: 0:107: 'vertices' : inconsistent output number of vertices for array size of misSized
ERROR: 31 compilation errors. No code generated.
ERROR: 0:133: 'gl_BoundingBoxOES' : required extension not requested: Possible extensions include:
GL_EXT_primitive_bounding_box
GL_OES_primitive_bounding_box
ERROR: 0:142: '[' : array index out of range '2'
ERROR: 33 compilation errors. No code generated.
Shader version: 310
Requested GL_ARB_separate_shader_objects
Requested GL_OES_primitive_bounding_box
Requested GL_OES_shader_io_blocks
Requested GL_OES_tessellation_point_size
Requested GL_OES_tessellation_shader
...
...
@@ -216,6 +221,43 @@ ERROR: node is still EOpNull!
0:115 Constant:
0:115 1 (const int)
0:115 'ps' (temp highp float)
0:131 Function Definition: bbBad( (global void)
0:131 Function Parameters:
0:133 Sequence
0:133 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:138 Function Definition: bb( (global void)
0:138 Function Parameters:
0:140 Sequence
0:140 move second child to first child (temp highp 4-component vector of float)
0:140 direct index (patch temp highp 4-component vector of float BoundingBox)
0:140 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:140 Constant:
0:140 0 (const int)
0:140 Constant:
0:140 0.000000
0:140 0.000000
0:140 0.000000
0:140 0.000000
0:141 move second child to first child (temp highp 4-component vector of float)
0:141 direct index (patch temp highp 4-component vector of float BoundingBox)
0:141 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:141 Constant:
0:141 1 (const int)
0:141 Constant:
0:141 1.000000
0:141 1.000000
0:141 1.000000
0:141 1.000000
0:142 move second child to first child (temp highp 4-component vector of float)
0:142 direct index (patch temp highp 4-component vector of float BoundingBox)
0:142 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:142 Constant:
0:142 2 (const int)
0:142 Constant:
0:142 2.000000
0:142 2.000000
0:142 2.000000
0:142 2.000000
0:? Linker Objects
0:? 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
0:? 'outa' (global 4-element array of highp int)
...
...
@@ -246,6 +288,7 @@ Linked tessellation control stage:
Shader version: 310
Requested GL_ARB_separate_shader_objects
Requested GL_OES_primitive_bounding_box
Requested GL_OES_shader_io_blocks
Requested GL_OES_tessellation_point_size
Requested GL_OES_tessellation_shader
...
...
@@ -420,6 +463,43 @@ ERROR: node is still EOpNull!
0:115 Constant:
0:115 1 (const int)
0:115 'ps' (temp highp float)
0:131 Function Definition: bbBad( (global void)
0:131 Function Parameters:
0:133 Sequence
0:133 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:138 Function Definition: bb( (global void)
0:138 Function Parameters:
0:140 Sequence
0:140 move second child to first child (temp highp 4-component vector of float)
0:140 direct index (patch temp highp 4-component vector of float BoundingBox)
0:140 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:140 Constant:
0:140 0 (const int)
0:140 Constant:
0:140 0.000000
0:140 0.000000
0:140 0.000000
0:140 0.000000
0:141 move second child to first child (temp highp 4-component vector of float)
0:141 direct index (patch temp highp 4-component vector of float BoundingBox)
0:141 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:141 Constant:
0:141 1 (const int)
0:141 Constant:
0:141 1.000000
0:141 1.000000
0:141 1.000000
0:141 1.000000
0:142 move second child to first child (temp highp 4-component vector of float)
0:142 direct index (patch temp highp 4-component vector of float BoundingBox)
0:142 'gl_BoundingBoxOES' (patch out 2-element array of highp 4-component vector of float BoundingBox)
0:142 Constant:
0:142 2 (const int)
0:142 Constant:
0:142 2.000000
0:142 2.000000
0:142 2.000000
0:142 2.000000
0:? Linker Objects
0:? 'gl_out' (out 4-element array of block{out highp 4-component vector of float Position gl_Position, out highp float PointSize gl_PointSize})
0:? 'outa' (global 4-element array of highp int)
...
...
Test/baseResults/310.tese.out
View file @
30314590
...
...
@@ -47,11 +47,13 @@ ERROR: 0:105: 'gl_TessLevelOuter' : identifiers starting with "gl_" are reserved
ERROR: 0:113: 'sample' : Reserved word.
ERROR: 0:119: 'gl_PointSize' : no such field in structure
ERROR: 0:119: '=' : cannot convert from 'temp block{in highp 4-component vector of float gl_Position}' to 'temp highp float'
ERROR: 43 compilation errors. No code generated.
ERROR: 0:127: 'gl_BoundingBoxOES' : undeclared identifier
ERROR: 44 compilation errors. No code generated.
Shader version: 310
Requested GL_ARB_separate_shader_objects
Requested GL_EXT_primitive_bounding_box
Requested GL_EXT_shader_io_blocks
Requested GL_EXT_tessellation_shader
Requested GL_OES_shader_io_blocks
...
...
@@ -148,6 +150,10 @@ ERROR: node is still EOpNull!
0:120 Constant:
0:120 1 (const uint)
0:120 'ps' (temp highp float)
0:125 Function Definition: bbbad( (global void)
0:125 Function Parameters:
0:127 Sequence
0:127 'gl_BoundingBoxOES' (temp float)
0:? Linker Objects
0:? 'patchIn' (patch in highp 4-component vector of float)
0:? 'patchOut' (patch out highp 4-component vector of float)
...
...
@@ -180,6 +186,7 @@ Linked tessellation evaluation stage:
Shader version: 310
Requested GL_ARB_separate_shader_objects
Requested GL_EXT_primitive_bounding_box
Requested GL_EXT_shader_io_blocks
Requested GL_EXT_tessellation_shader
Requested GL_OES_shader_io_blocks
...
...
@@ -276,6 +283,10 @@ ERROR: node is still EOpNull!
0:120 Constant:
0:120 1 (const uint)
0:120 'ps' (temp highp float)
0:125 Function Definition: bbbad( (global void)
0:125 Function Parameters:
0:127 Sequence
0:127 'gl_BoundingBoxOES' (temp float)
0:? Linker Objects
0:? 'patchIn' (patch in highp 4-component vector of float)
0:? 'patchOut' (patch out highp 4-component vector of float)
...
...
glslang/Include/BaseTypes.h
View file @
30314590
...
...
@@ -154,6 +154,7 @@ enum TBuiltInVariable {
EbvPatchVertices
,
EbvTessLevelOuter
,
EbvTessLevelInner
,
EbvBoundingBox
,
EbvTessCoord
,
EbvColor
,
EbvSecondaryColor
,
...
...
@@ -241,6 +242,7 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v)
case
EbvPatchVertices
:
return
"PatchVertices"
;
case
EbvTessLevelOuter
:
return
"TessLevelOuter"
;
case
EbvTessLevelInner
:
return
"TessLevelInner"
;
case
EbvBoundingBox
:
return
"BoundingBox"
;
case
EbvTessCoord
:
return
"TessCoord"
;
case
EbvColor
:
return
"Color"
;
case
EbvSecondaryColor
:
return
"SecondaryColor"
;
...
...
glslang/Include/revision.h
View file @
30314590
...
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "2.3.71
3
"
#define GLSLANG_REVISION "2.3.71
5
"
#define GLSLANG_DATE "16-Aug-2015"
glslang/MachineIndependent/Initialize.cpp
View file @
30314590
...
...
@@ -1636,6 +1636,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
"patch out highp float gl_TessLevelOuter[4];"
"patch out highp float gl_TessLevelInner[2];"
"patch out highp vec4 gl_BoundingBoxOES[2];"
"
\n
"
);
}
...
...
@@ -2839,6 +2840,13 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
// Fall through
case
EShLangTessControl
:
if
(
profile
==
EEsProfile
&&
version
>=
310
)
{
symbolTable
.
setVariableExtensions
(
"gl_BoundingBoxOES"
,
Num_AEP_primitive_bounding_box
,
AEP_primitive_bounding_box
);
BuiltInVariable
(
"gl_BoundingBoxOES"
,
EbvBoundingBox
,
symbolTable
);
}
// Fall through
case
EShLangTessEvaluation
:
case
EShLangGeometry
:
SpecialQualifier
(
"gl_Position"
,
EvqPosition
,
EbvPosition
,
symbolTable
);
...
...
glslang/MachineIndependent/Versions.cpp
View file @
30314590
...
...
@@ -188,7 +188,7 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior
[
E_GL_EXT_geometry_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_geometry_point_size
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_gpu_shader5
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_primitive_bounding_box
]
=
EBhDisable
Partial
;
extensionBehavior
[
E_GL_EXT_primitive_bounding_box
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_shader_io_blocks
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_tessellation_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_EXT_tessellation_point_size
]
=
EBhDisable
;
...
...
@@ -199,7 +199,7 @@ void TParseContext::initializeExtensionBehavior()
extensionBehavior
[
E_GL_OES_geometry_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_geometry_point_size
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_gpu_shader5
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_primitive_bounding_box
]
=
EBhDisable
Partial
;
extensionBehavior
[
E_GL_OES_primitive_bounding_box
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_shader_io_blocks
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_tessellation_shader
]
=
EBhDisable
;
extensionBehavior
[
E_GL_OES_tessellation_point_size
]
=
EBhDisable
;
...
...
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