summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsProgramVertex.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-09-27 10:29:47 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-09-27 10:29:47 -0700
commit7215b5115ed8c34448b502dbfae1efa295c0a1e5 (patch)
tree7ef7e42b94324c33005b33a8faf6a64cc087d33f /libs/rs/rsProgramVertex.cpp
parentbace89118bf1589e8afa00a3c1b36d681b6835da (diff)
downloadframeworks_base-7215b5115ed8c34448b502dbfae1efa295c0a1e5.zip
frameworks_base-7215b5115ed8c34448b502dbfae1efa295c0a1e5.tar.gz
frameworks_base-7215b5115ed8c34448b502dbfae1efa295c0a1e5.tar.bz2
Error checking for MVP matrix computation.
Fixing more padding bugs. Change-Id: Ic5d4260027b7dc86a50fdab7221c7296c7d3ea0d
Diffstat (limited to 'libs/rs/rsProgramVertex.cpp')
-rw-r--r--libs/rs/rsProgramVertex.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index c3ef356..918625c 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -108,6 +108,11 @@ void ProgramVertex::setupGL2(Context *rsc, ProgramVertexState *state, ShaderCach
rsc->checkError("ProgramVertex::setupGL2 start");
if(!isUserProgram()) {
+ if(mConstants[0].get() == NULL) {
+ LOGE("Unable to set fixed function emulation matrices because allocation is missing");
+ rsc->setError(RS_ERROR_BAD_SHADER, "Fixed function allocation missing");
+ return;
+ }
float *f = static_cast<float *>(mConstants[0]->getPtr());
Matrix mvp;
mvp.load(&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET]);