Commit 6440d14b by Jamie Madill

Fix compile errors in the essl to hlsl standalone translator.

ANGLEBUG=469 R=shannonwoods@chromium.org Review URL: https://codereview.appspot.com/13281043
parent 12505491
...@@ -83,7 +83,7 @@ int main(int argc, char* argv[]) ...@@ -83,7 +83,7 @@ int main(int argc, char* argv[])
case 'i': compileOptions |= SH_INTERMEDIATE_TREE; break; case 'i': compileOptions |= SH_INTERMEDIATE_TREE; break;
case 'm': compileOptions |= SH_MAP_LONG_VARIABLE_NAMES; break; case 'm': compileOptions |= SH_MAP_LONG_VARIABLE_NAMES; break;
case 'o': compileOptions |= SH_OBJECT_CODE; break; case 'o': compileOptions |= SH_OBJECT_CODE; break;
case 'u': compileOptions |= SH_ATTRIBUTES_UNIFORMS; break; case 'u': compileOptions |= SH_VARIABLES; break;
case 'l': compileOptions |= SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX; break; case 'l': compileOptions |= SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX; break;
case 'e': compileOptions |= SH_EMULATE_BUILT_IN_FUNCTIONS; break; case 'e': compileOptions |= SH_EMULATE_BUILT_IN_FUNCTIONS; break;
case 'd': compileOptions |= SH_DEPENDENCY_GRAPH; break; case 'd': compileOptions |= SH_DEPENDENCY_GRAPH; break;
...@@ -172,7 +172,7 @@ int main(int argc, char* argv[]) ...@@ -172,7 +172,7 @@ int main(int argc, char* argv[])
LogMsg("END", "COMPILER", numCompiles, "OBJ CODE"); LogMsg("END", "COMPILER", numCompiles, "OBJ CODE");
printf("\n\n"); printf("\n\n");
} }
if (compiled && (compileOptions & SH_ATTRIBUTES_UNIFORMS)) { if (compiled && (compileOptions & SH_VARIABLES)) {
LogMsg("BEGIN", "COMPILER", numCompiles, "ACTIVE ATTRIBS"); LogMsg("BEGIN", "COMPILER", numCompiles, "ACTIVE ATTRIBS");
PrintActiveVariables(compiler, SH_ACTIVE_ATTRIBUTES, (compileOptions & SH_MAP_LONG_VARIABLE_NAMES) != 0); PrintActiveVariables(compiler, SH_ACTIVE_ATTRIBUTES, (compileOptions & SH_MAP_LONG_VARIABLE_NAMES) != 0);
LogMsg("END", "COMPILER", numCompiles, "ACTIVE ATTRIBS"); LogMsg("END", "COMPILER", numCompiles, "ACTIVE ATTRIBS");
...@@ -305,15 +305,17 @@ void PrintActiveVariables(ShHandle compiler, ShShaderInfo varType, bool mapLongV ...@@ -305,15 +305,17 @@ void PrintActiveVariables(ShHandle compiler, ShShaderInfo varType, bool mapLongV
size_t activeVars = 0; size_t activeVars = 0;
int size = 0; int size = 0;
ShDataType type = SH_NONE; ShDataType type = SH_NONE;
ShPrecisionType precision = SH_PRECISION_UNDEFINED;
int staticUse = 0;
const char* typeName = NULL; const char* typeName = NULL;
ShGetInfo(compiler, varType, &activeVars); ShGetInfo(compiler, varType, &activeVars);
for (size_t i = 0; i < activeVars; ++i) { for (size_t i = 0; i < activeVars; ++i) {
switch (varType) { switch (varType) {
case SH_ACTIVE_ATTRIBUTES: case SH_ACTIVE_ATTRIBUTES:
ShGetActiveAttrib(compiler, static_cast<int>(i), NULL, &size, &type, name, mappedName); ShGetVariableInfo(compiler, SH_ACTIVE_ATTRIBUTES, static_cast<int>(i), NULL, &size, &type, &precision, &staticUse, name, mappedName);
break; break;
case SH_ACTIVE_UNIFORMS: case SH_ACTIVE_UNIFORMS:
ShGetActiveUniform(compiler, static_cast<int>(i), NULL, &size, &type, name, mappedName); ShGetVariableInfo(compiler, SH_ACTIVE_UNIFORMS, static_cast<int>(i), NULL, &size, &type, &precision, &staticUse, name, mappedName);
break; break;
default: assert(0); default: assert(0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment