Update all "TODO", add some comments.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@21137 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-04-12 17:17:07 +00:00
Родитель 0108aa1183
Коммит b49a191532
8 изменённых файлов: 35 добавлений и 29 удалений

Просмотреть файл

@ -153,7 +153,7 @@ inline TTypeList* NewPoolTTypeList()
}
//
// TODO: TArraySizes memory: This could be replaced by something smaller.
// TODO: memory: TArraySizes can be replaced by something smaller.
// Almost all arrays could be handled by two sizes each fitting
// in 16 bits, needing a real vector only in the cases where there
// are more than 3 sizes or a size needing more than 16 bits.

Просмотреть файл

@ -1064,12 +1064,12 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int versi
builtInStrings[EShLangFragment].push_back(s);
builtInStrings[EShLangVertex].push_back(s);
// TODO: Functionality: version 420 imaging functions
// TODO: 4.2 Functionality: imaging functions
}
void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
{
// TODO: Functionality: version 420 imaging functions
// TODO: 4.2 Functionality: imaging functions
}
void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
@ -1462,7 +1462,7 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
case EShLangTessControl:
case EShLangTessEvaluation:
case EShLangGeometry:
// TODO: support these stages
// TODO: desktop functionality: support new stages
default:
assert(false && "Language not supported");

Просмотреть файл

@ -55,7 +55,7 @@
//
void TIntermMethod::traverse(TIntermTraverser* it)
{
// TODO: current tree should always resolve all methods as constants
// TODO: functionality: current tree should always resolve all methods as constants
// 4.3 will leave some length methods as methods
}

Просмотреть файл

@ -1268,7 +1268,7 @@ void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision)
}
}
// TODO: propagate precision for
// TODO: functionality: propagate precision for
// comma operator: just through the last operand
// ":?" and ",": where is this triggered?
// built-in function calls: how much to propagate to arguments?

Просмотреть файл

@ -64,7 +64,7 @@ TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, int v, E
defaultPrecision[EbtInt] = EpqMedium;
defaultPrecision[EbtUint] = EpqMedium;
defaultPrecision[EbtSampler] = EpqLow;
// TODO: give error when using float in frag shader without default precision
// TODO: semantics: give error when using float in frag shader without default precision
break;
default:
error(1, "INTERNAL ERROR", "unexpected language", "");
@ -457,7 +457,7 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
if (identifier.find("__") != TString::npos) {
//error(line, "Two consecutive underscores are reserved for future use.", identifier.c_str(), "", "");
//return true;
// TODO: make this an error
// TODO: semantics: make this an error
infoSink.info.message(EPrefixWarning, "Two consecutive underscores are reserved for future use.", line);
return false;
}
@ -1151,9 +1151,9 @@ void TParseContext::setLayoutQualifier(int line, TPublicType& publicType, TStrin
else
error(line, "there is no such layout identifier taking an assigned value", id.c_str(), "");
// TODO: error check: make sure locations are non-overlapping across the whole stage
// TODO: error check: if more than one fragment output, all must have a location
// TODO: error check: output arrays can only be indexed with a constant (es 300)
// TODO: semantics: error check: make sure locations are non-overlapping across the whole stage
// TODO: semantics: error check: if more than one fragment output, all must have a location
// TODO: semantics: error check: output arrays can only be indexed with a constant (es 300)
}
// Merge any layout qualifier information from src into dst, leaving everything else in dst alone
@ -1574,6 +1574,12 @@ void TParseContext::addBlock(int line, TPublicType& publicType, const TString& b
}
}
//
// Take the sequence of statements that has been built up since the last case/default,
// put it on the list of top-level nodes for the current (inner-most) switch statement,
// and follow that by the case/default we are on now. (See switch topology comment on
// TIntermSwitch.)
//
void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode)
{
TIntermSequence* switchSequence = switchSequenceStack.back();
@ -1590,6 +1596,10 @@ void TParseContext::wrapupSwitchSubsequence(TIntermAggregate* statements, TInter
switchSequence->push_back(branchNode);
}
//
// Turn the top-level node sequence built up of wrapupSwitchSubsequence9)
// into a switch node.
//
TIntermNode* TParseContext::addSwitch(int line, TIntermTyped* expression, TIntermAggregate* lastStatements)
{
profileRequires(line, EEsProfile, 300, 0, "switch statements");

Просмотреть файл

@ -81,7 +81,7 @@ const int VersionCount = 12;
// Each has a different set of built-ins, and we want to preserve that from
// compile to compile.
//
// TODO: thread safety: ensure the built-in symbol table levels are reado only.
// TODO: quality: thread safety: ensure the built-in symbol table levels are reado only.
TSymbolTable* SharedSymbolTables[VersionCount][EProfileCount][EShLangCount] = {};
TPoolAllocator* PerProcessGPA = 0;
@ -278,7 +278,7 @@ void ScanVersion(const char* const shaderStrings[], int numStrings, int& version
const char* s = &shaderStrings[0][0];
// TODO: ES error check: #version must be on first line
// TODO: semantics: ES error check: #version must be on first line
while (ConsumeWhitespaceComment(s))
;
@ -390,7 +390,7 @@ int ShInitialize()
if (! InitProcess())
return 0;
// TODO: Thread safety:
// TODO: Quality: Thread safety:
// This method should be called once per process. If it's called by multiple threads, then
// we need to have thread synchronization code around the initialization of per process
// global pool allocator

Просмотреть файл

@ -59,9 +59,6 @@ U [uU]
F [fF]
LF [lL][fF]
/* TODO: double literals, which will likely require pre-processor rework */
/* TODO: unsigned int literals, which will likely require pre-processor rework */
%option nounput
%{
#include <stdio.h>
@ -107,10 +104,10 @@ int yy_input(char* buf, int max_size);
%%
<*>"//"[^\n]*"\n" { /* CPP should have taken care of this */ };
"attribute" { pyylval->lex.line = yylineno; return(ATTRIBUTE); } // TODO ES 30 reserved
"attribute" { pyylval->lex.line = yylineno; return(ATTRIBUTE); } // TODO: semantics: ES 30 reserved
"const" { pyylval->lex.line = yylineno; return(CONST); }
"uniform" { pyylval->lex.line = yylineno; return(UNIFORM); }
"varying" { pyylval->lex.line = yylineno; return(VARYING); } // TODO ES 30 reserved
"varying" { pyylval->lex.line = yylineno; return(VARYING); } // TODO: semantics: ES 30 reserved
"buffer" { pyylval->lex.line = yylineno; return(BUFFER); }
"shared" { pyylval->lex.line = yylineno; return(SHARED); }

Просмотреть файл

@ -378,7 +378,7 @@ postfix_expression
// we later see the function calling syntax. Save away the name for now.
//
// TODO: if next token is not "(", then this is an error
// TODO: semantics: if next token is not "(", then this is an error
if (*$3.string == "length") {
parseContext.profileRequires($3.line, ENoProfile, 120, "GL_3DL_array_objects", ".length");
@ -505,7 +505,7 @@ function_call
TFunction* fnCall = $1.function;
TOperator op = fnCall->getBuiltInOp();
if (op == EOpArrayLength) {
// TODO: check for no arguments to .length()
// TODO: semantics: check for no arguments to .length()
int length;
if ($1.intermNode->getAsTyped() == 0 || ! $1.intermNode->getAsTyped()->getType().isArray() || $1.intermNode->getAsTyped()->getType().getArraySize() == 0) {
parseContext.error($1.line, "", fnCall->getName().c_str(), "array must be declared with a size before using this method");
@ -596,7 +596,7 @@ function_call
}
;
// TODO: can we eliminate function_call_or_method and function_call_generic?
// TODO: clean up: can we eliminate function_call_or_method and function_call_generic?
function_call_or_method
: function_call_generic {
$$ = $1;
@ -1182,7 +1182,7 @@ constant_expression
declaration
: function_prototype SEMICOLON {
$$ = 0;
// TODO: subroutines: make the identifier a user type for this signature
// TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature
}
| init_declarator_list SEMICOLON {
if ($1.intermAggregate)
@ -1795,7 +1795,7 @@ storage_qualifier
if (parseContext.globalErrorCheck($1.line, parseContext.symbolTable.atGlobalLevel(), "buffer"))
parseContext.recover();
$$.init($1.line);
$$.qualifier.storage = EvqUniform; // TODO: functionality: implement BUFFER
$$.qualifier.storage = EvqUniform; // TODO: 4.0 functionality: implement BUFFER
}
| SHARED {
$$.init($1.line);
@ -1832,7 +1832,7 @@ storage_qualifier
parseContext.recover();
$$.init($1.line);
$$.qualifier.storage = EvqUniform;
// TODO: subroutine semantics
// TODO: 4.0 semantics: subroutines
// 1) make sure each identifier is a type declared earlier with SUBROUTINE
// 2) save all of the identifiers for future comparison with the declared function
}
@ -1840,10 +1840,9 @@ storage_qualifier
type_name_list
: TYPE_NAME {
// TODO: add subroutine type to list
// TODO: 4.0 functionality: subroutine type to list
}
| type_name_list COMMA TYPE_NAME {
// TODO: add subroutine type to list
}
;
@ -2129,7 +2128,7 @@ type_specifier_nonarray
$$.setMatrix(4, 4);
}
| ATOMIC_UINT {
// TODO: add type
// TODO: 4.2 functionality: add type
$$.init($1.line, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt;
}
@ -2678,7 +2677,7 @@ initializer_list
$$ = $1;
}
| initializer_list COMMA initializer {
// TODO: implement the list
// TODO: 4.2 functionality: implement the initializer list
$$ = $3;
}
;