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
|
|
@ -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
|
||||
|
|
@ -39,23 +41,22 @@
|
|||
#include "../Include/Common.h"
|
||||
#include "../Include/ShHandle.h"
|
||||
#include "SymbolTable.h"
|
||||
#include "Versions.h"
|
||||
|
||||
typedef TVector<TString> TBuiltInStrings;
|
||||
|
||||
class TBuiltIns {
|
||||
public:
|
||||
POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
|
||||
void initialize();
|
||||
void initialize(const TBuiltInResource& resources);
|
||||
void initialize(int version, EProfile);
|
||||
void initialize(const TBuiltInResource& resources, int version, EProfile, EShLanguage);
|
||||
TBuiltInStrings* getBuiltInStrings() { return builtInStrings; }
|
||||
protected:
|
||||
TBuiltInStrings builtInStrings[EShLangCount];
|
||||
};
|
||||
|
||||
void IdentifyBuiltIns(EShLanguage, TSymbolTable&);
|
||||
void IdentifyBuiltIns(EShLanguage, TSymbolTable&, const TBuiltInResource &resources);
|
||||
bool GenerateBuiltInSymbolTable(const TBuiltInResource* resources, TInfoSink&, TSymbolTable*, EShLanguage language = EShLangCount);
|
||||
bool InitializeSymbolTable(TBuiltInStrings* BuiltInStrings, EShLanguage language, TInfoSink& infoSink, const TBuiltInResource *resources, TSymbolTable*);
|
||||
void IdentifyBuiltIns(int version, EProfile profile, EShLanguage, TSymbolTable&);
|
||||
void IdentifyBuiltIns(int version, EProfile profile, EShLanguage, TSymbolTable&, const TBuiltInResource &resources);
|
||||
extern "C" int InitPreprocessor(void);
|
||||
extern "C" int FinalizePreprocessor(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue