platform/adaptation/emulator/emulator-yagl.git
10 years agoYaGL: Enable SRGB framebuffer 99/16399/1
Stanislav Vorobiov [Sat, 15 Feb 2014 09:37:44 +0000 (13:37 +0400)]
YaGL: Enable SRGB framebuffer

GLESv3 has SRGB framebuffer turned on by default

Change-Id: I2bb9f027059f5150120f7ae3315f36a7d056ce83

10 years agoYaGL: Various format validation fixes 97/16397/1
Stanislav Vorobiov [Fri, 14 Feb 2014 13:51:42 +0000 (17:51 +0400)]
YaGL: Various format validation fixes

Correct validation in glReadPixels, glCopyTexImage2D,
glTexImage3D, glTexStorage3D, etc.

Change-Id: Ifc7e1d99d3d5f72dc6e8d81ed717c92c8923d414

10 years agoYaGL: Fixed drawing calls without vertex array pointer 83/16083/1
Stanislav Vorobiov [Thu, 6 Feb 2014 08:39:00 +0000 (12:39 +0400)]
YaGL: Fixed drawing calls without vertex array pointer

The right thing to do here is crash, that's what host
OpenGL drivers do, but we don't want to crash on host, we
want to crash the app on target

Change-Id: I4d92076352775f17bbc3ab8db9b70422beb88a43

10 years agoYaGL: Expose GLESv2 extensions in GLESv3 contexts 82/16082/1
Stanislav Vorobiov [Thu, 6 Feb 2014 07:29:10 +0000 (11:29 +0400)]
YaGL: Expose GLESv2 extensions in GLESv3 contexts

This sounds illogical, but adreno does this. Also, khronos CTS 3.0
attempts to test GLESv2 extensions with GLESv3 context, so
it's probably ok

Change-Id: Ie5f9940ce9fe7b57e6c5ec411d76942245607071

10 years agoYaGL: Better pixel format handling and validation 56/16056/1
Stanislav Vorobiov [Wed, 5 Feb 2014 15:59:29 +0000 (19:59 +0400)]
YaGL: Better pixel format handling and validation

We introduce yagl_pixel_format that is now used to describe
pixel formats, it's also capable of doing target <-> host conversions.
This is much better than old approach, it allows us to have all
format descriptions in one place, validation is also easier and
adding new format is a matter of adding new yagl_pixel_format

Change-Id: I81cedb55ef2f871420aaf80c7b9d47d9fbf9aca2

10 years agoYaGL: Minor fixes 10/16010/1
Stanislav Vorobiov [Tue, 4 Feb 2014 15:41:59 +0000 (19:41 +0400)]
YaGL: Minor fixes

* yagl_gles_get_stride made static, it's now only used inside yagl_gles_utils.c
* removed assert(count > 0) from yagl_gles2_context_pre_draw, this can happen
  on integer overflow and it's normal

Change-Id: I246a501288a7e8f115d96e76b8eefc7c6b3acfc4

10 years agoYaGL: Fixes for khronos CTS 3.0 / uniform_buffer_object 97/15997/1
Stanislav Vorobiov [Tue, 4 Feb 2014 10:47:45 +0000 (14:47 +0400)]
YaGL: Fixes for khronos CTS 3.0 / uniform_buffer_object

Change-Id: I81e7dbb3b5ca04cf0849a0af57f8bfd6fc3804d2

10 years agoYaGL: Fixed vertex attribute 0 problem 87/15987/1
Stanislav Vorobiov [Tue, 4 Feb 2014 08:08:24 +0000 (12:08 +0400)]
YaGL: Fixed vertex attribute 0 problem

Host OpenGL vertex attribute 0 is "magic", OpenGL ES
vertex attribute 0 is usual, we now handle this properly

Change-Id: Ic3e4a021f17c0e1cff18248c4a8f32fe2e260b38

10 years agoYaGL: Fixed khronos CTS 3.0 host crashes 72/15972/1
Stanislav Vorobiov [Mon, 3 Feb 2014 10:08:33 +0000 (14:08 +0400)]
YaGL: Fixed khronos CTS 3.0 host crashes

Change-Id: If46861bb32664c86d9f40018bd611fe12d2f5cdd

10 years agoYaGL: Some more minor fixes for khronos CTS 3.0 71/15971/1
Stanislav Vorobiov [Mon, 3 Feb 2014 09:42:17 +0000 (13:42 +0400)]
YaGL: Some more minor fixes for khronos CTS 3.0

Change-Id: If8cbec23351b9f91d822ff11e4b138d3e5ef05e2

10 years agoYaGL: Fixes for khronos CTS 3.0 / ES30 GLCoverage 70/15970/1
Stanislav Vorobiov [Mon, 3 Feb 2014 07:08:37 +0000 (11:08 +0400)]
YaGL: Fixes for khronos CTS 3.0 / ES30 GLCoverage

Change-Id: Ia18a7846faac041e7b75e0b4877cd70528e8dfc5

10 years agoYaGL: GLESv3 function stub file removed 42/15942/1
Stanislav Vorobiov [Fri, 31 Jan 2014 11:33:37 +0000 (15:33 +0400)]
YaGL: GLESv3 function stub file removed

All GLESv3 functions have been implemented, so no
need for dummy.c anymore. Remaining functions were
program binary related, we don't support them for now,
so they just generate GL_INVALID_OPERATION

Change-Id: I6f020406c422eabb35eaefd47ea4463b6ce183c7

10 years agoYaGL: glDrawRangeElements implemented 41/15941/1
Stanislav Vorobiov [Fri, 31 Jan 2014 11:03:51 +0000 (15:03 +0400)]
YaGL: glDrawRangeElements implemented

Change-Id: I5e885bfc96992505863febd400e420ea9f7f309d

10 years agoYaGL: glGetFragDataLocation implemented 40/15940/1
Stanislav Vorobiov [Fri, 31 Jan 2014 10:23:34 +0000 (14:23 +0400)]
YaGL: glGetFragDataLocation implemented

Change-Id: Idd5428a0da0cc02cda08e584f78bb4786e8449b3

10 years agoYaGL: glFramebufferTexture3D dummy 39/15939/1
Stanislav Vorobiov [Fri, 31 Jan 2014 09:57:29 +0000 (13:57 +0400)]
YaGL: glFramebufferTexture3D dummy

We can implement glFramebufferTexture3D, but it's not
needed for GLESv3, so we just place a dummy for now

Change-Id: I6e74a2d83056df8a71a8739403c910bf2dfd92fa

10 years agoYaGL: Implemented glUniformMatrixAxBfv 38/15938/1
Stanislav Vorobiov [Fri, 31 Jan 2014 09:50:29 +0000 (13:50 +0400)]
YaGL: Implemented glUniformMatrixAxBfv

Change-Id: I582da14c8bfba8721abd5c333b4724f0014a406b

10 years agoYaGL: glClearBuffer and glInvalidateSubFramebuffer implemented 37/15937/1
Stanislav Vorobiov [Fri, 31 Jan 2014 09:12:56 +0000 (13:12 +0400)]
YaGL: glClearBuffer and glInvalidateSubFramebuffer implemented

glInvalidateSubFramebuffer is currently a no-op

Change-Id: Ic2fd7d5cf1872f69dca466016b2196b7e13c1cfe

10 years agoYaGL: Integer vertex attributes and uniforms supported 36/15936/1
Stanislav Vorobiov [Fri, 31 Jan 2014 08:20:42 +0000 (12:20 +0400)]
YaGL: Integer vertex attributes and uniforms supported

Change-Id: I3f6d7ab114f627da0463eb6bc0898e7a6d6629fb

10 years agoYaGL: 64-bit parameter queries and indexed queries implemented 25/15925/1
Stanislav Vorobiov [Thu, 30 Jan 2014 14:56:38 +0000 (18:56 +0400)]
YaGL: 64-bit parameter queries and indexed queries implemented

Change-Id: I8b9f797b1de8190699e6411959d1e162284101c6

10 years agoYaGL: EGL_KHR_fence_sync and GLESv3 sync objects implemented 18/15918/1
Stanislav Vorobiov [Fri, 24 Jan 2014 14:19:11 +0000 (18:19 +0400)]
YaGL: EGL_KHR_fence_sync and GLESv3 sync objects implemented

Change-Id: I99eb93e66f2614306e9e91de20b46a46dff727cb

10 years agoYaGL: GL_EXT_unpack_subimage and GL_NV_pack_subimage implemented 83/15583/1
Stanislav Vorobiov [Thu, 23 Jan 2014 16:06:53 +0000 (20:06 +0400)]
YaGL: GL_EXT_unpack_subimage and GL_NV_pack_subimage implemented

Change-Id: I56d770ae18273ee9c2d1a6c28c4a375fe9028d46

10 years agoYaGL: GL_OES_compressed_ETC1_RGB8_texture implemented 75/15575/1
Stanislav Vorobiov [Thu, 23 Jan 2014 11:51:07 +0000 (15:51 +0400)]
YaGL: GL_OES_compressed_ETC1_RGB8_texture implemented

Change-Id: Ic2dff3f5b7b219919ff5013819063a6036f34c3a

10 years agoYaGL: Buffer object copying implemented 13/15513/1
Stanislav Vorobiov [Wed, 22 Jan 2014 12:58:02 +0000 (16:58 +0400)]
YaGL: Buffer object copying implemented

Change-Id: Ic98ee60fcf3c967374402c6a619584ce5129d756

10 years agoYaGL: Multisampled renderbuffer implemented 04/15504/1
Stanislav Vorobiov [Wed, 22 Jan 2014 11:07:09 +0000 (15:07 +0400)]
YaGL: Multisampled renderbuffer implemented

This is basically glRenderbufferStorageMultisample
part of GL_EXT_multisampled_render_to_texture

Change-Id: Id2b14ab759d1a88c22ae3dd216591ebbfb4f1ac3

10 years agoYaGL: GL_NV_read_buffer implemented 03/15503/1
Stanislav Vorobiov [Wed, 22 Jan 2014 10:48:54 +0000 (14:48 +0400)]
YaGL: GL_NV_read_buffer implemented

Change-Id: Id6fbcd6a8c175a99c2263064bd8a4bf4683ad573

10 years agoYaGL: Full GL_NV_pixel_buffer_object support 97/15497/1
Stanislav Vorobiov [Wed, 22 Jan 2014 09:15:37 +0000 (13:15 +0400)]
YaGL: Full GL_NV_pixel_buffer_object support

Change-Id: Id1ac9c7cc4b17cac12a52a2598446dc362d314d1

10 years agoYaGL: Fix get_stride bug 96/15496/1
Stanislav Vorobiov [Wed, 22 Jan 2014 06:16:18 +0000 (10:16 +0400)]
YaGL: Fix get_stride bug

Change-Id: I57c6dec95cc9c4f85062f79b23070412fb58b97a

10 years agoYaGL: Implemented GL_OES_texture_3D compressed API 54/15454/1
Stanislav Vorobiov [Tue, 21 Jan 2014 09:04:32 +0000 (13:04 +0400)]
YaGL: Implemented GL_OES_texture_3D compressed API

Compressed API part of GL_OES_texture_3D is now
implemented

Change-Id: Ie53238ef69a33715c75202549a6027191b0c84e3

10 years agoYaGL: Basic GL_NV_pixel_buffer_object support 53/15453/1
Stanislav Vorobiov [Tue, 21 Jan 2014 08:00:13 +0000 (12:00 +0400)]
YaGL: Basic GL_NV_pixel_buffer_object support

Automatic PBO transfers between host and guest not
implemented yet

Change-Id: I48e171983ff7c8b4be2adaf6a1d70952e6e8075b

10 years agoYaGL: GL_EXT_texture_storage fixed 52/15452/1
Stanislav Vorobiov [Mon, 20 Jan 2014 14:11:23 +0000 (18:11 +0400)]
YaGL: GL_EXT_texture_storage fixed

We can't simply specify GL_BGRA and GL_UNSIGNED_BYTE in
glTexStorage implementations, format and type must match
internalformat

Change-Id: Ifda341614e1ab2b2d1ce653ab2e11d541aad19aa

10 years agoYaGL: GL_EXT_texture_storage implemented 51/15451/1
Stanislav Vorobiov [Mon, 20 Jan 2014 08:37:05 +0000 (12:37 +0400)]
YaGL: GL_EXT_texture_storage implemented

Change-Id: I1e8c1431a06cc01bd4987457492cc604b7d4a30d

10 years agoYaGL: Fix YAGL_NUM_GLES_TEXTURE_TARGETS
Stanislav Vorobiov [Sun, 19 Jan 2014 11:32:04 +0000 (15:32 +0400)]
YaGL: Fix YAGL_NUM_GLES_TEXTURE_TARGETS

10 years agoYaGL: Samplers implemented 79/15279/1
Stanislav Vorobiov [Fri, 17 Jan 2014 15:59:26 +0000 (19:59 +0400)]
YaGL: Samplers implemented

Change-Id: I90b08b9cf07b97daa4578de8925f15fa97b34c0a

10 years agoYaGL: Add more functions to GLESv3 dummy 78/15278/1
Stanislav Vorobiov [Fri, 17 Jan 2014 13:40:36 +0000 (17:40 +0400)]
YaGL: Add more functions to GLESv3 dummy

This is to make GFXBench compile. Also, add asserts
so we can see what function is required and implement
it

Change-Id: I634501fec106cb5911af39c330127f480193a95d

10 years agoYaGL: 2D array textures implemented 82/15182/1
Stanislav Vorobiov [Thu, 16 Jan 2014 16:26:54 +0000 (20:26 +0400)]
YaGL: 2D array textures implemented

Change-Id: I05c38628280c15d8a0221f186694d81e89dafff0

10 years agoYaGL: TODO GL_OES_texture_3D 81/15181/1
Stanislav Vorobiov [Thu, 16 Jan 2014 10:09:05 +0000 (14:09 +0400)]
YaGL: TODO GL_OES_texture_3D

Will implement remaining functionality later,
currently it's hard to test it, since there're no
samples/test that cover these

Change-Id: I147ceda77fd13c7f3be32ac6206aa42c6cce8e0f

10 years agoYaGL: Basic GL_OES_texture_3D functionality implemented 80/15180/1
Stanislav Vorobiov [Wed, 20 Nov 2013 07:59:52 +0000 (11:59 +0400)]
YaGL: Basic GL_OES_texture_3D functionality implemented

Change-Id: I764c9ab539a0b0736506648d3d72b0a6deef2711

10 years agoMerge remote-tracking branch 'origin/tizen' into glesv3 62/15062/1
Stanislav Vorobiov [Wed, 15 Jan 2014 08:01:43 +0000 (12:01 +0400)]
Merge remote-tracking branch 'origin/tizen' into glesv3

Conflicts:
EGL/yagl_egl_calls.c
EGL/yagl_state.c
GLES_common/yagl_gles_calls.c
GLES_common/yagl_host_gles_calls.c
GLESv2/yagl_gles2_context.c

Change-Id: Ibc911f6538e6e3d805e95196d1748c3381db2495

10 years agoYaGL: invalidate after eglSwapBuffers only on X11 42/14842/1
Stanislav Vorobiov [Mon, 13 Jan 2014 06:33:13 +0000 (10:33 +0400)]
YaGL: invalidate after eglSwapBuffers only on X11

We can't remove that invalidate call after
eglSwapBuffers on X11 (see comments in code), but
we can on gbm/wayland

Change-Id: I8a9338db88ddda2a906d527f039f382ba741d591

10 years agoYaGL: Multicore rendering and fence support added 41/14841/1
Stanislav Vorobiov [Thu, 28 Nov 2013 10:48:52 +0000 (14:48 +0400)]
YaGL: Multicore rendering and fence support added

We now use multicore rendering, i.e. we offload all
rendering to a separate thread and use fences to wait
until certain parts of it are complete. This patch adds
both fence support and modifies transport to allow waiting
for rendering completion on target instead of on host

Change-Id: I20cb7f72544d18583ff92cffa64a47a5cdecff17

