aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-01 00:35:31 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-03-01 00:35:31 +0000
commit2ca4fd3c22aaa4563ae0d370bb68a076f46c1e95 (patch)
treedfa8be2aa25bbabc906beca820ca01660018a53b
parent3d2a2e0c077e5a42b5b45c55194a94f533ab1ca5 (diff)
parent730c1743b845204d9a9190daf2b5cb1a335b782a (diff)
downloadgfxstream-emu-34-3-release.tar.gz
Snap for 11518112 from 730c1743b845204d9a9190daf2b5cb1a335b782a to emu-34-3-releaseemu-34-3-release
Change-Id: Ib5dffcca28e91e7e099a9a3628290e5b817814b8
-rw-r--r--host/gl/glestranslator/GLES_V2/GLESv30Imp.cpp34
-rw-r--r--host/virtio-gpu-gfxstream-renderer.cpp2
2 files changed, 31 insertions, 5 deletions
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;