diff options
author | Lingfeng Yang <lfy@google.com> | 2016-06-01 12:06:47 -0700 |
---|---|---|
committer | Lingfeng Yang <lfy@google.com> | 2016-06-01 12:24:11 -0700 |
commit | 51c58b43dec793985e5fa40f7b4b60e341a37e5b (patch) | |
tree | e74f13ddc9caab35f8d10c9278433e90a1b0de9a | |
parent | 4eea3c5492e509c798d73a4b9f14347a24a824b4 (diff) | |
download | qemu-android-emu-2.0-release.tar.gz |
Adjust CMA for software renderer in more casesemu-2.0-release
Such as when -gpu guest is specified through
the command line, not just the AVD config.ini
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 bfb4b0837a..e2d9f424fc 100755 --- a/android-qemu2-glue/main.cpp +++ b/android-qemu2-glue/main.cpp @@ -1165,7 +1165,9 @@ extern "C" int main(int argc, char **argv) { } // Additional memory for -gpu guest software renderers (e.g., SwiftShader) - if (!strcmp(android_hw->hw_gpu_mode, "guest")) { + if ((android_hw->hw_gpu_mode && !strcmp(android_hw->hw_gpu_mode, "guest")) || + (opts->gpu && !strcmp(opts->gpu, "guest")) || + !hw->hw_gpu_enabled) { VERBOSE_PRINT(init, "Adjusting Contiguous Memory Allocation" "of %dx%d framebuffer for software renderer.", hw->hw_lcd_width, hw->hw_lcd_height); |