Track separate precision defaults for each kind of sampler, give initial defaults as per spec. Also make fragment floats have no default. Modify/add tests to adapt to these changes.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22066 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
c59d0cd9e6
commit
41a36bbb2f
13 changed files with 91 additions and 34 deletions
|
|
@ -91,6 +91,8 @@ struct TParseContext {
|
|||
|
||||
struct TPragma contextPragma;
|
||||
TPrecisionQualifier defaultPrecision[EbtNumTypes];
|
||||
static const int maxSamplerIndex = EsdNumDims * (EbtNumTypes * (2 * 2)); // see computeSamplerTypeIndex()
|
||||
TPrecisionQualifier defaultSamplerPrecision[maxSamplerIndex];
|
||||
TQualifier defaultGlobalQualification;
|
||||
TString HashErrMsg;
|
||||
bool AfterEOF;
|
||||
|
|
@ -130,6 +132,9 @@ struct TParseContext {
|
|||
bool structQualifierErrorCheck(int line, const TPublicType& pType);
|
||||
void mergeQualifiers(int line, TPublicType& dst, const TPublicType& src, bool force);
|
||||
void setDefaultPrecision(int line, TPublicType&, TPrecisionQualifier);
|
||||
int computeSamplerTypeIndex(TSampler&);
|
||||
TPrecisionQualifier getDefaultPrecision(TPublicType&);
|
||||
void precisionQualifierCheck(int line, TPublicType&);
|
||||
void parameterSamplerCheck(int line, TStorageQualifier qualifier, const TType& type);
|
||||
bool containsSampler(const TType& type);
|
||||
void nonInitConstCheck(int line, TString& identifier, TPublicType& type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue