Joonbum Ko [Thu, 29 Jul 2021 01:22:46 +0000 (10:22 +0900)]
Fix invalid fallback routins.
Change-Id: I82b8bb8e6125f0da6b0768c3f0ded491b4556118
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Thu, 22 Jul 2021 05:52:24 +0000 (14:52 +0900)]
Change the VENDOR LIB PATH to /hal/lib
- Use the legacy path (/usr/lib/driver) if dlopen
is failed through the new path using /hal/lib/driver.
Change-Id: Ia7431e2bd66bc412491e751b8817f0316ba7d919
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Joonbum Ko [Wed, 10 Mar 2021 05:51:12 +0000 (14:51 +0900)]
Add NULL checking to prevent dereferenced problem.
Change-Id: I0ee97c594c44b06a3f3dcb9b8608cb7f3db977f3
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
xuelian.bai [Thu, 24 Dec 2020 12:41:27 +0000 (20:41 +0800)]
Fix build error for 64-bit/32-bit
uint64 is %lu in 64bit while is %llu in 32bit.
To support both, use PRI64.
Change-Id: I058b0169f76c016a2522f58ce13ead4ad022e52e
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Joonbum Ko [Tue, 22 Dec 2020 04:10:20 +0000 (13:10 +0900)]
Add missing break in switch statement.
Change-Id: I67dea9ea3c78963ac74adf89a5da5f037c13250e
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
Xuelian [Mon, 7 Sep 2020 17:42:21 +0000 (01:42 +0800)]
Add log for APIs
When COREGL_TRACE_API=1, logs like the following will be printed
D/COREGL ( 2135): coregl_tracepath_egl.c: tracepath_eglSwapBuffers(825) >
[COREGL_DBG] (0x18c4f10, 0x1904e30)
D/COREGL ( 2135): coregl_tracepath_egl.c: tracepath_eglSwapBuffers(831) >
[COREGL_DBG] tracepath_eglSwapBuffers end
Change-Id: Ic4f1d16d01424ad5e7847df49652bb072a710929
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Wed, 26 Aug 2020 10:49:28 +0000 (18:49 +0800)]
Fix Top25 DuplicateCode score
Define function and macro to eliminate duplicated code.
coregl_fastpath_gl.c:
Replace GET_REAL_OBJ(GL_OBJECT_TYPE_PROGRAM with GET_PROG_REAL_OBJ
Define function _set_gl_vertex_attrib
coregl_tracepath.c:
Define function _mem_trace_change, _init_tstate_ftd
coregl_tracepath_egl.c:
Define function _get_current_data
DC Score : 4.64 -> 4.78
SAM Score : 4.0 -> 4.03
Change-Id: I22c7f9a32f5f426b3ab41b6eb32b0873991c17e2
Xuelian [Thu, 20 Aug 2020 10:53:55 +0000 (18:53 +0800)]
Fix PP score of coregl_fastpath_egl.c
I don't think it's a issue, but SAM tool think the macro area is
too long, so delete the macro, it will not have bad effect anyway.
Change-Id: Iefe8428fb54b22784e7b1820b1040b25649969ff
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Thu, 20 Aug 2020 10:05:18 +0000 (18:05 +0800)]
Revert "Make log related global variables as local"
This reverts commit
009b410c0af64963eda30b84a093144d76207f9d.
This patch will cause build break for other package which depend on
coregl.
libEGL.so: undefined reference to `coregl_set_dlog_enable'
libEGL.so: undefined reference to `coregl_set_log_init'
libEGL.so: undefined reference to `coregl_set_log_lvl'
libEGL.so: undefined reference to `coregl_get_dlog_enable'
libEGL.so: undefined reference to `coregl_get_log_init'
libEGL.so: undefined reference to `coregl_get_log_lvl'
There is no better way to fix this GV:
if we use inline functions, performance may not be good
if we add static key words, there are build warnings
So, do not fix this GV issue.
Change-Id: I893d78b269bb157bef3871f548f27dc2c52d8f6a
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Wed, 12 Aug 2020 15:59:30 +0000 (23:59 +0800)]
Fix DuplicateCode score for fastpath and tracepath
Create functions for duplicated code:
_dump_glue_ctx_list
_init_objid_array
DuplicatedCode Score: 4.55->4.63
Change-Id: I57c6c1a1b45bf45f5148fee4c1649bb562432bb9
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Wed, 12 Aug 2020 15:47:41 +0000 (23:47 +0800)]
Fix GV score for export_initialized
Make export_initialized as static inside coregl_export_egl.c, and
use get/set function to handle it outside the file.
Change-Id: Ib608682524932a680ef8d4458005addce2f93b75
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Mon, 3 Aug 2020 16:03:01 +0000 (00:03 +0800)]
Fix CyclomaticComplexity of coregl_fastpath_gl.c and coregl_fastpath_egl.c
Wrap part of code as function to decrease complexity of following
functions:
clear_states()
fastpath_glDeleteTextures()
fastpath_eglCreateContext()
_dump_context_info()
CC Score : 5.0
Change-Id: I4de2567eeac6572610d3904af5ff28a245f0dce7
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Wed, 29 Jul 2020 17:42:26 +0000 (01:42 +0800)]
Fix CyclomaticComplexity score of function fastpath_make_context_current
There are lots of if->goto sentences, integrate them together as
one sentence.
CC Score: 4.78 --> 4.82
Change-Id: I849fb9a9d83a8b0d1c76eeb50cf9ea32cb68bed1
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Xuelian [Tue, 28 Jul 2020 17:36:54 +0000 (01:36 +0800)]
Fix CyclomaticComplexity score in coregl_tracepath.c
In function init_modules_tracepath(), fix complex code with:
1. Simpler implementation of converting from HEX to DEC
2. Use simple function to replace original statements.
Function _dump_surface is too long, pack some of its code as
two functions: _init_png_sym and _write_to_png.
CC Score: 4.24 --> 4.78
Change-Id: I1cb4dc9c95c017b6f58d44250c021d5d80e783e0
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
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