10 years agoYaGL: Fix regression in GLESv1_CM 08/13308/1 accepted/tizen/generic accepted/tizen/ivi accepted/tizen/mobile accepted/tizen_generic accepted/tizen_ivi_release tizen_ivi_release accepted/tizen/20131205.214900 accepted/tizen/20131209.172121 accepted/tizen/generic/20140110.145954 accepted/tizen/generic/20140312.101045 accepted/tizen/ivi/20140108.022647 accepted/tizen/ivi/20140108.192409 accepted/tizen/ivi/panda/20140312.092854 accepted/tizen/ivi/panda/20140402.031357 accepted/tizen/ivi/release/20140108.220906 accepted/tizen/ivi/release/20140113.211324 accepted/tizen/ivi/release/20140312.041959 accepted/tizen/ivi/release/20140312.123852 accepted/tizen/ivi/release/20140315.003206 accepted/tizen/ivi/release/20140317.184720 submit/tizen/20131204.061627 submit/tizen/20131206.040731 submit/tizen/20131214.010851 submit/tizen/20140107.222856 submit/tizen/20140108.191637 submit/tizen/20140312.070634 submit/tizen_ivi_panda/20140402.031811 submit/tizen_ivi_release/20140107.223025 submit/tizen_ivi_release/20140113.211354 submit/tizen_ivi_release/20140312.041934 submit/tizen_ivi_release/20140312.071056 submit/tizen_ivi_release/20140315.003422 submit/tizen_ivi_release/20140317.184953
Stanislav Vorobiov [Tue, 3 Dec 2013 08:23:28 +0000 (12:23 +0400)]
YaGL: Fix regression in GLESv1_CM

Array user data needs to be passed always

Change-Id: I3fa68e6367192d43dda8b16fcd0294251146e5a5

10 years agoYaGL: Support EGL_WAYLAND_Y_INVERTED_WL 64/13064/1
Stanislav Vorobiov [Wed, 27 Nov 2013 07:57:57 +0000 (11:57 +0400)]
YaGL: Support EGL_WAYLAND_Y_INVERTED_WL

Change-Id: I9e37871333968c42899ee5a51ff5ff886795a47e

10 years agoYaGL: spec fixed for Tizen IVI 63/13063/1
Stanislav Vorobiov [Wed, 27 Nov 2013 07:57:06 +0000 (11:57 +0400)]
YaGL: spec fixed for Tizen IVI

We now install YaGL to correct locations in
Tizen IVI

Change-Id: I6a1c80b717cc9a6d2b301133bc8978c6bb4701ed

10 years agoYaGL: Don't bind VBO if there's nothing to transfer 03/12903/1
Stanislav Vorobiov [Mon, 25 Nov 2013 14:59:53 +0000 (18:59 +0400)]
YaGL: Don't bind VBO if there's nothing to transfer

Instead of binding VBOs every draw call we bind it
once in glVertexAttribPointer and friends. We bind
it on draw calls only if there's data to be transferred

Change-Id: I59b0f893acfab2eb4115ff0df7d40ec348722659

10 years agoYaGL: Remove remaining dependencies on GL_ARB_ES2_compatibility 60/12760/1
Stanislav Vorobiov [Thu, 21 Nov 2013 10:32:48 +0000 (14:32 +0400)]
YaGL: Remove remaining dependencies on GL_ARB_ES2_compatibility

We still had some dependencies on GL_ARB_ES2_compatibility.
Mac OS X doesn't implement GL_ARB_ES2_compatibility, because
of that WebGL didn't work

Change-Id: Ib6941f61065d84e3b41a028b2071db5d28628dd6

10 years agoYaGL: Fix ETC2 RG11 texture unpacking 27/13127/1
Stanislav Vorobiov [Tue, 19 Nov 2013 12:44:52 +0000 (16:44 +0400)]
YaGL: Fix ETC2 RG11 texture unpacking

Blue component should be set to 0 explicitly
or else it'll contain garbage

Change-Id: I33464491ff7ea14548f50083929d0b0432cd4568

10 years agoYaGL: ETC2 compressed texture formats implemented 26/13126/1
Stanislav Vorobiov [Tue, 19 Nov 2013 11:00:40 +0000 (15:00 +0400)]
YaGL: ETC2 compressed texture formats implemented

We'll try to use host's implementation when possible, when
it's not possible we'll fall back to software implementation
which is taken from mesa. The code in mesa is in turn taken
from LunarG and is licensed under MIT license which allows
us to use it

Change-Id: I006dc334c18fa4ecc5637230e46186f9710807da

10 years agoYaGL: GL_EXT_instanced_arrays full support 25/13125/1
Stanislav Vorobiov [Fri, 15 Nov 2013 12:44:32 +0000 (16:44 +0400)]
YaGL: GL_EXT_instanced_arrays full support

Change-Id: I94a14f9c722b28e994ee9855cfe84d8e10a32332

10 years agoYaGL: Fixed shader preprocessing 24/13124/1
Stanislav Vorobiov [Fri, 15 Nov 2013 10:00:23 +0000 (14:00 +0400)]
YaGL: Fixed shader preprocessing

Things like this:

can be present in shader code and the code inside
extension is available on host.

As a workaround we find all GL_xxx_yyy tokens and if it's
not a OpenGL ES extension we replace it with ND_xxx_yyy, thus
making sure that the code inside such #ifdef's won't be compiled.
When GL_xxx_yyy is not a preprocessor token it's not a
problem either, it'll be replaced in all places, thus,
shader will operate correctly

Change-Id: Id23f790c1c2a67f1a188e0161d20832e589a24d0

10 years agoYaGL: Add GLESv3 function stubs in order to run khronos cts es 3.0 23/13123/1
Stanislav Vorobiov [Thu, 14 Nov 2013 17:08:43 +0000 (21:08 +0400)]
YaGL: Add GLESv3 function stubs in order to run khronos cts es 3.0

Change-Id: I862a0a9e33488821bd259fe2df9fafe12466cdfe

10 years agoYaGL: GL_EXT_instanced_arrays initial support 22/13122/1
Stanislav Vorobiov [Thu, 14 Nov 2013 15:02:07 +0000 (19:02 +0400)]
YaGL: GL_EXT_instanced_arrays initial support

glDrawArraysInstanced and glDrawElementsInstanced
are supported. glVertexAttribDivisor to be
implemented

Change-Id: Ie6e184bba9bd148342f09aa7732d231de1b70574

10 years agoYaGL: GL_OES_element_index_uint implemented 21/13121/1
Stanislav Vorobiov [Thu, 14 Nov 2013 07:33:22 +0000 (11:33 +0400)]
YaGL: GL_OES_element_index_uint implemented

Change-Id: I98b5aed1e5838899c2d8b37bbfb2cf9f09fbc2a5

10 years agoYaGL: Fix glGet for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 20/13120/1
Stanislav Vorobiov [Wed, 13 Nov 2013 11:50:02 +0000 (15:50 +0400)]
YaGL: Fix glGet for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING

Change-Id: I677e5e89cf26831936762a8f91117b4190b62032

10 years agoYaGL: Occlusion queries implemented 19/13119/1
Stanislav Vorobiov [Wed, 13 Nov 2013 11:23:07 +0000 (15:23 +0400)]
YaGL: Occlusion queries implemented

Change-Id: I3029823126f229a5f4e2931235a15a178bee7efa

10 years agoYaGL: Queries support implemented 18/13118/1
Stanislav Vorobiov [Wed, 13 Nov 2013 10:36:35 +0000 (14:36 +0400)]
YaGL: Queries support implemented

Change-Id: Ifd7de09a920974d526432403895e043fd55967d3

10 years agoYaGL: Transform feedback initial support 17/13117/1
Stanislav Vorobiov [Wed, 13 Nov 2013 07:50:29 +0000 (11:50 +0400)]
YaGL: Transform feedback initial support

Transform feedback objects and buffers are implemented,
all transform feedback operations are also implemented.
Still needs validations in drawing calls and
transform feedback buffers aren't updated on transform
feedback completion yet

Change-Id: I1534003bdb9257e7101be9206057247546fc4001

10 years agoYaGL: Remaining uniform APIs implemented 16/13116/1
Stanislav Vorobiov [Mon, 11 Nov 2013 13:40:41 +0000 (17:40 +0400)]
YaGL: Remaining uniform APIs implemented

glGetActiveUniformBlockName and glGetActiveUniformBlockiv
implemented

Change-Id: Ib4499a39d8ac66b1f9f4e96a4bd10c8a8e8863d2

10 years agoYaGL: More uniform APIs implemented 15/13115/1
Stanislav Vorobiov [Mon, 11 Nov 2013 10:21:54 +0000 (14:21 +0400)]
YaGL: More uniform APIs implemented

glGetUniformBlockIndex and glUniformBlockBinding implemented

Change-Id: I7aab39fb4bc3213c8fce49a9489fa7cd28d47707

10 years agoYaGL: glGetUniformIndices implemented 14/13114/1
Stanislav Vorobiov [Fri, 8 Nov 2013 16:11:22 +0000 (20:11 +0400)]
YaGL: glGetUniformIndices implemented

Change-Id: I00a5b02653f274be1b03ad79f848eef4e7aa0e2d

10 years agoYaGL: glGetActiveUniformsiv implemented 13/13113/1
Stanislav Vorobiov [Fri, 8 Nov 2013 13:23:50 +0000 (17:23 +0400)]
YaGL: glGetActiveUniformsiv implemented

Change-Id: I83fb22f385616b4ba6dd6b59c811cc3d373e5b91

10 years agoYaGL: Simplified active variable caching 12/13112/1
Stanislav Vorobiov [Fri, 8 Nov 2013 10:20:40 +0000 (14:20 +0400)]
YaGL: Simplified active variable caching

Instead of keeping a vector and expanding
it whenever user queries new variable and trying
to guess if a variable name is complete or not
we simply query all these parameters from a program
object on link and use them. This does not degrade
performance since the user will query at
least for GL_LINK_STATUS anyway after program is
linked

Change-Id: I4ce1bd381287b5f5fcfa1b7b4ca7e236bf9b7724

10 years agoYaGL: Basic uniform buffer object support 11/13111/1
Stanislav Vorobiov [Thu, 7 Nov 2013 15:13:03 +0000 (19:13 +0400)]
YaGL: Basic uniform buffer object support

Just preparing grounds here. For now we can
bind/unbind/query generic uniform buffer target
and bind/unbind indexed uniform buffer target

Change-Id: I496fb2d0ea161a2167c2ac3a411529860c370d66

10 years agoYaGL: GL_OES_mapbuffer and GL_EXT_map_buffer_range implemented 10/13110/1
Stanislav Vorobiov [Thu, 7 Nov 2013 08:07:10 +0000 (12:07 +0400)]
YaGL: GL_OES_mapbuffer and GL_EXT_map_buffer_range implemented

Change-Id: I1c70ecaec48fe18b355a9d66690e638e929d555e

10 years agoYaGL: Separated GLESv2/GLESv3 shader processing 09/13109/1
Stanislav Vorobiov [Wed, 6 Nov 2013 07:58:53 +0000 (11:58 +0400)]
YaGL: Separated GLESv2/GLESv3 shader processing

GLESv3 can run ES3 shaders which require separate
processing, this code is now inside yagl_gles3_context.
Only GL_ARB_ES3_compatibility case is supported for now,
other cases will be supported later

Change-Id: I22caea6b4500e52dd1369d4b9d90d4beeb4b75ab

10 years agoYaGL: GL_EXT_draw_buffers implemented 08/13108/1
Stanislav Vorobiov [Tue, 5 Nov 2013 15:51:43 +0000 (19:51 +0400)]
YaGL: GL_EXT_draw_buffers implemented

Change-Id: I1a15a6e8b7bf7be93c44122efee97a9887931645

10 years agoYaGL: GL_ANGLE_framebuffer_blit implemented 07/13107/1
Stanislav Vorobiov [Tue, 5 Nov 2013 11:33:35 +0000 (15:33 +0400)]
YaGL: GL_ANGLE_framebuffer_blit implemented

Change-Id: Ib33968c3016e99e063a7f17bcc43b014ed0a51df

10 years agoYaGL: Complete VAO support 06/13106/1
Stanislav Vorobiov [Tue, 5 Nov 2013 07:12:32 +0000 (11:12 +0400)]
YaGL: Complete VAO support

GL_OES_vertex_array_object now fully supported

Change-Id: Ieb9a425e301090dba53efc2f7baa3012c229c7a0

10 years agoYaGL: Add OpenGL 3.1 without ES3 to supported versions 05/13105/1
Stanislav Vorobiov [Tue, 5 Nov 2013 05:46:16 +0000 (09:46 +0400)]
YaGL: Add OpenGL 3.1 without ES3 to supported versions

Even if OpenGL 3.1 doesn't support GL_ARB_ES3_compatibility
we still should use it instead of 2.1 because in case of mesa
3.1 has much smaller memory footprint

Change-Id: I141a8b8da3bfac8a3b86a4fcafa132703ff18b54

10 years agoYaGL: glCopyTexImage2D TODO 04/13104/1
Stanislav Vorobiov [Fri, 1 Nov 2013 11:21:00 +0000 (15:21 +0400)]
YaGL: glCopyTexImage2D TODO

glCopyTexImage2D should be fixed for
OpenGL 3.1 core profile. Will do that later

Change-Id: Id8b2d808d3ae01f086207b98c01af4500743fdde

10 years agoYaGL: Fix GL_POINT_SPRITE 03/13103/1
Stanislav Vorobiov [Thu, 31 Oct 2013 14:08:52 +0000 (18:08 +0400)]
YaGL: Fix GL_POINT_SPRITE

In OpenGL 3.1 core profile GL_POINT_SPRITE is
always enabled, don't call glEnable

Change-Id: Iaab5da9ac1fb9728a43ffe74055dceb5247cdfac

10 years agoYaGL: Fix OpenGL 2.1 specific texture formats support 02/13102/1
Stanislav Vorobiov [Wed, 30 Oct 2013 13:31:27 +0000 (17:31 +0400)]
YaGL: Fix OpenGL 2.1 specific texture formats support

In OpenGL 3.1 core profile GL_ALPHA, GL_LUMINANCE and
GL_LUMINANCE_ALPHA are not supported, therefore these
texture formats have to be emulated

Change-Id: Ibf682d8f87cb55804905cecc5fa74018977e863b

11 years agoYaGL: Basic VAO support 01/13101/1
Stanislav Vorobiov [Tue, 22 Oct 2013 15:27:08 +0000 (19:27 +0400)]
YaGL: Basic VAO support
YaGL: Framebuffer object sharing changed

In OpenGL 3.1 core we can't work without VAOs, so at least
one VAO has to be created and bound. We currently have only basic
support that creates a single VAO in context preparation callback
and binds it.
In OpenGL 2.1 there're no VAOs, but for simplicity we'll just have
one single fake VAO in this case.

According to GLESv2 spec. framebuffer object sharing behavior
is undefined, but GLESv3 spec. states that framebuffer objects
are not shared between contexts. Previously our framebuffer
objects were shared between contexts, now they're not.

Change-Id: I7d7267495caffc7056100d014e063698646a32f6

11 years agoYaGL: GLESv3 supported in EGL 00/13100/1
Stanislav Vorobiov [Tue, 22 Oct 2013 10:14:05 +0000 (14:14 +0400)]
YaGL: GLESv3 supported in EGL

Change-Id: Ife98eb6614f8371bd79f93e57db5fade0dabd0fe

11 years agoYaGL: Some GLESv3 dummies 99/13099/1
Stanislav Vorobiov [Fri, 18 Oct 2013 11:44:22 +0000 (15:44 +0400)]
YaGL: Some GLESv3 dummies

Change-Id: Idb715f8aca289322cd975bb0002d5bb6b47ed1a5

11 years agoYaGL: Headers updated 98/13098/1
Stanislav Vorobiov [Fri, 18 Oct 2013 08:31:19 +0000 (12:31 +0400)]
YaGL: Headers updated

KHR, EGL, GLESv1 and GLESv2 headers updated from khronos.org
GLESv3 headers added

Change-Id: I8d5650a38dc79777c4b5309ebedcc10a6628206a

11 years agoYaGL: Batching improved 79/11079/1
Stanislav Vorobiov [Tue, 1 Oct 2013 04:51:51 +0000 (08:51 +0400)]
YaGL: Batching improved

The improvements are:

* State tracking is moved completely from host to target,
  this allows executing many OpenGL functions such as state queries
  without doing vmexits
* The results of some functions that do require a vmexit are now cached on
  target, so that subsequent calls are performed faster
