Built-in symbol tables now lazily evaluated, and driven by per version, per profile input. Got all ES 100 and ES 300 built-in symbols correct.
This includes - doing prescan of shader to know version/profile before parsing it - putting precision qualifiers on built-in ES symbols - getting most built-in state correct for core/compatibility/missing profile - adding gl_VertexID and gl_InstanceID, among other ES 300 built-in symbols - adding the ES 300 gl_Max/Min constants - accepting shaders that contain nothing but whitespace without generating an error git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20627 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
fb5f7eadfa
commit
bd0747d6f0
16 changed files with 843 additions and 491 deletions
|
|
@ -86,6 +86,10 @@ enum TStorageQualifier {
|
|||
EvqInOut,
|
||||
EvqConstReadOnly,
|
||||
|
||||
// built-ins read by vertex shader
|
||||
EvqVertexId,
|
||||
EvqInstanceId,
|
||||
|
||||
// built-ins written by vertex shader
|
||||
EvqPosition,
|
||||
EvqPointSize,
|
||||
|
|
@ -119,6 +123,8 @@ __inline const char* getStorageQualifierString(TStorageQualifier q)
|
|||
case EvqIn: return "in"; break;
|
||||
case EvqOut: return "out"; break;
|
||||
case EvqInOut: return "inout"; break;
|
||||
case EvqVertexId: return "gl_VertexId"; break;
|
||||
case EvqInstanceId: return "gl_InstanceId"; break;
|
||||
case EvqPosition: return "gl_Position"; break;
|
||||
case EvqPointSize: return "gl_PointSize"; break;
|
||||
case EvqClipVertex: return "gl_ClipVertex"; break;
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ struct TThreadGlobalPools
|
|||
TPoolAllocator* globalPoolAllocator;
|
||||
};
|
||||
|
||||
void SetGlobalPoolAllocatorPtr(TPoolAllocator* poolAllocator);
|
||||
void SetGlobalPoolAllocatorPtr(TPoolAllocator& poolAllocator);
|
||||
|
||||
//
|
||||
// This STL compatible allocator is intended to be used as the allocator
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
//
|
||||
//Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
|
||||
//Copyright (C) 2013 LunarG, Inc.
|
||||
//
|
||||
//All rights reserved.
|
||||
//
|
||||
//Redistribution and use in source and binary forms, with or without
|
||||
|
|
@ -48,5 +50,11 @@ struct TBuiltInResource {
|
|||
int maxTextureImageUnits;
|
||||
int maxFragmentUniformComponents;
|
||||
int maxDrawBuffers;
|
||||
int maxVertexUniformVectors;
|
||||
int maxVaryingVectors;
|
||||
int maxFragmentUniformVectors;
|
||||
int maxVertexOutputVectors;
|
||||
int minProgramTexelOffset;
|
||||
int maxProgramTexelOffset;
|
||||
};
|
||||
#endif // _RESOURCE_LIMITS_INCLUDED_
|
||||
|
|
|
|||
|
|
@ -155,6 +155,15 @@ public:
|
|||
qualifier.storage = q;
|
||||
qualifier.precision = EpqNone;
|
||||
}
|
||||
TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0) :
|
||||
type(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), arraySizes(0),
|
||||
structure(0), structureSize(0), maxArraySize(0), arrayInformationType(0),
|
||||
fieldName(0), mangled(0), typeName(0)
|
||||
{
|
||||
qualifier.storage = q;
|
||||
qualifier.precision = p;
|
||||
assert(p >= 0 && p <= EpqHigh);
|
||||
}
|
||||
explicit TType(const TPublicType &p) :
|
||||
type(p.type), vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), arraySizes(p.arraySizes),
|
||||
structure(0), structureSize(0), maxArraySize(0), arrayInformationType(0), fieldName(0), mangled(0), typeName(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue