Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(326)

Unified Diff: src/compiler/builtin_symbol_table.cpp

Issue 10247043: Use new symbol table initization for vertex shader. (Closed) Base URL: https://angleproject.googlecode.com/svn/trunk
Patch Set: address comments Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/builtin_symbol_table.h ('k') | src/compiler/builtin_symbols.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/builtin_symbol_table.cpp
diff --git a/src/compiler/builtin_symbol_table.cpp b/src/compiler/builtin_symbol_table.cpp
index f9d27d3adb819f344fc698f5e432f6a0a28dc987..920c8241a273fcf430974c58f7ee7c93ed808f8c 100644
--- a/src/compiler/builtin_symbol_table.cpp
+++ b/src/compiler/builtin_symbol_table.cpp
@@ -16,6 +16,7 @@ static void builtin1(TSymbolTable* t, TType* rvalue, const char* name, TType* pt
f->addParameter(param);
t->insert(*f);
}
+
static void builtin2(TSymbolTable* t, TType* rvalue, const char* name, TType* ptype1, const char* pname1, TType* ptype2, const char* pname2)
{
TFunction* f = new TFunction(new TString(name), *rvalue);
@@ -37,7 +38,8 @@ static void builtin3(TSymbolTable* t, TType* rvalue, const char* name, TType* pt
f->addParameter(param3);
t->insert(*f);
}
-void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable * t) {
+
+void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTable* t) {
builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "degrees");
builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "degrees");
builtin1(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "radians", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "degrees");
@@ -277,3 +279,11 @@ void InsertBuiltInFunctionsCommon(const ShBuiltInResources& resources, TSymbolTa
builtin2(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DRectProj", new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord");
}
}
+
+void InsertBuiltInFunctionsVertex(const ShBuiltInResources& resources, TSymbolTable* t) {
+ builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DLod", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+ builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProjLod", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+ builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "texture2DProjLod", new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+ builtin3(t, new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, false, false), "textureCubeLod", new TType(EbtSamplerCube, EbpUndefined, EvqGlobal, 1, false, false), "sampler", new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, false, false), "coord", new TType(EbtFloat, EbpUndefined, EvqGlobal, 1, false, false), "lod");
+}
+
« no previous file with comments | « src/compiler/builtin_symbol_table.h ('k') | src/compiler/builtin_symbols.json » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b