Xuelian [Mon, 27 Jul 2020 13:00:00 +0000 (21:00 +0800)]
Fix DuplicateCode for gl31.h/gl32.h
There are about 10000 duplicated lines in gl31.h and gl32.h.
This patch include gl31.h in gl32.h.
After applied the patch, DC score increased from 3.79 to 4.44
Change-Id: Ie1f4c14efadc0d6538a13d0328d6b40e4854dffa
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Mon, 27 Jul 2020 11:55:39 +0000 (19:55 +0800)]
Fix MCD score
There are circle dependency between modules/fastpath/tracepath,
move fastpath/tracepath/appopt to modules directory, this will
fix MCD score to 4.99
Change-Id: Iceacb2a87085ab1b737e26f2f310a51321ce22d0
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Fri, 17 Jul 2020 14:36:34 +0000 (22:36 +0800)]
Make log related global variables as local
Make coregl_log_lvl, coregl_dlog_enable,coregl_log_initialized as
local.
Change-Id: I6020d3431d089246d3e51c4c90bbdfff5c0a5126
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
wanchao.xu [Thu, 16 Jul 2020 05:19:28 +0000 (13:19 +0800)]
Fix duplicate code issue for coregl_fastpath_gl.c
Reuse code for gl*/gl*EXT/... functions.
Signed-off-by: Wanchao Xu <wanchao.xu@samsung.com>
Change-Id: If4ae3dfed6a022f8188e3e0862b29a486f5f863c
wanchao.xu [Mon, 13 Jul 2020 05:47:12 +0000 (13:47 +0800)]
Fix Global Variable issue of tracepath.
Signed-off-by: Wanchao Xu <wanchao.xu@samsung.com>
Change-Id: I0c5338cdb20e5686c8663e7d7c4a36798b31693c
wanchao.xu [Thu, 2 Jul 2020 05:32:51 +0000 (13:32 +0800)]
Fix Duplicate Code issue in coregl_tracepath_gl.c
Use function _get_channel_by_format and _get_glbuf_data to
replace duplicated code.
Signed-off-by: Wanchao Xu <wanchao.xu@samsung.com>
Change-Id: Ic99ec199ad6f8f0bfdbb4a4569f06510a1c4d380
Joonbum Ko [Mon, 30 Mar 2020 06:07:17 +0000 (15:07 +0900)]
Changed extension id of EGL_TIZEN_native_fence_sync
Change-Id: I6a435449f15bfa0ecec4756ca67016d6f1ccada2
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Thu, 12 Mar 2020 05:49:10 +0000 (14:49 +0900)]
Added EGL_TIZEN_native_fence_sync to eglext.h
Change-Id: I3bf7d0940963a69682a4e31830f60e7ba551c0ec
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Tue, 4 Feb 2020 11:32:52 +0000 (20:32 +0900)]
Fixed build warning about stringop-truncation
Change-Id: I8e28124d4ff1d85474e0ce5c366d3f3dcca50bb1
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Tue, 17 Sep 2019 07:21:33 +0000 (16:21 +0900)]
Deleted unnecessary files related with image dump.
Change-Id: I193876dded982a16b8e9c8be3536666d076a4343
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Tue, 4 Feb 2020 08:04:51 +0000 (17:04 +0900)]
Deleted unreachable code
- SVACE - Tizen_6.0_Unified : WGID : 425107 : UNREACHABLE_CODE
Change-Id: I4d6a4a437ec04b0f7ee0244afb013f89cc67b028
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Tue, 4 Feb 2020 07:58:54 +0000 (16:58 +0900)]
Fixed no_unlock issue.
- SVACE - Tizen_6.0_Unified : WGID : 428148 : NO_UNLOCK
Change-Id: I55931aa2e3a61e8cbfd364fd430cbf75d4e0b883
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Tue, 4 Feb 2020 07:45:37 +0000 (16:45 +0900)]
Fixed double free issue.
- SVACE - Tizen_6.0_Unified : WGID : 421655 : DOUBLE_FREE.EX
Change-Id: I84f37156637879a0a818b81812e60be24f8e9273
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Zhaowei Yuan [Fri, 1 Nov 2019 01:55:19 +0000 (09:55 +0800)]
coregl_fastpath_gl: Refactor function fastpath_glDeleteBuffers
Function fastpath_glDeleteBuffers() is too long and too
complex, simplify it by following modifications:
1. create a sub function clear_states() to do modular work
2. improve its coding style according to Tizen standard
Change-Id: I1770812ac244ce2854e234782e24b3718bb15781
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Zhaowei Yuan [Thu, 24 Oct 2019 00:33:48 +0000 (08:33 +0800)]
coregl_fastpath_egl: Refactor function fastpath_eglMakeCurrent
Function fastpath_eglMakeCurrent() is too long and too complex,
simplify it by following modifications:
1. create 3 sub functions to do modular work:
fastpath_create_context
fastpath_init_viewport_and_scissor
fastpath_update_context
2. improve its coding style according to Tizen standard
Change-Id: I45f999e2053fa33eeaa7a575191e11103cc9a088
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Zhaowei Yuan [Tue, 29 Oct 2019 08:17:19 +0000 (16:17 +0800)]
coregl_tracepath: Refactor function _dump_surface
Function _dump_surface() is too long and too complex,
simplify it by following modifications:
1. add 2 new functions _dump_surface_egl() and _dump_surface_fbo()
to decrease complexity of _dump_surface()
2. decrease number of global variables
3. improve its coding style according to tizen standard
4. improve part of logic
Change-Id: Ief6116bb4fde96977f12647c34839f6d010ec579
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Zhaowei Yuan [Thu, 24 Oct 2019 00:33:48 +0000 (08:33 +0800)]
coregl_fastpath: Refactor function fastpath_make_context_current
Function fastpath_make_context_current() is too long and too
complex, simplify it by following modifications:
1. split it to several functions
2. improve its coding style according to Tizen standard
3. remove unnecessary comments
Change-Id: I26f780b9cd2f9dfb9df6e0de313125e195692eaf
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
SooChan Lim [Fri, 1 Nov 2019 03:01:12 +0000 (12:01 +0900)]
package version up to 0.2.0
tizen 6.0 starts here.
Change-Id: I3d6240c2377367c2de5a961816b8616671ca064c
Joonbum Ko [Thu, 4 Jul 2019 01:53:41 +0000 (10:53 +0900)]
Deleted the dependency of libgbm.
Change-Id: Ia2eaf60d5be80663b9aceb23f5409f3e7ae79a02
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Mon, 21 Jan 2019 04:42:10 +0000 (13:42 +0900)]
export_initialized is set to '0' when called coregl terminate
Change-Id: Ia4d342f0234660ae54967a9573afb654507677c0
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Mon, 21 Jan 2019 04:49:30 +0000 (13:49 +0900)]
Modified to resolve some coding rule violations.
Change-Id: I399b2072593d90171268900ce6e72cfe4a42a95b
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Slava Barinov [Thu, 6 Apr 2017 09:59:20 +0000 (12:59 +0300)]
Restore -fcommon flag for ASan builds.
Change-Id: Idae111f8d1e33de6620b7671ffe765221ba8a8bb
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Hoyub Lee [Thu, 20 Jul 2017 09:30:10 +0000 (18:30 +0900)]
coregl_tracepath_gl: Fix possible dereferencing null of _add_glbuf_object()
Change-Id: Ic65618a0dfcfb0b2a1ca7df4c6757351f4aa9c98
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Thu, 20 Jul 2017 09:25:45 +0000 (18:25 +0900)]
coregl_tracepath: Fix possible dereferencing null of _get_trace_data()
Change-Id: Ie88cd415c2a65dacd291d94f0acb59f732164521
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Thu, 20 Jul 2017 09:23:38 +0000 (18:23 +0900)]
coregl_trace: Fix possible dereferencing null of add_to_general_trace_list()
Change-Id: If80f80530059424af185f7cb034909c554e20dc6
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Wed, 19 Jul 2017 07:30:01 +0000 (16:30 +0900)]
coregl_fastpath_egl: Fix possible dereferencing null svace issues
Change-Id: If477139a0d0c43649edd69830492eb2b5a2de87e
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Thu, 20 Jul 2017 05:37:02 +0000 (14:37 +0900)]
coregl_fastpath_gl: Fix svace issues - unreachable, null deref
Change-Id: Ie7110d8b14d2c9bf14caa07f9a8d4f80b6824f9f
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Thu, 20 Jul 2017 05:32:14 +0000 (14:32 +0900)]
coregl_faspath: Fix possible dereferencing null of init_modules_tstate_fastpath()
Change-Id: If96545ebd1d4245dbe9080349875309c888c4d47
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Wed, 19 Jul 2017 07:35:43 +0000 (16:35 +0900)]
coregl: Fix possible dereferencing null of init_new_thread_state()
Change-Id: I8828e0c2fc85caed9d1d9d53b96dd6b0854b81a8
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
joonbum.ko [Mon, 17 Jul 2017 05:32:05 +0000 (14:32 +0900)]
Added libtpl-egl to requires package.
- This is to include libtpl-egl in the target binary which coregl is installed.
Change-Id: Ic8b37b9be2c09b8ecbb6c3923afdb71e6f16a56d
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Changwoo Kim [Wed, 26 Apr 2017 08:36:19 +0000 (17:36 +0900)]
coregl_fastpath : fix wrong GLEnum usage for glGetIntegerv
Missing "_BINDING_" on few pname argument of glGetIntegerv
Change-Id: Ic969d58748e486393e2f6853836f465f73d5076a
joonbum.ko [Tue, 16 May 2017 04:00:38 +0000 (13:00 +0900)]
eglext.h: Revised the wrong proc name of eglFrontBufferSetSEC.
Change-Id: I63c5419a1ab90f295baab765aeef6966db4ee4a1
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Tue, 16 May 2017 03:58:05 +0000 (12:58 +0900)]
coregl_tracepath_egl: Added EGL_SEC_frontbuffer_set extension API to tracepath_egl.
Change-Id: I0115540ae4df4214a8520553219d338042019d02
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
SooChan Lim [Tue, 18 Apr 2017 05:27:36 +0000 (14:27 +0900)]
Revert "add libpng License to the spec file"
libpng License is the same as Zlib license.
https://opensource.org/licenses/Zlib
This reverts commit
5658c9df0da2f4bf053d970a0a9f424b8e80e2ae.
Change-Id: I7515b0a0f9d1602a99cf7ae93776f24acb13bb68
SooChan Lim [Tue, 18 Apr 2017 04:29:29 +0000 (13:29 +0900)]
add libpng License to the spec file
Change-Id: I5fd081211997174af2cce98b0c3e5fb85a20f906
Hoyub Lee [Tue, 4 Apr 2017 05:39:43 +0000 (14:39 +0900)]
coregl_fastpath_egl: Fix possible null pointer dereference
Change-Id: I1bd8def6cde39b0cbfdf13463f53ae54167d682f
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
SooChan Lim [Wed, 22 Mar 2017 06:26:06 +0000 (15:26 +0900)]
use %license macro to copy the COPYING file.
Change-Id: Ib8b6144656ef05cebd999b7af74cf1db077f46d5
Zhaowei Yuan [Tue, 14 Feb 2017 15:37:42 +0000 (23:37 +0800)]
coregl_fastpath: add support for create context robustness
This extension allows creating an OpenGL or OpenGL ES
context supporting robust buffer access behavior and
a specified graphics reset notification behavior
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I43baf5232ff0dadf150145da363bf8b80350a93b
Zhaowei Yuan [Fri, 6 Jan 2017 17:51:04 +0000 (01:51 +0800)]
CoreGL: Add support for OVR extensions
These OVR extensions include glFramebufferTextureMultiviewOVR,
and glFramebufferTextureMultisampleMultiviewOVR
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I5b8509b30a40f719044f15f88599cae23ca666c2
xing.huang [Fri, 23 Dec 2016 01:15:39 +0000 (09:15 +0800)]
coregl_fastpath: remove gl_color_writemask_for_glColorMask
1.glColorMask and glColorMaski should share the same state.
2.add GL_CLOR_WRITEMASK_NUM to define the size of gl_color_writemask
Signed-off-by: xing.huang <xing.huang@samsung.com>
Change-Id: I534fb2a8094495571596e033efb287a75ecde486
Zhaowei Yuan [Thu, 8 Dec 2016 18:09:15 +0000 (02:09 +0800)]
coregl: Open driver library libGLESv1_CM.so forwardly
In case of GL driver library is separated into more
than 1 file, it's necessary to open low version ones
forwardly while opening a library
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ibf54d5f859aeec23a6860cf430488ea60e7a234f
Mun, Gwan-gyeong [Tue, 6 Dec 2016 08:56:08 +0000 (17:56 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glTexImage2D()
Change-Id: Ic05af8e6b6e89a5eaf8458f19ac672ea5d9001f5
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Hoyub Lee [Wed, 30 Nov 2016 12:44:02 +0000 (21:44 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferStorageMultisampleEXT()
Change-Id: I50e880589d41b0b32db5724bb833b08999f00316
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Wed, 30 Nov 2016 12:43:09 +0000 (21:43 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferStorageMultisample()
Change-Id: Ia9aa69492b206bb7df35d424c13a0d4a3266780e
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Wed, 30 Nov 2016 12:16:23 +0000 (21:16 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferStorageMultisample()
Change-Id: I1462e965f5b5dfdfeae1c1ffb053539d2ba8b7db
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
joonbum.ko [Wed, 30 Nov 2016 12:09:42 +0000 (21:09 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of glGenRenderBuffersOES.
Change-Id: Icd93fad03cdc3f8d17867a0fdc586eac8cb4d047
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Wed, 30 Nov 2016 12:02:45 +0000 (21:02 +0900)]
coregl_fastpath_egl: Fix null reference in failure path of _dump_context_info.
Change-Id: I944e4cc10da8fd5f94b76152e7555bb27c6c7024
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Joonbum Ko [Wed, 30 Nov 2016 12:06:12 +0000 (04:06 -0800)]
Merge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferStorage()" into tizen
Mun, Gwan-gyeong [Wed, 30 Nov 2016 12:04:17 +0000 (21:04 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferStorage()
Change-Id: Iaa31abc89156c12fd08ecc6b0a0d39578850f099
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Joonbum Ko [Wed, 30 Nov 2016 12:03:59 +0000 (04:03 -0800)]
Merge "coregl_tracepath_gl: Fix null reference in failure path tracepath_glGenTextures()" into tizen
Joonbum Ko [Wed, 30 Nov 2016 12:03:36 +0000 (04:03 -0800)]
Merge "coregl_tracepath_gl: Fix null reference in failure path tracepath_glGenRenderbuffers()" into tizen
Mun, Gwan-gyeong [Wed, 30 Nov 2016 11:58:22 +0000 (20:58 +0900)]
coregl_tracepath_gl: Fix null reference in failure path tracepath_glGenTextures()
Change-Id: Id4404d90f9f9ae3d7d9109b08499d0313d5cc4e5
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
joonbum.ko [Wed, 30 Nov 2016 11:58:03 +0000 (20:58 +0900)]
coregl_tracepath_egl: Fix null reference in failure path of _dump_context_info.
Fix wrong codes related with below commit
I5a0527f3ba9b69ae5e324731a3bd77b897eefa36
Change-Id: I8dc84beae920227c41d64a93adfe570b51601c2b
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Mun, Gwan-gyeong [Wed, 30 Nov 2016 11:55:47 +0000 (20:55 +0900)]
coregl_tracepath_gl: Fix null reference in failure path tracepath_glGenRenderbuffers()
Change-Id: I592d033452d58e4df723a0f7996a9abeed9b00c4
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Hoyub Lee [Wed, 30 Nov 2016 11:33:49 +0000 (20:33 +0900)]
coregl_tracepath_gl: Fix null reference in failure path tracepath_glDeleteRenderbuffersOES()
Change-Id: I750fb6fa689d33cc9a68eeec17d1d6b167920948
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
joonbum.ko [Wed, 30 Nov 2016 11:44:14 +0000 (20:44 +0900)]
coregl_tracepath_egl: Fix null reference in failure path of _dump_context_info.
Change-Id: I5a0527f3ba9b69ae5e324731a3bd77b897eefa36
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Joonbum Ko [Wed, 30 Nov 2016 11:45:55 +0000 (03:45 -0800)]
Merge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteTextures()" into tizen
Joonbum Ko [Wed, 30 Nov 2016 11:45:34 +0000 (03:45 -0800)]
Merge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteRenderbuffers()" into tizen
Joonbum Ko [Wed, 30 Nov 2016 11:45:10 +0000 (03:45 -0800)]
Merge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_fbdump_update()" into tizen
Hoyub Lee [Wed, 30 Nov 2016 11:30:58 +0000 (20:30 +0900)]
coregl_tracepath_gl: Fix null reference in failure path tracepath_glEGLImageTargetRenderbufferStorageOES
Change-Id: If512bacde333daa2c85459ac9e8de8a4f3bf841a
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Wed, 30 Nov 2016 11:17:40 +0000 (20:17 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glEGLImageTargetTexture2DOES()
Change-Id: I644f51ef2a485bc4b5a61c7014f0fcfb7acf170b
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Mun, Gwan-gyeong [Wed, 30 Nov 2016 11:12:24 +0000 (20:12 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteTextures()
Change-Id: I875d36228bf7c2aeddb94327f12a65b7aaee2681
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Wed, 30 Nov 2016 11:05:33 +0000 (20:05 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteRenderbuffers()
Change-Id: Ice5a724ec5411caad7c165598e67032b0a3c9e64
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Wed, 30 Nov 2016 11:01:21 +0000 (20:01 +0900)]
coregl_tracepath_gl: Fix null reference in failure path of tracepath_fbdump_update()
Change-Id: I656eff9408cdc55643406552a61d1a8effc5eea1
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Wed, 30 Nov 2016 10:33:14 +0000 (19:33 +0900)]
coregl_fastpath: Fix null reference in failure path of _create_program_object()
Change-Id: Ifc32a640aa1cc9f37b88819671af5e405ef31015
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Zhaowei Yuan [Sun, 16 Oct 2016 20:14:05 +0000 (04:14 +0800)]
coregl: Re-organize log solution
1. Create macro DLOG_DEFAULT_ENABLE to determine whether to use dlog or not
2. Replace orginal LOG functions with new created API COREGL_ERR, COREGL_WARN and COREGL_DBG
- default log output: dlog
- default log level: debug
debug: COREGL_LOG_LEVEL=1, warning: COREGL_LOG_LEVEL=2, error: COREGL_LOG_LEVEL=3
- howto change default log level or output?
1) build time: change spec file's COREGL_DEFAULT_LOG_LEVEL / COREGL_DLOG_ENABLE macro
2) execute time: execute with COREGL_LOG_LEVEL / COREGL_TRACE_DLOG option
example command: COREGL_LOG_LEVEL=2 COREGL_TRACE_DLOG=0 COREGL_TRACE_API=1 elementary_test -to "GLView gears"
3. Remove orginal color schemes and symbol "\n" since new API specify uniformly
4. Replace COREGL_LOG with TRACE for trace path
- example command for logging to file: COREGL_LOG_FILE=/tmp/coregl_log.txt COREGL_TRACE_API=1 elementary_test -to "GLView gears"
Change-Id: I61cbc8d6dad6ce86ba4391c6dc846d08188ffaeb
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Mun, Gwan-gyeong [Mon, 7 Nov 2016 06:49:16 +0000 (15:49 +0900)]
update Khronos GLES/EGL headers
- egl.h / eglext.h
Revision: 33226
https://www.khronos.org/registry/egl/api/EGL/egl.h
https://www.khronos.org/registry/egl/api/EGL/eglext.h
- eglplatform.h
Revision: 30994
https://www.khronos.org/registry/egl/api/EGL/eglplatform.h
- gl2.h
Revision: 33248
https://www.khronos.org/registry/gles/api/GLES2/gl2.h
- gl2ext.h
Revision: 33260
https://www.khronos.org/registry/gles/api/GLES2/gl2ext.h
- gl3.h
Revision: 33222
https://www.khronos.org/registry/gles/api/GLES3/gl3.h
- gl31.h
Generated on date
20161024
https://www.khronos.org/registry/gles/api/GLES3/gl31.h
- gl32.h
Generated on date
20161024
https://www.khronos.org/registry/gles/api/GLES3/gl32.h
Change-Id: I178c7181ae1dfd07c772de52e4fc867fd5e74bd3
xing.huang [Fri, 4 Nov 2016 08:43:53 +0000 (16:43 +0800)]
coregl_fastpath: avoid "Invalid context attribute" from efl_webview_app
- Add support of EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT
eglCreateContex supports EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT
and EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR
Signed-off-by: xing.huang <xing.huang@samsung.com>
Change-Id: I8ed870fb03add25f59077cc46405388f95483229
xing.huang [Fri, 4 Nov 2016 01:57:35 +0000 (09:57 +0800)]
coregl_fastpath: Separate glColorMask state from glColorMaski and glColorMaskiOES
Fix showing of black screen while efl_webview_app renders aquarium.html page. ( test command: COREGL_FASTPATH=1 /usr/apps/org.tizen.chromium-efl/bin/efl_webview_app http://webglsamples.org/aquarium/aquarium.html )
- Reason:
glColorMask, glColorMaski and glColorMaskiOES share common gl_color_writemask
state, gl_color_writemask's size was obtained by glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS).
But, tm1 gl driver does not support GL_MAX_COLOR_ATTACHMENTS.
So, if "gl_color_writemask_num = 0" in the fastpath_glColorMask, it bypasses the calling of glColorMask to GLES/EGL Driver.
- Solution:
Separate the glColorMask from glColorMaski and glColorMaskiOES.
And assign another array to store state of glColorMask.
Signed-off-by: xing.huang <xing.huang@samsung.com>
Change-Id: Ia9250ece2ffa5f6ea750f92b68bf3bbcfb577bc8
Mun, Gwan-gyeong [Thu, 27 Oct 2016 06:09:31 +0000 (15:09 +0900)]
Build: Fix loading path of real vendor driver.
- before: it loads from /usr/lib/driver
- after : 32bit case; /usr/lib/driver
64bit case; /usr/lib64/driver
and it uses absolute path becasue, loading a library dynamically without specifying an absolute path could allow an attacker to link a malicious library by changing `$LD_LIBRARY_PATH` or other aspects of the program's execution environment
Change-Id: I02c8ae6d093cade42186da857335655ff93ac236
xing.huang [Thu, 13 Oct 2016 06:17:26 +0000 (14:17 +0800)]
coregl_fastpath_gl: Fix string over flow at _COREGL_FASTPATH_SUPPORTED_EXTENSION
- add size check before strcpy
Change-Id: Ib8528863340a3a003fc9f799d22ec796d76c886d
Zhaowei Yuan [Thu, 29 Sep 2016 19:08:17 +0000 (03:08 +0800)]
coregl_tracepath: Clear thread state for trace path terminating
Thread state referenced by tarce path should be cleared
when it terminates
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ic0adb719b82d398ab8cf56c3d7f68248509bdccf
Zhaowei Yuan [Mon, 10 Oct 2016 13:58:34 +0000 (21:58 +0800)]
coregl: Correct a typo
This patch corrects a typ0
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I3857811b507edb1eec833c48677775b43fb16b0e
Zhaowei Yuan [Sat, 8 Oct 2016 00:41:13 +0000 (08:41 +0800)]
coregl_fastpath: Pass buffer to GL driver for GLES 1.x
GLES 1.x doesn't support fast path, so just pass the
original argument buffer to GL driver rather than the
real object
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I56226fff779acf8576b193605c811c73ea6c2907
Zhaowei Yuan [Fri, 7 Oct 2016 20:55:42 +0000 (04:55 +0800)]
coregl_fastpath: Create image with native surface
Native surface which is neither texture nor renderbuffer
is possible passed to fastpath_eglCreateImageKHR() to
create image
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I62aadeb21b7f89157d9a213b70d0e71ac9ff2e82
Zhaowei Yuan [Thu, 8 Sep 2016 14:53:42 +0000 (22:53 +0800)]
coregl_fastpath: Keep frame buffer binding state synchronization
Calling function fastpath_glBindFramebuffer() with target
GL_FRAMEBUFFER indicates bind to GL_READ_FRAMEBUFFER and
GL_DRAW_FRAMEBUFFER in the meantime.
If GL driver supports GL_READ_FRAMEBUFFER_BINDING and
GL_DRAW_FRAMEBUFFER_BINDING, clue state
gl_framebuffer_binding_read and gl_framebuffer_binding_draw
are both necessary to keep state synchronization, or state
gl_framebuffer_binding is enough.
Add judgement on current_ctx->gl_framebuffer_binding_draw_used
to make sure read and draw are both supproted.
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ia74ff7b4d67dfaf0b2cf00e97d996e4bb2dd640d
Zhaowei Yuan [Mon, 19 Sep 2016 18:42:51 +0000 (02:42 +0800)]
coregl_fastpath: Fix NULL pointer access
Check if gctx->gl_current_program is NULL before
accessing it
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I48521476422be2cb3c7d77af6df47ddc96ca069f
Zhaowei Yuan [Mon, 5 Sep 2016 23:21:51 +0000 (07:21 +0800)]
coregl_fastpath: Fix logic error for module override switching
1. Execute override changing only when modules are enabled
2. Reset override when got 1.x as initial version
3. Execute override changing only when version is changed
to 1.x or from 1.x
4. Add log to show override resetting executed
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ifbb655be126fbdceb93c98e99344e061c50d551e
Mun, Gwan-gyeong [Wed, 28 Sep 2016 10:39:51 +0000 (19:39 +0900)]
wraps/coregl : Fix loading of CoreGL libary path
- before: relative path ( libCOREGL.so )
after: absolute path ( /usr/lib/libCOREGL.so or /usr/lib64/libCOREGL.so)
- Loading a library dynamically without specifying an absolute path could allow an attacker to link a malicious library by changing `$LD_LIBRARY_PATH` or other aspects of the program's execution environment
Change-Id: Ie5d4d2dfa3ed692e6785cd909502fc7971ff7451
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Zhaowei Yuan [Sun, 4 Sep 2016 19:53:40 +0000 (03:53 +0800)]
coregl_fastpath: Change the module overriding when the API version is changed.
Change the setting of module overriding when the GLES
API version is changed, it reduces unecessary operations.
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I42ab27b8ad18875259bf8e0a78e6a7f2a63004c9
Zhaowei Yuan [Sun, 4 Sep 2016 19:44:17 +0000 (03:44 +0800)]
coregl_fastpath: Fix memory overread issue
The real size of state gl_draw_buffers should be
gl_draw_buffers_num[0] which is not maybe the same
as max value 16, so it can raise the overreading of memory
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ia68aa7dcfe6eddf6b6bf6e9f8f625e5b30909204
Zhaowei Yuan [Wed, 31 Aug 2016 15:33:11 +0000 (23:33 +0800)]
coregl_fastpath: Keep states synchronization between color mask functions
Functions glColorMask, glColorMaski and glColorMaskiOES
operate common states, they should be kept synchronization
state gl_color_writemask should be an array in the form
of a two-dimensional array whose size if 4*4, glColorMask
set them all uniformly, glColorMaski and glColorMaskiOES
set them respectively
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Icbb59a06a66942929d01be54921eeecd794cb475
Zhaowei Yuan [Wed, 31 Aug 2016 15:22:30 +0000 (23:22 +0800)]
coregl_fastpath: Keep state synchronization between binding functions
Functions glBindBuffer, glBindBufferBase and glBindBufferRange
operate on common states of following targets:
GL_TRANSFORM_FEEDBACK_BUFFER
GL_UNIFORM_BUFFER
GL_SHADER_STORAGE_BUFFER
GL_ATOMIC_COUNTER_BUFFER
Those states should be keep synchronization
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I4617c7a2d28e242f5900c335eb329a78374b3f2b
Zhaowei Yuan [Wed, 31 Aug 2016 15:15:28 +0000 (23:15 +0800)]
coregl_fastpath: Synchronize transform feedback buffer binding state
Successfully call function glBindTransformFeedback() makes
transform feedback buffer related states out of date, clear
to them to keep synchronization
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Iacada4e08d4409972cf472e442c4ea7d8e3d671c
Zhaowei Yuan [Wed, 31 Aug 2016 15:05:25 +0000 (23:05 +0800)]
coregl_fastpath: Bypass fast path handling for GLES API 1.x
If current GLES API version is 1.x, fastpath_eglCreateImageKHR
should call eglCreateImageKHR directly without any fast path
handling
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I21a7a24e444c156dff30931e9a888a787beafad8
Zhaowei Yuan [Wed, 31 Aug 2016 14:59:44 +0000 (22:59 +0800)]
coregl_fastpath: Re-enable modules overiding if needed
When a context with GLES API version 2.x or higher
is switched to current, fast path or trace path
related overiding should be re-enabled
Remove warning information in COREGL_INIT_ORIGINAL
since it becomes acceptable
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ie32a5018272dc55b79731780dfcd05e60ef004da
Zhaowei Yuan [Wed, 31 Aug 2016 14:53:55 +0000 (22:53 +0800)]
coregl_fastpath: Claim fast path support for 2 extensions
Add GL_EXT_texture_type_2_10_10_10_REV and
GL_OES_required_internalformat to fast path
extension supporting string
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Iad65733ba7b5c41a21146f97daf0dc157b2c5d2f
Mun, Gwan-gyeong [Mon, 29 Aug 2016 05:02:16 +0000 (14:02 +0900)]
coregl: Apply coding style and add coding style document for astyle.
Change-Id: Ib6f3fc50a31b477466361edc2d858c1dd220668a
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Fri, 26 Aug 2016 12:51:10 +0000 (21:51 +0900)]
coregl_fastpath_egl: Add Null check on _pack_egl_context_option
Change-Id: I9ba2e56d0784480d11da8c23bc88b8fc9a1a7d3f
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Zhaowei Yuan [Fri, 26 Aug 2016 21:35:15 +0000 (05:35 +0800)]
coregl_tracepath: Clear GL error after calling _sym_glGetIntegerv
Calling _sym_glGetIntegerv in tracepath_dump_context_states() may
cause an accetpable GL error, clear it.
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I2419469604ad690612584f1420a37c8dcf866d4c
Gwan-gyeong Mun [Sat, 27 Aug 2016 11:57:58 +0000 (04:57 -0700)]
This patch does not create right result.
When we run gl application, we expect the result like as
" [CoreGL] <1004> (Sat Aug 27 11:08:17 UTC 2016) Library initializing... [CoreGL] Driver GL version 3.2 "
but this patch shows " [CoreGL] <1026> (fatal: Not a git repository (or any of the parent directories): .git) Library initializing... [CoreGL] Driver GL version 3.2 "
so we should fix it
Revert "build: Use commit date instead of build date to avoid unnecessary rebuilds."
This reverts commit
c74c199cfbab5d54dad0046b0d747ace552aebe4.
Change-Id: I370d5ea701bd6635be1b99972607c5fff6fbfd58
Junghyun Kim [Thu, 25 Aug 2016 00:14:08 +0000 (09:14 +0900)]
build: Use commit date instead of build date to avoid unnecessary rebuilds.
- Problem
We use OBS to build packages in Tizen.
There is a mechanism not to rebuild when the result binary is the same.
For example, there is a dependency graph: A->B->C.
If A is modified, B would be built.
If the result RPM of B is not changed, OBS does not trigger a build of C.
To effectively use this mechanism, each packages make sure that
the result binary should be the same if the input source is the same.
There is a reason we found is including build date.
In coregl, bash command 'date' is used in CMakeList.txt.
In this case, everytime we build coregl, the build result is always different.
- Solution
Use commit date instead of build date.
There was a hint in Makefile.
COMPILE_DATE = "\"`git log -1 --pretty=format:%ci`\""
I used this command in CMakeList.txt
I tested this in my test OBS server, and the build result is unchanged
when this patch is applied.
Change-Id: Iea70e74b6808aa81905eba4afc9e72b6867c097d
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Zhaowei Yuan [Thu, 25 Aug 2016 21:54:32 +0000 (05:54 +0800)]
coregl_tracepath: Copy name with the real size
Memory region newitm->name is new allocated here
whose content is uncertain, so the result of
strlen(newitm->name) is 0 or a random number
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I9a08350c2f2326089101f3cc8df74077dd3dd37d
Zhaowei Yuan [Thu, 25 Aug 2016 01:15:07 +0000 (09:15 +0800)]
coregl: Clear GL error after getting state
Getting state in function fastpath_dump_context_states
and tracepath_dump_context_states is possible failed,
but it's acceptable due to GL API version difference,
so clear the possible GL error after getting state.
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I35cf758aa999498f001e2463c2b7988bc4579071
Zhaowei Yuan [Tue, 23 Aug 2016 21:04:18 +0000 (05:04 +0800)]
Coregl_fastpath: Change fast path process for GLES 1.1
Since contexts with different GLES API version can coexist
in a same thread, the real API version can't be decided by
driver_gl_version, so create a new global vriable to hold
the real GLES API after context switching finished. When
real GLES API version becomes 1.1, then disable fast path for
all GL interfaces.
Modification includes:
1. Create variable current_gl_api_version which will be
updated once context switching finished, if it becomes
1.1, disable fast path for all GL interfaces.
2. Change arguments list of function init_export and
_clean_overrides in order to reset egl and gl respectively
3. in function _clean_overrides(): Override all interfaces
listed in file sym_gl1.h, sym_gl2.h and sym_gl_common.h,
regardless of current GLES API version, because interface
of low version maybe called during a high version context.
Overriding here doesn't cause any problem.
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I48adacc063105c53276a9c5003142e670dce0ed3
Zhaowei Yuan [Tue, 23 Aug 2016 19:54:02 +0000 (03:54 +0800)]
coregl_fastpath: Change GL error number as driver does
GL error number should be set according to the behavior
of GL driver or specification files
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I20e2426fd8e472eba4be54b721748e4479a68e05
Zhaowei Yuan [Tue, 23 Aug 2016 19:30:15 +0000 (03:30 +0800)]
coregl_fastpath: Fix issue occurs in vertex array Enable/Disabe
Whether an vertex array is bounded or not, value of
state gl_vertex_array_enabled should be always
updated once fastpath_glEnableVertexAttribArray or
fastpath_glDisableVertexAttribArray is called, if not,
it will cause state confusion
Once an vertex array is unbounded or an new vertex
array is bounded, value of state gl_vertex_array_enabled
should be cleared
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I7d686cc603dfb74e305c64687eaea36be6f1aea1
Zhaowei Yuan [Tue, 23 Aug 2016 19:20:04 +0000 (03:20 +0800)]
coregl_fastpath: Adjust Sequence of functions according their category
It's better to put functions together which belong to
a same category
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I9919b884df98515bc85e3777fb407e3ff638874f
Gwan-gyeong Mun [Thu, 11 Aug 2016 12:21:19 +0000 (05:21 -0700)]
Merge "coregl_fastpath: reconstruct two functions" into tizen
Gwan-gyeong Mun [Thu, 11 Aug 2016 12:19:43 +0000 (05:19 -0700)]
Merge "coregl_fastpath: Fix some issue in core_fastpath_gl.c" into tizen