Add fixes for video360 issue 99/181899/3
authorVladislav Andresov <v.andresov@partner.samsung.com>
Mon, 18 Jun 2018 19:55:58 +0000 (22:55 +0300)
committerVladislav Andresov <v.andresov@partner.samsung.com>
Wed, 27 Jun 2018 15:09:26 +0000 (18:09 +0300)
- set internal format GL_RGBA as default
  for texture images;

- fix creating of dummy VIGS surfaces while
  eglCreatePbufferSurface is called with zero sizes.

Change-Id: Ic08c464fc010b9b01a5b893f392d589b531bb4bf
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
EGL/yagl_onscreen_surface.c
GLES_common/yagl_gles_texture.c

index e1a3612f2bd438f6de3a384360aca1c41ae46ef7..042a766822f9648698bd1560de912a2bf446961e 100644 (file)
@@ -438,6 +438,14 @@ struct yagl_onscreen_surface
         }
     }
 
+    /*
+     * VIGS driver is unable to handle dummy surfaces
+     */
+
+    if (width * height == 0) {
+        width = height = 1;
+    }
+
     sfc->tmp_pixmap = dpy->native_dpy->create_pixmap(dpy->native_dpy,
                                                      width,
                                                      height,
index 19382f4b4bc9f810b580d35c02d4590733071828..e0f5e3d1735d5ab55fcf07375a0343bc338a3df4 100644 (file)
@@ -272,6 +272,7 @@ void yagl_gles_texture_set_image(struct yagl_gles_texture *texture,
 
     texture->global_name = image->tex_global_name;
     texture->image = image;
+    texture->internalformat = GL_RGBA;
 
 bind:
     yagl_host_glBindTexture(texture->target == GL_TEXTURE_EXTERNAL_OES ? GL_TEXTURE_2D : texture->target,