diff options
author | Stephen Hines <srhines@google.com> | 2011-04-29 16:37:46 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-04-29 16:37:46 -0700 |
commit | 7fba67e63096f87d16f8c171b3b830e4d79aac40 (patch) | |
tree | 617c8d94e32fe0ffc97d16150fcc4825e699a336 | |
parent | efc69d72c9208fe08eefb702f9047cc7242b61b9 (diff) | |
parent | eccf6c6483564bbe21020e2affb490ced2345e5e (diff) | |
download | frameworks_base-7fba67e63096f87d16f8c171b3b830e4d79aac40.zip frameworks_base-7fba67e63096f87d16f8c171b3b830e4d79aac40.tar.gz frameworks_base-7fba67e63096f87d16f8c171b3b830e4d79aac40.tar.bz2 |
Merge "Fix bug 4355588 With auto inbanding the fifo didn't reserve the correct size. Caused failure on fifo wrap."
-rw-r--r-- | libs/rs/rsg_generator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/rs/rsg_generator.c b/libs/rs/rsg_generator.c index ed20fef..239795d 100644 --- a/libs/rs/rsg_generator.c +++ b/libs/rs/rsg_generator.c @@ -240,9 +240,11 @@ void printApiCpp(FILE *f) { } //fprintf(f, " LOGE(\"add command %s\\n\");\n", api->name); - fprintf(f, " RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name); if (hasInlineDataPointers(api)) { + fprintf(f, " RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(dataSize + sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name); fprintf(f, " uint8_t *payload = (uint8_t *)&cmd[1];\n"); + } else { + fprintf(f, " RS_CMD_%s *cmd = static_cast<RS_CMD_%s *>(io->mToCore.reserve(sizeof(RS_CMD_%s)));\n", api->name, api->name, api->name); } for (ct2=0; ct2 < api->paramCount; ct2++) { |