diff options
author | 2011-01-18 14:10:44 -0800 | |
---|---|---|
committer | 2011-01-18 14:10:44 -0800 | |
commit | 5dd60be169bbd8a22cf36eb072d8b0d6689255fb (patch) | |
tree | 91dfa103368382e5eec115d9aa7d710be3d20f40 /libs/rs/rsScriptC.cpp | |
parent | 88c2d7056452d1b424d6ab79ad60fb4824401c09 (diff) |
Validate that version pragma is correct.
Change-Id: I42dced79b0df52c101525799081bc8a5426c11e4
Diffstat (limited to 'libs/rs/rsScriptC.cpp')
-rw-r--r-- | libs/rs/rsScriptC.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 042f6c72eb7c..9f730bffe8d3 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -543,8 +543,11 @@ void ScriptCState::runCompiler(Context *rsc, for (size_t i=0; i < pragmaCount; ++i) { //LOGE("pragma %s %s", keys[i], values[i]); if (!strcmp(keys[i], "version")) { - // TODO: Verify that version is correct - continue; + if (!strcmp(values[i], "1")) { + continue; + } + LOGE("Invalid version pragma value: %s\n", values[i]); + // Handle Fatal Error } if (!strcmp(keys[i], "stateVertex")) { @@ -555,7 +558,8 @@ void ScriptCState::runCompiler(Context *rsc, s->mEnviroment.mVertex.clear(); continue; } - LOGE("Unreconized value %s passed to stateVertex", values[i]); + LOGE("Unrecognized value %s passed to stateVertex", values[i]); + // Handle Fatal Error } if (!strcmp(keys[i], "stateRaster")) { @@ -566,7 +570,8 @@ void ScriptCState::runCompiler(Context *rsc, s->mEnviroment.mRaster.clear(); continue; } - LOGE("Unreconized value %s passed to stateRaster", values[i]); + LOGE("Unrecognized value %s passed to stateRaster", values[i]); + // Handle Fatal Error } if (!strcmp(keys[i], "stateFragment")) { @@ -577,7 +582,8 @@ void ScriptCState::runCompiler(Context *rsc, s->mEnviroment.mFragment.clear(); continue; } - LOGE("Unreconized value %s passed to stateFragment", values[i]); + LOGE("Unrecognized value %s passed to stateFragment", values[i]); + // Handle Fatal Error } if (!strcmp(keys[i], "stateStore")) { @@ -588,7 +594,8 @@ void ScriptCState::runCompiler(Context *rsc, s->mEnviroment.mFragmentStore.clear(); continue; } - LOGE("Unreconized value %s passed to stateStore", values[i]); + LOGE("Unrecognized value %s passed to stateStore", values[i]); + // Handle Fatal Error } } } |