* Lazy object (such as textures, shaders, etc.) creation implemented, this
  allows batching calls such as glGenXXX, which significatly improves
  performance in some cases
* Shader variable location generation on target allows one to batch
  glGetXXXLocation calls, this significantly improves performance, but
  causes a khronos conformance test fail for glGetXXXLocation, since it's not
  possible to know if a particular name really exists inside a shader or
  not without doing a vmexit. Just for this we introduce YAGL_CONFORMANT
  environment variable that turns off location generation, thus, trades
  performance for conformance
* eglMakeCurrent is now batched, this also improves performance in case if
  an app makes a lot of context switches

The results of these improvements are:

* Up to 95% (was ~60%) GPU usage with pure X.Org server, up
  to 85-90% (was ~50%) GPU usage on current Tizen filesystem
  with onscreen backend
* Up to 50% performance improvement with onscreen backend
* Turning on pageflip in X.Org VIGS video driver now makes sense, it now
  gives a visible performance improvement

Change-Id: Ic99a6bb1a501f15ce0dc9b90aeb10beaa5934e38

11 years agoYaGL: Transport improved 78/11078/1
Stanislav Vorobiov [Tue, 17 Sep 2013 14:52:46 +0000 (18:52 +0400)]
YaGL: Transport improved

The improvements are:

* All transport related things are now inside yagl_transport, the code
  is now concentrated in a single place instead of being scattered
  all over
* No more direct memory fault in and page fault checking, this is now
  handled inside yagl_transport. This, in particular, makes interface
  much cleaner, no more "while (!yagl_host_glXXX(...)) {}" stuff
* Code generator rewritten in python, this makes it much easier to read
  and support as well as code generation is now much faster
* No more mlock/munlock. YaGL driver now has ioctls for locking drawable
  memory so that compile transfers could be created on host. This
  is only used by offscreen backend though
* It's now possible to marshal arrays, for small arrays it's more
  efficient than accessing them using page lookup on host. And again, this
  is done internally in yagl_transport
* We're now using a single buffer for marshalling instead of two: one
  for commands and one for data. Also, the buffer can now be of any
  size up to 2M, it's implemented as a page list, thus, we don't need
  to allocate contigous memory anymore
* Max buffer size and max call size can now be tweaked using
  environment variables. This helps testing how buffer size influences
  performance

Change-Id: I0b25ea3ec578ef1120436297baf32c7222a92b03

11 years agoMerge branch 'sdk-develop' into tizen
Yeongkyoon Lee [Thu, 26 Sep 2013 09:17:07 +0000 (18:17 +0900)]
Merge branch 'sdk-develop' into tizen

Change-Id: Ia0ccddf73715d3b7ad22bd1c5fdb13612aaf4068

11 years agoInitial empty repository master
Sehong Na [Thu, 12 Sep 2013 05:45:42 +0000 (22:45 -0700)]
Initial empty repository

11 years agoYaGL: Register pthread_atfork handler
Stanislav Vorobiov [Wed, 28 Aug 2013 10:51:57 +0000 (14:51 +0400)]
YaGL: Register pthread_atfork handler

Consider the following scenario:
1. Some process makes GL call, such as eglGetDisplay. This
   initializes YaGL state, opens YaGL device and mmaps memory
   from it
2. The process calls fork
3. The child make some GL call, such as eglGetDisplay. At this
   point YaGL state was already initialized in parent, thus, child
   process will use parent's fd and maps. Bad!

This patch registers pthread_atfork handler which effectively
closes all parent YaGL resources and resets YaGL state as if
it haven't been used before

Change-Id: I2e0b3e7fbc22f61cb3df601df8b6f6cf8f0ff827

11 years agoYaGL: EGL_EXT_buffer_age implemented
Stanislav Vorobiov [Thu, 22 Aug 2013 14:58:32 +0000 (18:58 +0400)]
YaGL: EGL_EXT_buffer_age implemented

Change-Id: I284667036114e88ea954a6c965e4eba8bd240f81

11 years agoYaGL: We don't support cursors
Stanislav Vorobiov [Thu, 22 Aug 2013 10:35:59 +0000 (14:35 +0400)]
YaGL: We don't support cursors

Change-Id: I4eb27202c48ce75588b3716dfa97e2b8f3d673b7

11 years agoYaGL: Added bo_import support to GBM
Stanislav Vorobiov [Wed, 21 Aug 2013 13:10:22 +0000 (17:10 +0400)]
YaGL: Added bo_import support to GBM

Change-Id: I46f68c4f6ae290094167bb7f4077b82f056c5080

11 years agoYaGL: Handle global remove in wayland display
Stanislav Vorobiov [Wed, 21 Aug 2013 08:19:14 +0000 (12:19 +0400)]
YaGL: Handle global remove in wayland display
YaGL: Take ownership when wayland display is owned

Change-Id: I6f8d48f90844451d58cfe41a0d516352b685d973

11 years agoYaGL: wayland window resize is handled properly
Stanislav Vorobiov [Tue, 20 Aug 2013 11:29:38 +0000 (15:29 +0400)]
YaGL: wayland window resize is handled properly
YaGL: yagl_render_invalidate added before every drawing call

wayland window resizing wasn't handled properly because it didn't
take one case into account:
* OpenGL rendering calls
* wl_egl_window_resize
* Some more OpenGL rendering calls
* eglSwapBuffers
The second pack of rendering calls would acquire the old
back buffer which was allocated before wl_egl_window_resize. Now
it's fixed and second pack of rendering calls would reallocate
the back buffer

