diff options
author | Lingfeng Yang <lfy@google.com> | 2016-06-01 12:06:47 -0700 |
---|---|---|
committer | Lingfeng Yang <lfy@google.com> | 2016-06-01 14:59:09 -0700 |
commit | 8ad895ba66917ee9d98b1346f7631cc5d82007fa (patch) | |
tree | f143cec038489fb4c10b772e977d9f186b7a30de | |
parent | 8f80824f1bdf663565aa33f42fe5b0f6bd025525 (diff) | |
download | qemu-android-8ad895ba66917ee9d98b1346f7631cc5d82007fa.tar.gz |
Adjust CMA for software renderer in more cases
Such as when -gpu guest is specified through
the command line, not just the AVD config.ini
(cherry-picked from https://android-review.googlesource.com/#/c/234796/)
Change-Id: I6c75b20c4fb63884f9d584adfe56a2e7bb5d212f
-rwxr-xr-x | android-qemu2-glue/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/android-qemu2-glue/main.cpp b/android-qemu2-glue/main.cpp index 2ab37eb206..8fbbf2ebf9 100755 --- a/android-qemu2-glue/main.cpp +++ b/android-qemu2-glue/main.cpp @@ -717,7 +717,9 @@ extern "C" int main(int argc, char **argv) { } uint64_t glesCMA = 0ULL; - if (glesMode == kAndroidGlesEmulationGuest) { + if ((glesMode == kAndroidGlesEmulationGuest) || + (opts->gpu && !strcmp(opts->gpu, "guest")) || + !hw->hw_gpu_enabled) { // Set CMA (continguous memory allocation) to values that depend on // the desired resolution. // We will assume a double buffered 32-bit framebuffer in the calculation. |