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
|
|
@ -732,6 +732,24 @@ void SetVersion(int version)
|
|||
{
|
||||
TParseContext& parseContext = *((TParseContext *)cpp->pC);
|
||||
parseContext.version = version;
|
||||
|
||||
if (version == 100 || version == 300) {
|
||||
for (int type = 0; type < EbtNumTypes; ++type)
|
||||
parseContext.defaultPrecision[type] = EpqNone;
|
||||
|
||||
if (parseContext.language == EShLangVertex) {
|
||||
parseContext.defaultPrecision[EbtInt] = EpqHigh;
|
||||
parseContext.defaultPrecision[EbtFloat] = EpqHigh;
|
||||
parseContext.defaultPrecision[EbtSampler2D] = EpqLow;
|
||||
parseContext.defaultPrecision[EbtSamplerCube] = EpqLow;
|
||||
}
|
||||
|
||||
if (parseContext.language == EShLangFragment) {
|
||||
parseContext.defaultPrecision[EbtInt] = EpqMedium;
|
||||
parseContext.defaultPrecision[EbtSampler2D] = EpqLow;
|
||||
parseContext.defaultPrecision[EbtSamplerCube] = EpqLow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const int FirstProfileVersion = 150;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue