Vladislav Andresov [Thu, 5 Oct 2017 14:12:21 +0000 (17:12 +0300)]
YAGL: Add hardware conversion for YUV420 format
Change-Id: Icf94edd832657527f940c0815653f0365e47d166
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
Vladislav Andresov [Wed, 16 Aug 2017 13:15:56 +0000 (16:15 +0300)]
Add hw y-inverting for ARGB images
Change-Id: I9ee0fd94cb773d326a18074aa99d4576d5ac9639
Signed-off-by: Vladislav Andresov <v.andresov@partner.samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Wed, 26 Apr 2017 11:59:27 +0000 (14:59 +0300)]
Ensure fence_dpy is setup for all threads
This is needed in order to be able to create fences in transport layer
and avoid race conditions when invoking yagl_host_* routines with return
values. Previously fence_dpy was assigned only in eglGetDisplay. Though
the app may make EGL calls from auxiliary threads which will have
fence_dpy uninitialized.
Change-Id: Ibe66030cb4a30d189750d1ab233164cfea60b339
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Fri, 9 Dec 2016 10:06:48 +0000 (13:06 +0300)]
Avoid using yagl_host_handle when acquiring images
yagl_host_handle is defined as uint32_t, while EGL image client handle
(either EGLImageKHR or GLeglImageOES) is void *. On x64 arch the cast to
yagl_host_handle will lead to data truncation and as a result the image
may not be found.
Change-Id: I02e8a14326c635d0f6bcb0e9b289a0467c846f1f
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Fri, 23 Dec 2016 17:14:20 +0000 (20:14 +0300)]
Fix wrong host texture binding
The call sequence like bellow was causing flickering:
glBindTexture(GL_TEXTURE_EXTERNAL_OES, tex);
glBindTexture(GL_TEXTURE_2D, 0);
glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img);
Eventually zero texture was used on the host side since external
textures are currently handled as GL_TEXTURE_2D.
Change-Id: I9d8480df7dd5f44f49f31e170de6f478c663f8c3
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
joonbum.ko [Mon, 28 Nov 2016 08:29:58 +0000 (17:29 +0900)]
Y-invert ARGB images
This patch resolves the issue with widgets rendered upside-down. Tizen
platfrom expects 'yinvert == 1' for EGL images created from tizen sfc.
Change-Id: If34b0c717f705a13351d94b50361b2a6d5945998
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 1 Nov 2016 17:23:29 +0000 (20:23 +0300)]
Fix yagl setup script for x64 arch
Driver path can be either /usr/lib/driver or /usr/lib64/driver.
Change-Id: I133ea4aa0152f396d3c7ebd4b61dd9fbac8bbfb5
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Jinhyung Jo [Fri, 28 Oct 2016 06:20:37 +0000 (15:20 +0900)]
YaGL: modify lib path
The lib path in the 64-bit architecture was missing.
I modify the lib path.
Change-Id: I65e0ebbce42a782605b4d2c764fc5ba596603db0
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Slava Barinov [Tue, 20 Sep 2016 14:52:59 +0000 (17:52 +0300)]
Build: ASan build support added
Address Sanitizer support requires adding pthread in the end of list
Change-Id: I8db1b86e394002baf4418b7494d7497047b65be8
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Vasiliy Ulyanov [Mon, 4 Jul 2016 10:09:28 +0000 (13:09 +0300)]
YaGL: Add tpl surface validation
With EFL a 1x1 surface is created at first and then it is resized. There
is a need to handle such situation before drawing GL stuff and
invalidate the renderer.
Change-Id: Ic11cbae921d1f486f1a81fa1633c6f64d5673efe
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Mon, 26 Sep 2016 13:04:15 +0000 (16:04 +0300)]
Add RGBA8888 format support for EGL tizen sfc ext
This format requires convertion to ARGB.
Change-Id: Ia9ade3d84b3d061c5f713457e6ac0e2cbae31418
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 13 Sep 2016 16:10:37 +0000 (19:10 +0300)]
Ensure drm gem is always 'named'
When creating EGL image from tizen surface, the underlying gem may have
no name assigned. This ends up with client handle set to zero. The commit
fixes such an issue.
Change-Id: Ica907a251d9a64a8661232e2718930caa052e0a3
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Mun, Gwan-gyeong [Tue, 9 Aug 2016 07:05:19 +0000 (16:05 +0900)]
Build: Remove link of libGLESv1_CM.so on /usr/lib
CoreGL supports libGLESv1 so emulator-yagl does not need to make link of libGLESv1_CM
Change-Id: I68ff61626524c8ffcd82733c83bcc7604d061256
jin-gyu.kim [Fri, 29 Jul 2016 05:48:58 +0000 (14:48 +0900)]
Define PATH variable in the script file.
Change-Id: Iffc998df2d3a1400bd3d18f5b28b6968ecd19400
Vasiliy Ulyanov [Thu, 21 Jul 2016 12:58:28 +0000 (15:58 +0300)]
YaGL: Check for GPU acceleration on boot
If emulator is run without host GPU acceleration, yagl will likely
terminate GL apps on initialization failure. In order to handle the
situation propely, dummy GL libs are now packed along with yagl. When
emulator boots up, a script will check if /dev/yagl is present and
setup the symlinks appropriately.
Change-Id: I6715c5798b0c2a6cdef16a24a1e3c8786f6aa36f
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 19 Jul 2016 15:17:56 +0000 (18:17 +0300)]
YaGL: Fix debug build for x64 platform
Ponters cannot be cast directly to integers of different size with
'-Werror=pointer-to-int-cast' gcc option. The commit fixes this issue
when making a build with debug logs enabled.
Change-Id: I401e5230af0f08b97a3597c05368f4859ed9d949
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Mon, 20 Jun 2016 13:48:54 +0000 (16:48 +0300)]
YaGL: Fix required texture image units query
GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES is now accepted as parameter name in
glGetTexParameterfv.
Change-Id: I7bdc3635262b28826f225395a76048d897710eb6
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Wed, 24 Feb 2016 13:30:23 +0000 (16:30 +0300)]
YaGL: Add more strict error checking
- glLinkProgram: linking should fail if vertex and fragment
shaders are not both present in the program object.
- glBlitFramebuffer: if the source and destination buffers
are identical, an INVALID_OPERATION error should be generated.
NOTE: valid only for OGLES3.0. Not the case with e.g.
GL_ANGLE_framebuffer_blit.
Change-Id: I0fdc4e383e32e9cfcb9028f4b279b8acdb8410c7
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 14 Jun 2016 08:00:19 +0000 (11:00 +0300)]
YaGL: Fix license issues
- COPYING: XFree86 -> MIT
- LICENSE: LGPL3.0 -> LGPL3.0+
Change-Id: I90e9129f0098c38ef30eeb409dc627e2df70c6dd
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 26 May 2016 10:12:03 +0000 (13:12 +0300)]
YaGL: Redefine samplerExternalOES in GLSL
The former external sampler hadnling did not work correctly with
statements like bellow:
#define SamplerType samplerExternalOES
Using a #define construct in the header for samplerExternalOES seems
more appropriate rather than substituing every occurrence.
Change-Id: If1c654046ad78011a5148013889f5dc93882a6a9
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 11 Feb 2016 09:12:23 +0000 (12:12 +0300)]
YaGL: Y-invert YUV images
EGL images created from tbm surfaces appear flipped vertically.
In case of planar data we have to make conversion anyway so it
can be handled as well.
Change-Id: I8242bdffdd1f0340b616cb1f5912ea51a5c27026
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Mon, 1 Feb 2016 15:32:47 +0000 (18:32 +0300)]
YaGL: Implement GL_OES_EGL_image_external extension
Currently external textures are handled as 2d textures since
host will unlikely recognize GL_TEXTURE_EXTERNAL_OES as a valid
target. The same applies to GLSL (i.e. sampler2D is used instead
of samplerExternalOES). Color conversion is performed in software
and it is done when glEGLImageTargetTexture2DOES function is
called. It is an initial implementation and at the moment it is not
fully conformant.
Change-Id: I6a781d1062a2f5373e8ff507a5279c58ed29b042
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 24 May 2016 11:10:13 +0000 (14:10 +0300)]
YaGL: Fix debug build with tizen platform
The macro YAGL_LOG_FUNC_SET initilizes logger specific local vars like
pid, tid, etc. There is no need to use it if the function actually does
not produce any logs, since it may lead to 'unused variable' compiler
errors.
Change-Id: I9f9c2ccba7b8364d60891a1748fc62d5b2516fbf
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 10 May 2016 10:03:42 +0000 (13:03 +0300)]
YaGL: Add back buffer null check in get_buffer_age
Change-Id: I53b79769401aae2a1e8a7f9e58637473f1cd3299
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Mun, Gwan-gyeong [Mon, 2 May 2016 11:31:27 +0000 (20:31 +0900)]
Build: Recover build architecture (x86, x86_64) and emulator bcond on rpm spec file
Change-Id: I27bc19e40273bf84f505001baadbd169ee80272f
Xuelian Bai [Thu, 28 Apr 2016 19:51:31 +0000 (03:51 +0800)]
porting YAGL to TIZEN platform
This patch ports YAGL to TIZEN platform as an
initial version, creates following files:
EGL/tizen/yagl_tizen_display.c
EGL/tizen/yagl_tizen_display.h
EGL/tizen/yagl_tizen_native_image.c
EGL/tizen/yagl_tizen_native_image.h
EGL/tizen/yagl_tizen_pbuffer.c
EGL/tizen/yagl_tizen_pbuffer.h
EGL/tizen/yagl_tizen_platform.c
EGL/tizen/yagl_tizen_platform.h
EGL/tizen/yagl_tizen_window.c
EGL/tizen/yagl_tizen_window.h
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Change-Id: I639dc736f242096ba417054576453ea941113eea
Mun, Gwan-gyeong [Wed, 20 Apr 2016 16:37:18 +0000 (01:37 +0900)]
Change GLESV1_CM symbolic link for COREGL
Change-Id: I970f8d859ba8a1d565219f304bbd2451feff2194
Vasiliy Ulyanov [Tue, 5 Apr 2016 10:52:36 +0000 (13:52 +0300)]
YaGL: Fix LICENSE.MIT text
Change-Id: I4fda882a7ea7f3604025d4c5574dcb17c530ef7f
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Wed, 16 Mar 2016 12:34:19 +0000 (15:34 +0300)]
YaGL: Disable ETC1_RGB8_OES format check
OES_compressed_ETC1_RGB8_texture spec says:
INVALID_OPERATION is generated by CompressedTexSubImage2D,
TexSubImage2D, or CopyTexSubImage2D if the texture image <level>
bound to <target> has internal format ETC1_RGB8_OES.
Currently this error check causes problems with some apps so
temporarly disable it as a workaround.
Change-Id: I8bdc6f2b7a7b65730d4dee9a8a91b9f6ce465485
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 15 Mar 2016 08:56:29 +0000 (11:56 +0300)]
Revert "YaGL: Mark glGenTextures call as flushing"
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>
Vasiliy Ulyanov [Sat, 12 Mar 2016 14:10:12 +0000 (17:10 +0300)]
YaGL: Mark glGenTextures call as flushing
This is a workaround for web-tct. There seems to be a race
condition with these tests (i.e. they are rendering from
several threads without ensuring GL synchronization). The
commit should be reverted as soon as a proper fix is applied.
Change-Id: I095e76f0d9c84e7623035ca24817cfc98e7a2ae5
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 3 Mar 2016 15:14:47 +0000 (18:14 +0300)]
YaGL: Fix dynamic symbols loading with coregl
EGL/GLES vendor-specific drivers are located in /usr/lib/driver
when emulator runs with coregl. This needs to be considered when
loading symbols internally.
Change-Id: I6461ead2c5d6d66cbf2cc1fd25ee53887981df8a
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 3 Mar 2016 14:55:02 +0000 (17:55 +0300)]
YaGL: Add pbuffer support for Wayland platform
Currently it is needed to make Tizen 3.0 feature tests pass
in emulator. They appear to be using eglCreatePbufferSurface(...)
for offscreen rendering. I am not sure if such functionality is
really needed with Wayland (in fact it is not supported even in
Mesa). Anyway I have not found any spec saying that Wayland should
fail with this call so for the moment some draft implementation
should be okay I think.
Change-Id: I01372121c0e080e0007c69a12d4b97ad8df6fc04
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Mon, 1 Feb 2016 08:20:17 +0000 (11:20 +0300)]
YaGL: Fix Prevent issues
Change-Id: I781453b800d376a16294921984e2cb2b36f1411b
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Mun, Gwan-gyeong [Mon, 28 Dec 2015 05:32:27 +0000 (14:32 +0900)]
YaGL: Fix build configuration for install directory of 64bit architecture.
32bit: install /usr/lib
64bit: install /usr/lib64
Change-Id: I6c50ea39a7eeaa17abe188aaa48d5ee61615529c
Mun, Gwan-gyeong [Mon, 28 Dec 2015 01:23:51 +0000 (10:23 +0900)]
wayland-egl: add missed package config file
Change-Id: I973a4ef3f89c1b26e52772c5bc386726d61d326c
Mun, Gwan-gyeong [Mon, 28 Dec 2015 01:06:08 +0000 (10:06 +0900)]
YaGL: Seperate emulator-yagl package to libwayland-egl package.
Change-Id: I99ef17705e7a1197f8555116f2c2a386f5726a03
Mun, Gwan-gyeong [Thu, 24 Dec 2015 12:46:40 +0000 (21:46 +0900)]
YaGL: Change install directory of real driver.
Coregl package provide libGLES, liEGL wrapper. and Coregl dynamically load real driver from /usr/lib/driver
Remove GL/EGL header files from devel package. : CoreGL provide GL/EGL header file.
Remove build script of X env.
Change-Id: I3015c5ee2828b94cd1525b98db9e7acba4cf5762
Jinhyung Jo [Wed, 9 Dec 2015 04:33:51 +0000 (13:33 +0900)]
YaGL: support EGL_NATIVE_VISUAL_ID for GBM
The EGL_KHR_platform_gbm extension has specific behavior
for the EGL_NATIVE_VISUAL_ID.
There is following contents in the EGL officail size,
(https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_platform_gbm.txt)
New Behavior section
"For each EGLConfig that belongs to the GBM platform, the
EGL_NATIVE_VISUAL_ID attribute is a GBM color format, such as
GBM_FORMAT_XRGB8888. "
The EFL EVAS in Tizen requires the GBM_FORMAT_ARGB8888.
And YaGL can support this format. So returns it.
This is W/A patch. Must be resolved correclty.
Change-Id: I402ebb20d17bf1a119ca09154519d57305e539a7
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Fri, 6 Nov 2015 05:14:29 +0000 (14:14 +0900)]
YaGL: Version bump
For the 64bit addressing
(commit id:
233c1f2ea5be0b1d160b64856e33365e0ab58313)
Be sure synchronize with the kernel & QEMU packages.
Change-Id: Ia3537a5d5e13f1a0764c20105dea576c364b826d
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Wed, 4 Nov 2015 13:15:31 +0000 (22:15 +0900)]
YaGL: Fix compilation warning & add '-Werror' option
Removed a usage of the deprecated function, wl_client_add_resource'
And added a compilation option, '-Werror'.
Change-Id: I20fb58f9ab26c9a1f359ec8f4f5d56c261778bd7
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Wed, 4 Nov 2015 09:48:16 +0000 (18:48 +0900)]
YaGL: Patches for the 64bit addressing
Tizen 3.0 supports a 64bit guest.
However current yagl is implemented by assumed to use 32bit address.
So modify the address related parts.
The qemu device sources were also modifed.
And remove the warnings:
-Wint-to-pointer-cast/-Wpointer-to-int-cast/-Wunused-variables
TODO: fix the warning - 'wl_client_add_resource' is deprecated
Change-Id: Id3875eefa012240df34fffbc7d12f36c9584b4f1
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Vasiliy Ulyanov [Fri, 7 Aug 2015 15:52:28 +0000 (18:52 +0300)]
Revert "YaGL: Workaround for libevas gles version check"
This workaround appears no longer needed since the corresponding
fix has been applied to libevas. Besides it seems to cause
problems with cairo.
This reverts commit
1a1d13934f4bad7b779cd6093c0f00cc9f36ec03.
Change-Id: Iad9af1b3bcd6c2756963ebd0e10e97879245d496
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
jinhyung.jo [Fri, 31 Jul 2015 07:57:30 +0000 (16:57 +0900)]
YaGL: Modified the .spec & COPYING files.
Modified to provide the correct license information.
Change-Id: Ie0689f070e6e6162132c07df6603a721c3fca453
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Tue, 21 Jul 2015 02:41:05 +0000 (11:41 +0900)]
YaGL: Updating the EGL header files
Update EGL header files to the version of May 2015, EGL spec 1.5.
Change-Id: Ifc7ba9cadebb0b229f1d1ee72171e241d2801a0a
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Vasiliy Ulyanov [Wed, 1 Jul 2015 07:49:30 +0000 (10:49 +0300)]
YaGL: mark eglMakeCurrent call as 'flushing'
According to EGL spec the currently bound context needs
to be flushed before being released or another context
is made current.
Without flushing we may miss some GL calls if there are
several threads rendering to a single context.
Change-Id: Id6680a086d895ba94b4c279b18443d93017838d1
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 23 Jun 2015 13:53:20 +0000 (16:53 +0300)]
YaGL: keep at least 2 back buffers for dri3 drawables
With only one back buffer available the rendering freezes
Change-Id: I9b2cdbeddf4786bc57bef997574d606a15ebf4cb
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 11 Jun 2015 10:11:28 +0000 (13:11 +0300)]
YaGL: Avoid clamping with floating point textures
We need to pass the proper dst_internalformat to the host when
using a texture with floating-point components in glTexImage2D.
Change-Id: Ia588a6e84ad5e359d3ed6d6eaf7d8769569acc38
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
jinhyung.jo [Thu, 18 Jun 2015 02:19:59 +0000 (11:19 +0900)]
YaGL: Modified the startup script
Checks the device node instead of the kernel command
Change-Id: Ib14005a53dd989419b8c49ec72600f107af1ab50
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Vasiliy Ulyanov [Tue, 9 Jun 2015 16:06:21 +0000 (19:06 +0300)]
YaGL: Add program link status check
According to the OGLES2.0 spec:
void UseProgram(uint program);
If program has not been successfully linked, the error
INVALID_OPERATION is generated and the current rendering
state is not modified.
Change-Id: I481a494c210e76ee4db319ae569d3491ade1d35a
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 9 Jun 2015 15:53:47 +0000 (18:53 +0300)]
YaGL: Generate error for rectangular cubemap images
According to the OGLES2.0 spec:
void TexImage2D(enum target, int level,
int internalformat, sizei width, sizei height,
int border, enum format, enum type, void *data);
When the target parameter to TexImage2D is one of the six cube map
two-dimensional image targets, the error INVALID_VALUE is generated
if the width and height parameters are not equal.
Change-Id: Ideb9172fa721cd7c92d1ef98a397d9fe48690e66
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 9 Jun 2015 15:35:09 +0000 (18:35 +0300)]
YaGL: Fix yagl_get_gles2_sym(...) resolution order
dlsym(NULL, ...) may return a valid pointer to a local symbol. We
need to search it in libGLESv2 explicitly first.
Change-Id: I6200679d7b69444798d3feeb77b685e2772eb3a7
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Mon, 1 Jun 2015 06:54:06 +0000 (09:54 +0300)]
YaGL: Fix incorrect texture object release
EGL_KHR_gl_texture_2D_image: texture object is acquired in
yagl_gles_image_wrap_tex(...). Hence the release should be performed
in the corresponding destructor (i.e. yagl_gles_image_destroy(...)).
Change-Id: I92aaf0a4368201453e022859f4c52cdeb103af06
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 28 May 2015 11:03:23 +0000 (14:03 +0300)]
YaGL: Workaround for libevas gles version check
Change-Id: Ieac95a502e98b516e1870d5ea38513931a19881b
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Sooyoung Ha [Fri, 3 Jul 2015 05:47:08 +0000 (14:47 +0900)]
build: enable the x86_64 build
Change-Id: I0c704d04835972410eb92798b8053656b8a7afe8
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
Stephane Desneux [Thu, 28 May 2015 08:46:55 +0000 (10:46 +0200)]
packaging: only build for emulator repositories
This package should only be built when _with_emulator is defined in project conf.
Change-Id: If9a489968d5fc483de1f51c5d9e1fa39534ebcdf
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Vasiliy Ulyanov [Tue, 26 May 2015 09:20:58 +0000 (12:20 +0300)]
YaGL: Fix EGL extensions string
Change-Id: I03dbadfbe7760586a7c9c2e3d2995a56580bc894
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 21 May 2015 13:53:56 +0000 (16:53 +0300)]
YaGL: Fix gl_PointSize shader variable issue
If GL_POINT_SPRITE is not enabled explicitly gl_PointSize shader
variable appears to be always 0.
Change-Id: I8198a0586467eb3f341a330afaddd6d3a263a617
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Thu, 7 May 2015 13:45:39 +0000 (16:45 +0300)]
YaGL: Add EGL_TIZEN_image_native_surface support
eglCreateImageKHR(...) now supports EGL_NATIVE_SURFACE_TIZEN
target (onscreen backend only)
Change-Id: I9ac7016cb3f0c05d7c35a31135506142c22bcb0c
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Mon, 18 May 2015 12:53:58 +0000 (15:53 +0300)]
YaGL: Add EGL_KHR_gl_texture_2D_image support
eglCreateImageKHR(...) now supports EGL_GL_TEXTURE_2D_KHR
target (onscreen backend only)
Change-Id: Ie41c494246237ce79e36fde63b49bb7cf876737b
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
jinhyung.jo [Thu, 21 May 2015 02:08:24 +0000 (11:08 +0900)]
YaGL: Added the boilerplate
Added a boilerplate to the DRI3 EGL backend
Change-Id: I1c7d2f8982af07f0926ab116435504ca46867932
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Vasily Golubev [Thu, 21 Aug 2014 11:24:50 +0000 (15:24 +0400)]
YaGL: Fix hangling of GL_QUERY_RESULT flag
In the case of calling glGetQueryObjectuiv() with
GL_QUERY_RESULT flag we must wait while passed
samples counter will be available
Change-Id: Ieff4d40c475e7738a4028f1d49c0725be9ea6e8a
Signed-off-by: Vasily Golubev <v.golubev@samsung.com>
Vasiliy Ulyanov [Mon, 18 May 2015 10:26:45 +0000 (13:26 +0300)]
YaGL: Fix eglQueryContext(...) return value
Now it returns EGL_TRUE on success
Change-Id: I16aecdd4b2f1f2456978b2b8f24dcea323333692
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
Vasiliy Ulyanov [Tue, 31 Mar 2015 14:59:22 +0000 (17:59 +0300)]
YaGL: implement DRI3 EGL backend
Change-Id: Ia9def69b3394f5b9ae9151e5e80e946ef23c6e67
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
jinhyung.jo [Mon, 23 Feb 2015 12:18:25 +0000 (21:18 +0900)]
YaGL: Export dummy libs symbols
Added missing attribute tags, __attribute__((visibility("default"))).
Change-Id: I3eb51f0a165b2be8baac31e651d7248a9c6b3dc4
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Mon, 24 Nov 2014 10:28:19 +0000 (19:28 +0900)]
YaGL: Modified the setup script while booting time
Modified the setup script while booting time to obtain permission.
It will be executed when the systemd runs the xorg.service.
So, removed the service files in this repo.
Change-Id: Idc69d0ae9c69bd4e65f754f997cd4d786f0864f3
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Thu, 8 Jan 2015 08:01:10 +0000 (17:01 +0900)]
YaGL: Source cleanup
Add MIT(or LGPL3.0) boilerplate to the header of the files
Add a rule for license file in the spec file
Add LICENSE & NOTICE, AUTHOR, COPYING, etc files
Change-Id: If2b5c1c07834aaa0f463fb9f47240a2ab463eeff
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Thu, 8 May 2014 10:32:41 +0000 (19:32 +0900)]
YaGL: Modified packaging rules
Remove the dependency of the packages, simulator-opengl & opengl-es-virtual-drv
Change-Id: I6b8f0807df98762dc3d2391de1d1a4021f1b1ff8
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
jinhyung.jo [Tue, 16 Dec 2014 05:49:24 +0000 (14:49 +0900)]
YaGL: Modified the startup script
Checks the device node instead of the kernel command.
Change-Id: I69aa6e322eb45d22454b56199eb12ff661c16439
Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
Tina Zhang [Mon, 21 Jul 2014 08:50:30 +0000 (16:50 +0800)]
Remove static variable for identifying wl_drm buffers
libwayland-drm.a is static link for libEGL.so and libgbm-yagl.so.
We can't rely on comparing the address of a static vtable symbol
in libwayland-drm.a to determine if a wl_buffer is a wl_drm_buffer.
Instead, we move the vtable into the wl_drm struct and use that
for comparing.
Change-Id: I38e397f2d4806178ebb51bb3850040fad7961b0f
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Tina Zhang [Tue, 16 Sep 2014 07:01:04 +0000 (15:01 +0800)]
YaGL: Block for the frame callback in lock_back not swap_buffers
If the throttle only be used in the yagl_wayland_window_swap_buffers(),
then in some situations the yagl_wayland_window_get_buffer() may get the
NULL buffer. This could let the App draw into the wrong surface.
Do throttle in the yagl_wayland_window_lock_back() will solve the problem.
Change-Id: Id1d2bc8f1c95b3c956118b36b07b20cc1615046c
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Stanislav Vorobiov [Tue, 29 Jul 2014 06:23:14 +0000 (10:23 +0400)]
Revert "Remove static variable for identifying wl_drm buffers"
This reverts commit
f19f89d68723c868e3b1d8bbf75e04cf4e1809ba.
Change-Id: Iab08ab64a0ede945298e5006cb441ea0c1d4ca4f
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Tina Zhang [Mon, 21 Jul 2014 08:50:30 +0000 (16:50 +0800)]
Remove static variable for identifying wl_drm buffers
libwayland-drm.a is static link for libEGL.so and libgbm-yagl.so.
We can't rely on comparing the address of a static vtable symbol
in libwayland-drm.a to determine if a wl_buffer is a wl_drm_buffer.
Instead, we move the vtable into the wl_drm struct and use that
for comparing.
Change-Id: I38e397f2d4806178ebb51bb3850040fad7961b0f
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Stanislav Vorobiov [Mon, 2 Jun 2014 06:16:54 +0000 (10:16 +0400)]
YaGL: Don't report GL_EXT_texture_storage support
We do support glTexStorageXXX in GLESv3, however,
GL_EXT_texture_storage is different. GL_EXT_texture_storage
requires supporting a lot of additional internal formats,
which is hard to do for all possible host OpenGL
versions, especially for OpenGL 2.1. Thus, we don't report
GL_EXT_texture_storage support anymore
Change-Id: I53bc097c453afac93c42f72b018e04a4e5a7438c
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Mon, 2 Jun 2014 05:56:46 +0000 (09:56 +0400)]
YaGL: Report GL_OES_surfaceless_context support
EGL_KHR_surfaceless_context can be used only with
contexts that support GL_OES_surfaceless_context. YaGL
supports GL_OES_surfaceless_context for any kind
of context, so report this always
Change-Id: I6d515b8b6eccff8a030508f1c2f1fc12db58d520
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Mon, 2 Jun 2014 05:50:54 +0000 (09:50 +0400)]
YaGL: Don't report GL_ARB_texture_rectangle support
We don't support GL_ARB_texture_rectangle, so don't report
it in extension string
Change-Id: Ib341b3cff3bd3ea70a5c70d6b3b5557d0c68d390
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stephane Desneux [Fri, 23 May 2014 18:44:04 +0000 (20:44 +0200)]
add conditionnal build for emulator repos only
Package will be excluded from build except if the %with_emulator
flag is defined in the project config.
Change-Id: I1aab2e922399bd5a36c96ee9e6956b40be381826
Bug-Tizen: TIVI-2243
Bug-Tizen: TC-9
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Stanislav Vorobiov [Tue, 6 May 2014 06:31:42 +0000 (10:31 +0400)]
YaGL: Remove X11 dependency from EGL headers
Change-Id: I145130455797df19fbd3706b76e92fa72c65d20b
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Tue, 6 May 2014 06:08:41 +0000 (10:08 +0400)]
YaGL: Remove X11 dependency for wayland builds
Change-Id: I1f6fdbfe354c7ee8c22ec30a5b4941be697e68a1
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Mon, 28 Apr 2014 15:36:33 +0000 (19:36 +0400)]
YaGL: Fix glTexImageXXX NULL pointer offset bug
If we set non-0 GL_UNPACK_SKIP_XXX and call glTexImageXXX
with NULL pointer then NULL will get offset and it'll result in
guest app crash. We should offset NULL data pointer only
if unpack PBO is bound, when no unpack PBO bound we
should just calculate the size and don't offset the pointer
Change-Id: Ie921016f0245f7042393cae98f04f80300bc85a1
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Mon, 14 Apr 2014 12:13:56 +0000 (16:13 +0400)]
YaGL: Optimize glGetXXX
1. Keep track of all remaining context state, thus, glGetXXX queries
will return state values without vmexit
2. Cache glGetXXX results on target, queries such as GL_XXX_MAX don't
change over time, so no need to vmexit every time user wants to
read them
Change-Id: I08de6a51b88ff70d60e6aaf1c7cf2161ea3b06b6
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 3 Apr 2014 11:33:48 +0000 (15:33 +0400)]
YaGL: Configurable behavior for glBlitFramebuffer
Currently minifying and magnifying blits in
glBlitFramebuffer are disabled because of host
OpenGL driver problems on many GPUs, they simply crash.
But we want to be able to enable this for
some apps that require it, thus we introduce
YAGL_MIN_MAG_BLITS environment variable.
We currently use this to run nintendo wii games
with dolphin-emu, since dolphin-emu uses minifying
glBlitFramebuffer every frame. For GameCube games however
dophin-emu doesn't use it, so they can be run as usual
Change-Id: Ie11a852bc53700231ce012938a8a531bb4e88394
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Mon, 31 Mar 2014 12:12:38 +0000 (16:12 +0400)]
YaGL: Report OpenGL ES 3.0 support in eglQueryString
Change-Id: Ibf432697aa363911d911790a14df4d23c6ca46f9
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Fri, 21 Mar 2014 10:25:27 +0000 (14:25 +0400)]
YaGL: Fix separate depth/stencil attachments
Separate depth/stencil attachments are almost never
supported on desktop OpenGL, so return GL_FRAMEBUFFER_UNSUPPORTED
in this case, standard allows it
Change-Id: Ia141c1990b072dd38bc96218dc9b99a1c59211bc
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Fri, 21 Mar 2014 09:04:38 +0000 (13:04 +0400)]
YaGL: Fix glClientWaitSync and glGetSynciv
Return proper error codes and statuses
Change-Id: Ic75f7605c3eabe8aae8074188b9669ecb7c007c3
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 20 Mar 2014 15:24:25 +0000 (19:24 +0400)]
YaGL: Fix buffer object unbinding
When unbinding buffer object we should detach it
from all attachment points, not just the first one
Change-Id: I61dc449a6d20cbda112137ea12d8b084d6dfdeb2
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 20 Mar 2014 14:58:20 +0000 (18:58 +0400)]
YaGL: Fix pixel format bpp data type
Should be int, not unsigned int
Change-Id: I1a12d41addf1d5b965147078c819467dc2875109
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 20 Mar 2014 09:52:56 +0000 (13:52 +0400)]
YaGL: Fix GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE query
This query should fail when attachment is GL_DEPTH_STENCIL_ATTACHMENT
Change-Id: I79efaf1a075d02a0e540ce586fcfbcf3ca1764a4
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 20 Mar 2014 09:10:03 +0000 (13:10 +0400)]
YaGL: Fix ETC2 textures unpacking
ETC2 textures were unpacking incorrectly if
width or height were not multiple of block size. This
is now fixed
Change-Id: I68f249b61e285af8142115c4f7e907f66483ec78
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 20 Mar 2014 07:07:09 +0000 (11:07 +0400)]
YaGL: Fix sized GL_DEPTH_COMPONENT textures
Sized GL_DEPTH_COMPONENT textures are treated as luminance
textures in desktop OpenGL, but according to OpenGL ES 3.0
they should be red, thus, we need to swizzle them.
Also, when texture data is respecified we should unswizzle
the texture when needed
Change-Id: Ia1d5d3de860c04848a09bf84ac4a98f94466ea97
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
Stanislav Vorobiov [Thu, 6 Mar 2014 15:32:49 +0000 (19:32 +0400)]
Merge branch 'glesv3' into tizen
Change-Id: Iccd757b9ff0096faf69619a9ff5e1344ae0cab7e
Stanislav Vorobiov [Thu, 6 Mar 2014 13:49:45 +0000 (17:49 +0400)]
YaGL: Version bump
GLESv3 merge version bump
Change-Id: Ice426f2047d3669b33d75ad0d17141bb0f0ffcc1
Stanislav Vorobiov [Thu, 6 Mar 2014 07:14:51 +0000 (11:14 +0400)]
YaGL: Fixes for Mac OS X
* glClearBufferfv must clamp floats by itself or else
host OpenGL driver will crash
* Don't call glGetIntegerv(GL_MAX_VARYING_COMPONENTS)
* Features that are in core profile are not exposed in extension list,
take this into account while creating our own extension list
Change-Id: Ia9d1744b3a4880a2f20ea104e94811df34f2e241
Stanislav Vorobiov [Wed, 5 Mar 2014 13:39:30 +0000 (17:39 +0400)]
YaGL: Don't call host's glGetIntegerv(GL_XXX_BITS)
GL_XXX_BITS is deprecated in OpenGL 3.1+ core, so
implement it ourselves
Change-Id: I8c44feb22350c852d9f003985d41e0bb728d00f0
Stanislav Vorobiov [Wed, 5 Mar 2014 07:12:50 +0000 (11:12 +0400)]
YaGL: Always strip #extension constucts
Just moving these to the header isn't right,
they can be enclosed in preprocessor. We can
just strip them instead, it's pretty safe thing to do
Change-Id: Idd61f3dab899c47e0cf1236cb4e971865ebfc3cc
Stanislav Vorobiov [Tue, 4 Mar 2014 16:01:02 +0000 (20:01 +0400)]
YaGL: Fix for texture2D, texture2DProj, etc. bias parameter
bias parameter in texture2D, texture2DProj, etc. is
only available in fragment shader
Change-Id: Ica52e929d68e114237c970623197d81b32c12098
Stanislav Vorobiov [Tue, 4 Mar 2014 15:30:11 +0000 (19:30 +0400)]
YaGL: Convert textures properly
1. GL_ALPHA to GL_RGBA conversion is wrong after all, previous
conversion was correct
2. GLESv1_CM should never convert textures since it always uses
legacy host OpenGL context
Change-Id: I1b8062c85f377b32bc2f75a58ff969e83acd65d0
Stanislav Vorobiov [Tue, 4 Mar 2014 09:04:56 +0000 (13:04 +0400)]
YaGL: Move GLSL #extension constructs to the header
If original GLSL source has #extension constructs then
we need to move them to the header, so that our own
declarations go after it
Change-Id: Id8f8f85b520fe71ad86dd618ce30c6bfb19478b5
Stanislav Vorobiov [Mon, 3 Mar 2014 15:27:25 +0000 (19:27 +0400)]
YaGL: Patch texture2D, texture2DProj, etc. properly
Replacing texture2D, texture2DProj, etc. with texture,
textureProj, etc. is not enough because there
might be things like this in the shader:
uniform sampler2D texture;
texture2D(texture, ...);
thus, after replacement this code will turn
into:
uniform sampler2D texture;
texture(texture, ...);
it'll lead to implementation-defined behavior in
most cases it'll just output blackness. Now we
workaround such situations by defining thunk
texture2D, texture2DProj, etc. at the top of the
shader, according to GLSL standard it's allowed
and it'll shadow builtin functions. Inside we
make a call to texture, textureProj, etc. Since
our function is just a thunk any decent GLSL
compiler will optimize it out, so no performance
penalty is introduced
Change-Id: I80449a6f9afdc17d1a6ab71e77501c84d41f3a25
Stanislav Vorobiov [Mon, 3 Mar 2014 09:36:42 +0000 (13:36 +0400)]
YaGL: Make glGetUniformLocation conformant again
We used to set 'gen_locations' to 1 by default, but that's bad,
since app may do something like this:
if (glGetUniformLocation(p, "my_uniform") == -1) {
// do logic when 'my_uniform' is not in the shader
} else {
// do logic when 'my_uniform' is in the shader
}
i.e. 'gen_locations == 1' will break this logic, thus, we
now set gen_locations to 0 by default
Change-Id: I75bc2935f763979dda82fbf91e5e0af60a06f83d