Implement the full scheme for ES precision qualifiers, generalizing existing storage qualifiers to be able to include multiple independent kinds of qualifiers.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20317 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
674014bfc4
commit
5521862729
15 changed files with 661 additions and 463 deletions
|
|
@ -55,7 +55,7 @@ enum TBasicType {
|
|||
EbtSamplerRectShadow, // ARB_texture_rectangle
|
||||
EbtGuardSamplerEnd, // non type: see implementation of IsSampler()
|
||||
EbtStruct,
|
||||
EbtAddress, // should be deprecated??
|
||||
EbtNumTypes
|
||||
};
|
||||
|
||||
__inline bool IsSampler(TBasicType type)
|
||||
|
|
@ -69,7 +69,7 @@ __inline bool IsSampler(TBasicType type)
|
|||
// to allocate variables in. Since built-ins tend to go to different registers
|
||||
// than varying or uniform, it makes sense they are peers, not sub-classes.
|
||||
//
|
||||
enum TQualifier {
|
||||
enum TStorageQualifier {
|
||||
EvqTemporary, // For temporaries (within a function), read/write
|
||||
EvqGlobal, // For globals read/write
|
||||
EvqConst, // User defined constants and non-output parameters in functions
|
||||
|
|
@ -104,7 +104,7 @@ enum TQualifier {
|
|||
//
|
||||
// This is just for debug print out, carried along with the definitions above.
|
||||
//
|
||||
__inline const char* getQualifierString(TQualifier q)
|
||||
__inline const char* getStorageQualifierString(TStorageQualifier q)
|
||||
{
|
||||
switch (q) {
|
||||
case EvqTemporary: return "Temporary"; break;
|
||||
|
|
@ -129,4 +129,22 @@ __inline const char* getQualifierString(TQualifier q)
|
|||
}
|
||||
}
|
||||
|
||||
enum TPrecisionQualifier {
|
||||
EpqNone,
|
||||
EpqLow,
|
||||
EpqMedium,
|
||||
EpqHigh
|
||||
};
|
||||
|
||||
__inline const char* getPrecisionQualifierString(TPrecisionQualifier p)
|
||||
{
|
||||
switch(p) {
|
||||
case EpqNone: return ""; break;
|
||||
case EpqLow: return "lowp"; break;
|
||||
case EpqMedium: return "mediump"; break;
|
||||
case EpqHigh: return "highp"; break;
|
||||
default: return "unknown precision qualifier";
|
||||
}
|
||||
}
|
||||
|
||||
#endif // _BASICTYPES_INCLUDED_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue