summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasiliy Ulyanov <v.ulyanov@samsung.com>2016-03-15 11:56:29 +0300
committerVasiliy Ulyanov <v.ulyanov@samsung.com>2016-03-16 12:58:13 +0300
commitb8e8e9c98eb6e4925fb8841777f19ef60188aa20 (patch)
tree64cfd593c0e4eb382c87d1d077c8a95cc458b08a
parent246a7db9c03797276b650b955139210c04f80e84 (diff)
downloademulator-yagl-b8e8e9c98eb6e4925fb8841777f19ef60188aa20.tar.gz
emulator-yagl-b8e8e9c98eb6e4925fb8841777f19ef60188aa20.tar.bz2
emulator-yagl-b8e8e9c98eb6e4925fb8841777f19ef60188aa20.zip
This reverts commit 246a7db9c03797276b650b955139210c04f80e84. The race condition was occuring because of improper glFinish call handling with surfaceless context. The commit also adds explicit transport flushing to ensure all the rendering commands are offloaded to the host in this case. Change-Id: Ic70d7f82904c1636acc495fb2e500115f62c6125 Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
-rw-r--r--EGL/yagl_render.c9
-rw-r--r--GLES_common/yagl_gles_calls.in2
-rw-r--r--GLES_common/yagl_host_gles_calls.c1
3 files changed, 10 insertions, 2 deletions
diff --git a/EGL/yagl_render.c b/EGL/yagl_render.c
index eab10a1..0bcf932 100644
--- a/EGL/yagl_render.c
+++ b/EGL/yagl_render.c
@@ -35,6 +35,8 @@
#include "yagl_egl_state.h"
#include "yagl_surface.h"
#include "yagl_context.h"
+#include "yagl_transport.h"
+#include "yagl_state.h"
void yagl_render_invalidate(int throttle)
{
@@ -63,5 +65,12 @@ void yagl_render_finish()
if (draw_sfc) {
draw_sfc->wait_gl(draw_sfc);
+ } else {
+ /*
+ * GL_OES_surfaceless_context: if current context has no draw_sfc
+ * we still need to ensure all the offscreen rendering is completed.
+ * Transport flush should be sufficient in this case.
+ */
+ yagl_transport_flush(yagl_get_transport(), NULL);
}
}
diff --git a/GLES_common/yagl_gles_calls.in b/GLES_common/yagl_gles_calls.in
index f327328..e0cf14e 100644
--- a/GLES_common/yagl_gles_calls.in
+++ b/GLES_common/yagl_gles_calls.in
@@ -37,7 +37,7 @@ void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLint offset,
void glMapBuffer(GLuint buffer, const GLuint *ranges, GLvoid *data)
void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizei size)
# Textures
-@void glGenTextures(const GLuint *textures)
+void glGenTextures(const GLuint *textures)
void glBindTexture(GLenum target, GLuint texture)
void glActiveTexture(GLenum texture)
void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
diff --git a/GLES_common/yagl_host_gles_calls.c b/GLES_common/yagl_host_gles_calls.c
index 86c4611..a810c02 100644
--- a/GLES_common/yagl_host_gles_calls.c
+++ b/GLES_common/yagl_host_gles_calls.c
@@ -519,7 +519,6 @@ void yagl_host_glGenTextures(const GLuint *textures, int32_t textures_count)
yagl_transport_begin(t, yagl_api_id_gles, 35, 2 * 8, 0 * 8 + yagl_transport_array_size(textures, textures_count, sizeof(GLuint)));
yagl_transport_put_out_array(t, textures, textures_count, sizeof(GLuint));
yagl_transport_end(t);
- yagl_transport_flush(t, NULL);
}
/*