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
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
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
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
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
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
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
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
Stanislav Vorobiov [Mon, 3 Feb 2014 10:08:33 +0000 (14:08 +0400)]
YaGL: Fixed khronos CTS 3.0 host crashes
Change-Id: If46861bb32664c86d9f40018bd611fe12d2f5cdd
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
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
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
Stanislav Vorobiov [Fri, 31 Jan 2014 11:03:51 +0000 (15:03 +0400)]
YaGL: glDrawRangeElements implemented
Change-Id: I5e885bfc96992505863febd400e420ea9f7f309d
Stanislav Vorobiov [Fri, 31 Jan 2014 10:23:34 +0000 (14:23 +0400)]
YaGL: glGetFragDataLocation implemented
Change-Id: Idd5428a0da0cc02cda08e584f78bb4786e8449b3
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
Stanislav Vorobiov [Fri, 31 Jan 2014 09:50:29 +0000 (13:50 +0400)]
YaGL: Implemented glUniformMatrixAxBfv
Change-Id: I582da14c8bfba8721abd5c333b4724f0014a406b
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
Stanislav Vorobiov [Fri, 31 Jan 2014 08:20:42 +0000 (12:20 +0400)]
YaGL: Integer vertex attributes and uniforms supported
Change-Id: I3f6d7ab114f627da0463eb6bc0898e7a6d6629fb
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
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
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
Stanislav Vorobiov [Thu, 23 Jan 2014 11:51:07 +0000 (15:51 +0400)]
YaGL: GL_OES_compressed_ETC1_RGB8_texture implemented
Change-Id: Ic2dff3f5b7b219919ff5013819063a6036f34c3a
Stanislav Vorobiov [Wed, 22 Jan 2014 12:58:02 +0000 (16:58 +0400)]
YaGL: Buffer object copying implemented
Change-Id: Ic98ee60fcf3c967374402c6a619584ce5129d756
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
Stanislav Vorobiov [Wed, 22 Jan 2014 10:48:54 +0000 (14:48 +0400)]
YaGL: GL_NV_read_buffer implemented
Change-Id: Id6fbcd6a8c175a99c2263064bd8a4bf4683ad573
Stanislav Vorobiov [Wed, 22 Jan 2014 09:15:37 +0000 (13:15 +0400)]
YaGL: Full GL_NV_pixel_buffer_object support
Change-Id: Id1ac9c7cc4b17cac12a52a2598446dc362d314d1
Stanislav Vorobiov [Wed, 22 Jan 2014 06:16:18 +0000 (10:16 +0400)]
YaGL: Fix get_stride bug
Change-Id: I57c6dec95cc9c4f85062f79b23070412fb58b97a
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
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
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
Stanislav Vorobiov [Mon, 20 Jan 2014 08:37:05 +0000 (12:37 +0400)]
YaGL: GL_EXT_texture_storage implemented
Change-Id: I1e8c1431a06cc01bd4987457492cc604b7d4a30d
Stanislav Vorobiov [Sun, 19 Jan 2014 11:32:04 +0000 (15:32 +0400)]
YaGL: Fix YAGL_NUM_GLES_TEXTURE_TARGETS
Stanislav Vorobiov [Fri, 17 Jan 2014 15:59:26 +0000 (19:59 +0400)]
YaGL: Samplers implemented
Change-Id: I90b08b9cf07b97daa4578de8925f15fa97b34c0a
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
Stanislav Vorobiov [Thu, 16 Jan 2014 16:26:54 +0000 (20:26 +0400)]
YaGL: 2D array textures implemented
Change-Id: I05c38628280c15d8a0221f186694d81e89dafff0
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
Stanislav Vorobiov [Wed, 20 Nov 2013 07:59:52 +0000 (11:59 +0400)]
YaGL: Basic GL_OES_texture_3D functionality implemented
Change-Id: I764c9ab539a0b0736506648d3d72b0a6deef2711
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
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
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
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
Stanislav Vorobiov [Wed, 27 Nov 2013 07:57:57 +0000 (11:57 +0400)]
YaGL: Support EGL_WAYLAND_Y_INVERTED_WL
Change-Id: I9e37871333968c42899ee5a51ff5ff886795a47e
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
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
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
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
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
Stanislav Vorobiov [Fri, 15 Nov 2013 12:44:32 +0000 (16:44 +0400)]
YaGL: GL_EXT_instanced_arrays full support
Change-Id: I94a14f9c722b28e994ee9855cfe84d8e10a32332
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
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
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
Stanislav Vorobiov [Thu, 14 Nov 2013 07:33:22 +0000 (11:33 +0400)]
YaGL: GL_OES_element_index_uint implemented
Change-Id: I98b5aed1e5838899c2d8b37bbfb2cf9f09fbc2a5
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
Stanislav Vorobiov [Wed, 13 Nov 2013 11:23:07 +0000 (15:23 +0400)]
YaGL: Occlusion queries implemented
Change-Id: I3029823126f229a5f4e2931235a15a178bee7efa
Stanislav Vorobiov [Wed, 13 Nov 2013 10:36:35 +0000 (14:36 +0400)]
YaGL: Queries support implemented
Change-Id: Ifd7de09a920974d526432403895e043fd55967d3
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
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
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
Stanislav Vorobiov [Fri, 8 Nov 2013 16:11:22 +0000 (20:11 +0400)]
YaGL: glGetUniformIndices implemented
Change-Id: I00a5b02653f274be1b03ad79f848eef4e7aa0e2d
Stanislav Vorobiov [Fri, 8 Nov 2013 13:23:50 +0000 (17:23 +0400)]
YaGL: glGetActiveUniformsiv implemented
Change-Id: I83fb22f385616b4ba6dd6b59c811cc3d373e5b91
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
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
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
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
Stanislav Vorobiov [Tue, 5 Nov 2013 15:51:43 +0000 (19:51 +0400)]
YaGL: GL_EXT_draw_buffers implemented
Change-Id: I1a15a6e8b7bf7be93c44122efee97a9887931645
Stanislav Vorobiov [Tue, 5 Nov 2013 11:33:35 +0000 (15:33 +0400)]
YaGL: GL_ANGLE_framebuffer_blit implemented
Change-Id: Ib33968c3016e99e063a7f17bcc43b014ed0a51df
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
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
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
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
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
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
Stanislav Vorobiov [Tue, 22 Oct 2013 10:14:05 +0000 (14:14 +0400)]
YaGL: GLESv3 supported in EGL
Change-Id: Ife98eb6614f8371bd79f93e57db5fade0dabd0fe
Stanislav Vorobiov [Fri, 18 Oct 2013 11:44:22 +0000 (15:44 +0400)]
YaGL: Some GLESv3 dummies
Change-Id: Idb715f8aca289322cd975bb0002d5bb6b47ed1a5
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
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
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
Yeongkyoon Lee [Thu, 26 Sep 2013 09:17:07 +0000 (18:17 +0900)]
Merge branch 'sdk-develop' into tizen
Change-Id: Ia0ccddf73715d3b7ad22bd1c5fdb13612aaf4068
Sehong Na [Thu, 12 Sep 2013 05:45:42 +0000 (22:45 -0700)]
Initial empty repository
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
Stanislav Vorobiov [Thu, 22 Aug 2013 14:58:32 +0000 (18:58 +0400)]
YaGL: EGL_EXT_buffer_age implemented
Change-Id: I284667036114e88ea954a6c965e4eba8bd240f81
Stanislav Vorobiov [Thu, 22 Aug 2013 10:35:59 +0000 (14:35 +0400)]
YaGL: We don't support cursors
Change-Id: I4eb27202c48ce75588b3716dfa97e2b8f3d673b7
Stanislav Vorobiov [Wed, 21 Aug 2013 13:10:22 +0000 (17:10 +0400)]
YaGL: Added bo_import support to GBM
Change-Id: I46f68c4f6ae290094167bb7f4077b82f056c5080
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
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
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
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
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
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
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
Stanislav Vorobiov [Mon, 5 Aug 2013 15:31:53 +0000 (19:31 +0400)]
YaGL: wayland platform added
Change-Id: Ife2fa6fde03f956d7753987e7d09deda4cf1bff7
Stanislav Vorobiov [Mon, 5 Aug 2013 08:50:48 +0000 (12:50 +0400)]
YaGL: GL_EXT_texture_format_BGRA8888 implemented
Change-Id: I8e651600e99a6ff6f034162f90761cb1a7c94973
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
Stanislav Vorobiov [Fri, 2 Aug 2013 11:33:18 +0000 (15:33 +0400)]
YaGL: GBM platform added
Change-Id: I20ce694cf9847e281ff4033a7e593e21015a2493
Stanislav Vorobiov [Thu, 1 Aug 2013 12:39:11 +0000 (16:39 +0400)]
YaGL: GBM implemented
Change-Id: I53c9af5e9c848ae304255bedbf1038aedab90570
Stanislav Vorobiov [Mon, 29 Jul 2013 14:29:07 +0000 (18:29 +0400)]
YaGL: Separated windowing system related stuff
Change-Id: I26b4dfbccd33e7c8ca89e5ef0bddb6d634220ad6
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
Stanislav Vorobiov [Fri, 26 Jul 2013 11:06:27 +0000 (15:06 +0400)]
YaGL: Changed GLESv2 version to 2.0
Change-Id: I06a63563ec8e35b6eb971efbde147ef8678a6024
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
Stanislav Vorobiov [Fri, 26 Jul 2013 10:31:42 +0000 (14:31 +0400)]
YaGL: Fixed warnings
Change-Id: I8963ad9159349cd204913d374ae19cb400e0d5a7