Implement GL_OES_primitive_bounding_box.

This commit is contained in:
John Kessenich 2015-08-16 11:38:07 -06:00
parent cee88e3644
commit 30314590ff
8 changed files with 127 additions and 5 deletions

View file

@ -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";

View file

@ -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.713"
#define GLSLANG_REVISION "2.3.715"
#define GLSLANG_DATE "16-Aug-2015"

View file

@ -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);

View file

@ -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] = EBhDisablePartial;
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] = EBhDisablePartial;
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;