diff options
| author | Lingfeng Yang <lfy@google.com> | 2020-09-03 19:11:02 -0700 |
|---|---|---|
| committer | Lingfeng Yang <lfy@google.com> | 2020-09-10 07:52:30 -0700 |
| commit | ed069c5944c3066ea1bbb3db65e4791a96b717b5 (patch) | |
| tree | b35ff1bdbb8faf1031f583d30175988cfea0b25e /system/OpenglSystemCommon | |
| parent | 1e04835f3deeab8af34990d649424321ec5fc793 (diff) | |
| download | device_generic_goldfish-opengl-ed069c5944c3066ea1bbb3db65e4791a96b717b5.tar.gz device_generic_goldfish-opengl-ed069c5944c3066ea1bbb3db65e4791a96b717b5.tar.bz2 device_generic_goldfish-opengl-ed069c5944c3066ea1bbb3db65e4791a96b717b5.zip | |
Move host validation to guest
Test: dEQP-GLES3 no failures when not using host-side glGetError
Change-Id: If602d7c784ea12c5ae47ce56a91669e14a9ac62f
Diffstat (limited to 'system/OpenglSystemCommon')
| -rw-r--r-- | system/OpenglSystemCommon/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | system/OpenglSystemCommon/EmulatorFeatureInfo.h | 3 | ||||
| -rw-r--r-- | system/OpenglSystemCommon/HostConnection.cpp | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/system/OpenglSystemCommon/CMakeLists.txt b/system/OpenglSystemCommon/CMakeLists.txt index fe1a4bb1..0149f8b7 100644 --- a/system/OpenglSystemCommon/CMakeLists.txt +++ b/system/OpenglSystemCommon/CMakeLists.txt @@ -4,7 +4,7 @@ android_validate_sha256("${GOLDFISH_DEVICE_ROOT}/system/OpenglSystemCommon/Android.mk" "014a10fd6e8b1977ab8f66a6e7211136ea921d3c1692653988c894c7e87fee7a") set(OpenglSystemCommon_src FormatConversions.cpp HostConnection.cpp QemuPipeStream.cpp ProcessPipe.cpp AddressSpaceStream.cpp ThreadInfo_host.cpp) android_add_library(TARGET OpenglSystemCommon SHARED LICENSE Apache-2.0 SRC FormatConversions.cpp HostConnection.cpp QemuPipeStream.cpp ProcessPipe.cpp AddressSpaceStream.cpp ThreadInfo_host.cpp) -target_include_directories(OpenglSystemCommon PRIVATE ${GOLDFISH_DEVICE_ROOT}/system/OpenglSystemCommon ${GOLDFISH_DEVICE_ROOT}/bionic/libc/platform ${GOLDFISH_DEVICE_ROOT}/bionic/libc/private ${GOLDFISH_DEVICE_ROOT}/system/OpenglSystemCommon/bionic-include ${GOLDFISH_DEVICE_ROOT}/system/vulkan_enc ${GOLDFISH_DEVICE_ROOT}/android-emu ${GOLDFISH_DEVICE_ROOT}/shared/gralloc_cb/include ${GOLDFISH_DEVICE_ROOT}/shared/GoldfishAddressSpace/include ${GOLDFISH_DEVICE_ROOT}/system/renderControl_enc ${GOLDFISH_DEVICE_ROOT}/system/GLESv2_enc ${GOLDFISH_DEVICE_ROOT}/system/GLESv1_enc ${GOLDFISH_DEVICE_ROOT}/shared/OpenglCodecCommon ${GOLDFISH_DEVICE_ROOT}/shared/qemupipe/include-types ${GOLDFISH_DEVICE_ROOT}/shared/qemupipe/include ${GOLDFISH_DEVICE_ROOT}/./host/include/libOpenglRender ${GOLDFISH_DEVICE_ROOT}/./system/include ${GOLDFISH_DEVICE_ROOT}/./../../../external/qemu/android/android-emugl/guest) +target_include_directories(OpenglSystemCommon PRIVATE ${GOLDFISH_DEVICE_ROOT}/system/OpenglSystemCommon ${GOLDFISH_DEVICE_ROOT}/bionic/libc/platform ${GOLDFISH_DEVICE_ROOT}/bionic/libc/private ${GOLDFISH_DEVICE_ROOT}/system/OpenglSystemCommon/bionic-include ${GOLDFISH_DEVICE_ROOT}/system/vulkan_enc ${GOLDFISH_DEVICE_ROOT}/shared/gralloc_cb/include ${GOLDFISH_DEVICE_ROOT}/shared/GoldfishAddressSpace/include ${GOLDFISH_DEVICE_ROOT}/system/renderControl_enc ${GOLDFISH_DEVICE_ROOT}/system/GLESv2_enc ${GOLDFISH_DEVICE_ROOT}/system/GLESv1_enc ${GOLDFISH_DEVICE_ROOT}/shared/OpenglCodecCommon ${GOLDFISH_DEVICE_ROOT}/android-emu ${GOLDFISH_DEVICE_ROOT}/shared/qemupipe/include-types ${GOLDFISH_DEVICE_ROOT}/shared/qemupipe/include ${GOLDFISH_DEVICE_ROOT}/./host/include/libOpenglRender ${GOLDFISH_DEVICE_ROOT}/./system/include ${GOLDFISH_DEVICE_ROOT}/./../../../external/qemu/android/android-emugl/guest) target_compile_definitions(OpenglSystemCommon PRIVATE "-DWITH_GLES2" "-DPLATFORM_SDK_VERSION=29" "-DGOLDFISH_HIDL_GRALLOC" "-DEMULATOR_OPENGL_POST_O=1" "-DHOST_BUILD" "-DANDROID" "-DGL_GLEXT_PROTOTYPES" "-DPAGE_SIZE=4096" "-DGFXSTREAM") target_compile_options(OpenglSystemCommon PRIVATE "-fvisibility=default" "-Wno-unused-parameter" "-Wno-unused-variable") -target_link_libraries(OpenglSystemCommon PRIVATE android-emu-shared vulkan_enc gui androidemu cutils utils log _renderControl_enc GLESv2_enc GLESv1_enc OpenglCodecCommon_host PRIVATE gralloc_cb_host GoldfishAddressSpace_host qemupipe_host)
\ No newline at end of file +target_link_libraries(OpenglSystemCommon PRIVATE android-emu-shared vulkan_enc gui log _renderControl_enc GLESv2_enc GLESv1_enc OpenglCodecCommon_host cutils utils androidemu PRIVATE gralloc_cb_host GoldfishAddressSpace_host qemupipe_host)
\ No newline at end of file diff --git a/system/OpenglSystemCommon/EmulatorFeatureInfo.h b/system/OpenglSystemCommon/EmulatorFeatureInfo.h index d0ae8530..304ab363 100644 --- a/system/OpenglSystemCommon/EmulatorFeatureInfo.h +++ b/system/OpenglSystemCommon/EmulatorFeatureInfo.h @@ -114,6 +114,9 @@ static const char kVulkanShaderFloat16Int8[] = "ANDROID_EMU_vulkan_shader_float1 // Vulkan async queue submit static const char kVulkanAsyncQueueSubmit[] = "ANDROID_EMU_vulkan_async_queue_submit"; +// A flag to _not_ ignore host opengl errors (now host opengl errors are ignored by default) +static const char kGLESUseHostError[] = "ANDROID_EMU_gles_use_host_error"; + // Struct describing available emulator features struct EmulatorFeatureInfo { diff --git a/system/OpenglSystemCommon/HostConnection.cpp b/system/OpenglSystemCommon/HostConnection.cpp index 260bba88..1da1b71c 100644 --- a/system/OpenglSystemCommon/HostConnection.cpp +++ b/system/OpenglSystemCommon/HostConnection.cpp @@ -355,7 +355,7 @@ HostConnection::HostConnection() : m_checksumHelper(), m_glExtensions(), m_grallocOnly(true), - m_noHostError(false), + m_noHostError(true), m_rendernodeFd(-1), m_rendernodeFdOwned(false) { } @@ -800,8 +800,8 @@ void HostConnection::queryAndSetGLESMaxVersion(ExtendedRCEncoderContext* rcEnc) void HostConnection::queryAndSetNoErrorState(ExtendedRCEncoderContext* rcEnc) { std::string glExtensions = queryGLExtensions(rcEnc); - if (glExtensions.find(kGLESNoHostError) != std::string::npos) { - m_noHostError = true; + if (glExtensions.find(kGLESUseHostError) != std::string::npos) { + m_noHostError = false; } } |