yagl_render_invalidate calls are needed not only before glClear and
glViewport, but before all drawing calls. Some clients don't use
glClear/glViewport before starting rendering

Change-Id: I559f6ac681972d93f6aa3f98d7e5539d2b364a1c

11 years agoYaGL: Revert back to old-style wl_drm_buffer
Stanislav Vorobiov [Thu, 15 Aug 2013 14:47:47 +0000 (18:47 +0400)]
YaGL: Revert back to old-style wl_drm_buffer

Tizen IVI does use wayland 1.2, but still relies on
1.0-based mesa, thus, we can't have wayland 1.2 style
wl_drm_buffer yet, it'll break nested compositors

Change-Id: I88a28538d162683ba0f27a25067d2d9b56f588f1

11 years agoYaGL: Return error when trying to open NULL display on GBM
Stanislav Vorobiov [Tue, 13 Aug 2013 07:48:11 +0000 (11:48 +0400)]
YaGL: Return error when trying to open NULL display on GBM
YaGL: Allow opening NULL display on wayland

Change-Id: Ie5c90376d788ff6c9204ae74e00662c339decf11

11 years agoYaGL: Fake visual_id and visual_type for GBM/wayland
Stanislav Vorobiov [Mon, 12 Aug 2013 14:55:43 +0000 (18:55 +0400)]
YaGL: Fake visual_id and visual_type for GBM/wayland

Just return 0

Change-Id: I838028d156a9a79629fe1e39d7ed1a0266a86dd7

11 years agoYaGL: Add OpenGL_ES2 to EGL_CLIENT_APIS
Stanislav Vorobiov [Mon, 12 Aug 2013 13:22:36 +0000 (17:22 +0400)]
YaGL: Add OpenGL_ES2 to EGL_CLIENT_APIS

Not needed, but mesa does this, so we also do it
just in case

Change-Id: Ic83ba144850b43db87960f3061c63796fd9a085e

11 years agoYaGL: EGL_KHR_surfaceless_context implemented
Stanislav Vorobiov [Mon, 12 Aug 2013 09:47:10 +0000 (13:47 +0400)]
YaGL: EGL_KHR_surfaceless_context implemented
YaGL: glGetString(GL_VERSION) fixed for GLESv2

EGL_KHR_surfaceless_context is implemented entirely
on host, we only modify EGL extension string here.

glGetString(GL_VERSION) should contain "OpenGL ES" substring,
cairo checks this to see if it's running desktop or ES flavor

Change-Id: I540f960e5cce79938f9f3aad4ee451ae11da3396

11 years agoYaGL: wayland platform added
Stanislav Vorobiov [Mon, 5 Aug 2013 15:31:53 +0000 (19:31 +0400)]
YaGL: wayland platform added

Change-Id: Ife2fa6fde03f956d7753987e7d09deda4cf1bff7

11 years agoYaGL: GL_EXT_texture_format_BGRA8888 implemented
Stanislav Vorobiov [Mon, 5 Aug 2013 08:50:48 +0000 (12:50 +0400)]
YaGL: GL_EXT_texture_format_BGRA8888 implemented

Change-Id: I8e651600e99a6ff6f034162f90761cb1a7c94973

11 years agoYaGL: glFinish removed, using single render finish call
Stanislav Vorobiov [Fri, 2 Aug 2013 13:46:37 +0000 (17:46 +0400)]
YaGL: glFinish removed, using single render finish call
YaGL: pbuffer regression fixed

Change-Id: I0ce84b2ebb71b39d4afdfe09b5f913c986df25bb

11 years agoYaGL: GBM platform added
Stanislav Vorobiov [Fri, 2 Aug 2013 11:33:18 +0000 (15:33 +0400)]
YaGL: GBM platform added

Change-Id: I20ce694cf9847e281ff4033a7e593e21015a2493

11 years agoYaGL: GBM implemented
Stanislav Vorobiov [Thu, 1 Aug 2013 12:39:11 +0000 (16:39 +0400)]
YaGL: GBM implemented

Change-Id: I53c9af5e9c848ae304255bedbf1038aedab90570

11 years agoYaGL: Separated windowing system related stuff
Stanislav Vorobiov [Mon, 29 Jul 2013 14:29:07 +0000 (18:29 +0400)]
YaGL: Separated windowing system related stuff

Change-Id: I26b4dfbccd33e7c8ca89e5ef0bddb6d634220ad6

11 years agoYaGL: Changed find mode for programs and project language
Stanislav Vorobiov [Fri, 26 Jul 2013 11:33:48 +0000 (15:33 +0400)]
YaGL: Changed find mode for programs and project language

Change-Id: I8e65f53a3c61759461ba1fba4ceb7f70baad9716

11 years agoYaGL: Changed GLESv2 version to 2.0
Stanislav Vorobiov [Fri, 26 Jul 2013 11:06:27 +0000 (15:06 +0400)]
YaGL: Changed GLESv2 version to 2.0

Change-Id: I06a63563ec8e35b6eb971efbde147ef8678a6024

11 years agoYaGL: Use internal GL headers instead of system ones
Stanislav Vorobiov [Fri, 26 Jul 2013 10:57:39 +0000 (14:57 +0400)]
YaGL: Use internal GL headers instead of system ones

Change-Id: I92f9a8b99d169b046181d6063038d74ea6f2ce2b

11 years agoYaGL: Fixed warnings
Stanislav Vorobiov [Fri, 26 Jul 2013 10:31:42 +0000 (14:31 +0400)]
YaGL: Fixed warnings

Change-Id: I8963ad9159349cd204913d374ae19cb400e0d5a7