diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-04 22:10:32 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2024-03-04 22:10:32 +0000 |
commit | ec80ac15bacf8f9442d664b1c49564cf23b42c17 (patch) | |
tree | 610c5daec84e17b6819a56f24949efe1aedc1992 | |
parent | 223075a7860c7d577d5de5af9061a6e4c93cdcdf (diff) | |
parent | 388ecd5f4f427ec306d77ce6ef566693abe3fd5e (diff) | |
download | gfxstream-simpleperf-release.tar.gz |
Snap for 11526323 from 388ecd5f4f427ec306d77ce6ef566693abe3fd5e to simpleperf-releasesimpleperf-release
Change-Id: Iace2b9041aa3995861cb7fd69327fe9fd0518224
-rw-r--r-- | host/ColorBuffer.cpp | 1 | ||||
-rw-r--r-- | host/gl/glestranslator/GLES_V2/GLESv30Imp.cpp | 34 | ||||
-rw-r--r-- | host/virtio-gpu-gfxstream-renderer.cpp | 2 |
3 files changed, 31 insertions, 6 deletions
diff --git a/host/ColorBuffer.cpp b/host/ColorBuffer.cpp index 3cdecbfb..2a9bcd19 100644 --- a/host/ColorBuffer.cpp +++ b/host/ColorBuffer.cpp @@ -99,7 +99,6 @@ std::shared_ptr<ColorBuffer> ColorBuffer::create(gl::EmulationGl* emulationGl, colorBuffer->mGlAndVkAreSharingExternalMemory = true; } else { ERR("Failed to import memory to ColorBufferGl:%d", handle); - return nullptr; } } } diff --git a/host/gl/glestranslator/GLES_V2/GLESv30Imp.cpp b/host/gl/glestranslator/GLES_V2/GLESv30Imp.cpp index 5903eeb7..fea7f60e 100644 --- a/host/gl/glestranslator/GLES_V2/GLESv30Imp.cpp +++ b/host/gl/glestranslator/GLES_V2/GLESv30Imp.cpp @@ -1,8 +1,3 @@ -// Auto-generated with: android/scripts/gen-entries.py --mode=translator_passthrough android/android-emugl/host/libs/libOpenGLESDispatch/gles3_only.entries --output=android/android-emugl/host/libs/Translator/GLES_V2/GLESv30Imp.cpp -// This file is best left unedited. -// Try to make changes through gen_translator in gen-entries.py, -// and/or parcel out custom functionality in separate code. - EXTERN_PART GL_APICALL GLconstubyteptr GL_APIENTRY glGetStringi(GLenum name, GLint index) { GET_CTX_V2_RET(0); GLconstubyteptr glGetStringiRET = ctx->dispatcher().glGetStringi(name, index); @@ -988,7 +983,36 @@ GL_APICALL void GL_APIENTRY glProgramBinary(GLuint program, GLenum binaryFormat, GET_CTX_V2(); if (ctx->shareGroup().get()) { const GLuint globalProgramName = ctx->shareGroup()->getGlobalName(NamedObjectType::SHADER_OR_PROGRAM, program); + SET_ERROR_IF(globalProgramName == 0, GL_INVALID_VALUE); + + auto objData = + ctx->shareGroup()->getObjectData(NamedObjectType::SHADER_OR_PROGRAM, program); + SET_ERROR_IF(!objData, GL_INVALID_OPERATION); + SET_ERROR_IF(objData->getDataType() != PROGRAM_DATA, GL_INVALID_OPERATION); + + ProgramData* programData = (ProgramData*)objData; + ctx->dispatcher().glProgramBinary(globalProgramName, binaryFormat, binary, length); + + GLint linkStatus = GL_FALSE; + ctx->dispatcher().glGetProgramiv(globalProgramName, GL_LINK_STATUS, &linkStatus); + + programData->setHostLinkStatus(linkStatus); + programData->setLinkStatus(linkStatus); + + GLsizei infoLogLength = 0; + ctx->dispatcher().glGetProgramiv(globalProgramName, GL_INFO_LOG_LENGTH, &infoLogLength); + + if (infoLogLength > 0) { + std::vector<GLchar> infoLog(infoLogLength); + ctx->dispatcher().glGetProgramInfoLog(globalProgramName, infoLogLength, &infoLogLength, + infoLog.data()); + + if (infoLogLength) { + infoLog.resize(infoLogLength); + programData->setInfoLog(infoLog.data()); + } + } } } diff --git a/host/virtio-gpu-gfxstream-renderer.cpp b/host/virtio-gpu-gfxstream-renderer.cpp index fabe6cbb..1cab1741 100644 --- a/host/virtio-gpu-gfxstream-renderer.cpp +++ b/host/virtio-gpu-gfxstream-renderer.cpp @@ -2416,6 +2416,8 @@ VG_EXPORT int stream_renderer_init(struct stream_renderer_param* stream_renderer required_params.erase(param.key); switch (param.key) { + case STREAM_RENDERER_PARAM_NULL: + break; case STREAM_RENDERER_PARAM_USER_DATA: { renderer_cookie = reinterpret_cast<void*>(static_cast<uintptr_t>(param.value)); globalUserData = renderer_cookie; |