platform/core/uifw/coregl.git
2 years agoApplied -fcommon for HWASan build 40/265440/1 sandbox/akazmin/hwasan_build
Andrey Kazmin [Wed, 7 Apr 2021 10:59:37 +0000 (13:59 +0300)]
Applied -fcommon for HWASan build

Change-Id: I1151c46943b69eb4a1feef7ec38aeb848ef31670
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
2 years agoFix invalid fallback routins. 18/261918/1 accepted/tizen_6.5_unified tizen_6.5 accepted/tizen/6.5/unified/20211028.113924 accepted/tizen/unified/20210802.135707 submit/tizen/20210727.093930 submit/tizen/20210802.011415 submit/tizen_6.5/20211028.163101 tizen_6.5.m2_release
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>
2 years agoChange the VENDOR LIB PATH to /hal/lib 54/261654/3
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>
3 years agoAdd NULL checking to prevent dereferenced problem. 64/254864/1 accepted/tizen/unified/20210316.151415 submit/tizen/20210312.022457 submit/tizen/20210316.021249
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>
3 years agoFix build error for 64-bit/32-bit 73/250373/1 accepted/tizen/unified/20201228.130120 submit/tizen/20201224.062748
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>
3 years agoAdd missing break in switch statement. 01/250201/1 submit/tizen/20201223.060207
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>
3 years agoAdd log for APIs 90/243390/4
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>
3 years agoFix Top25 DuplicateCode score 76/242376/2
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

3 years agoFix PP score of coregl_fastpath_egl.c 05/241405/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.113635 accepted/tizen/6.0/unified/hotfix/20201103.001646 accepted/tizen/unified/20200827.105755 submit/tizen/20200820.070254 submit/tizen/20200825.075755 submit/tizen_6.0/20201029.205105 submit/tizen_6.0_hotfix/20201102.192505 submit/tizen_6.0_hotfix/20201103.114805 tizen_6.0.m2_release
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>
3 years agoRevert "Make log related global variables as local" 03/241403/2
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>
3 years agoFix DuplicateCode score for fastpath and tracepath 60/240860/3 submit/tizen/20200818.051921
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>
3 years agoFix GV score for export_initialized 58/240858/1
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>
3 years agoFix CyclomaticComplexity of coregl_fastpath_gl.c and coregl_fastpath_egl.c 83/240083/3
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>
3 years agoFix CyclomaticComplexity score of function fastpath_make_context_current 29/239729/2
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>
3 years agoFix CyclomaticComplexity score in coregl_tracepath.c 21/240821/2
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>
3 years agoFix DuplicateCode for gl31.h/gl32.h 80/239480/2
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>
3 years agoFix MCD score 63/239463/2
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>
3 years agoMake log related global variables as local 83/239383/3
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>
3 years agoFix duplicate code issue for coregl_fastpath_gl.c 53/238653/5
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

3 years agoFix Global Variable issue of tracepath. 66/238366/3
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

3 years agoFix Duplicate Code issue in coregl_tracepath_gl.c 48/237648/3
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

4 years agoChanged extension id of EGL_TIZEN_native_fence_sync 63/229163/1 accepted/tizen/unified/20200409.083552 submit/tizen/20200408.064443
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>
4 years agoAdded EGL_TIZEN_native_fence_sync to eglext.h 04/227704/2 accepted/tizen/unified/20200323.173025 submit/tizen/20200317.075917 submit/tizen/20200320.053813
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>
4 years agoFixed build warning about stringop-truncation 76/223876/1 accepted/tizen/unified/20200205.125256 submit/tizen/20200205.002234
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>
4 years agoDeleted unnecessary files related with image dump. 19/214019/2
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>
4 years agoDeleted unreachable code 34/223834/1
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>
4 years agoFixed no_unlock issue. 33/223833/1
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>
4 years agoFixed double free issue. 32/223832/1
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>
4 years agocoregl_fastpath_gl: Refactor function fastpath_glDeleteBuffers
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>
4 years agocoregl_fastpath_egl: Refactor function fastpath_eglMakeCurrent
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>
4 years agocoregl_tracepath: Refactor function _dump_surface
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>
4 years agocoregl_fastpath: Refactor function fastpath_make_context_current
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>
4 years agopackage version up to 0.2.0 60/216760/4 accepted/tizen/unified/20191104.115135 submit/tizen/20191104.003215
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

4 years agoDeleted the dependency of libgbm. 45/209245/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.015932 accepted/tizen/5.5/unified/mobile/hotfix/20201027.075802 accepted/tizen/5.5/unified/wearable/hotfix/20201027.110845 accepted/tizen/unified/20190708.114211 submit/tizen/20190704.042625 submit/tizen/20190704.050204 submit/tizen/20190708.030211 submit/tizen_5.5/20191031.000005 submit/tizen_5.5_mobile_hotfix/20201026.185105 submit/tizen_5.5_wearable_hotfix/20201026.184305 tizen_5.5.m2_release
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>
5 years agoexport_initialized is set to '0' when called coregl terminate 13/198113/2 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20190125.004617 accepted/tizen/unified/20190128.061654 submit/tizen/20190123.085446 submit/tizen_5.0/20190123.085434
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>
5 years agoModified to resolve some coding rule violations. 15/198115/1
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>
6 years agoRestore -fcommon flag for ASan builds. 92/170492/1 accepted/tizen_4.0_unified tizen_4.0 accepted/tizen/4.0/unified/20180226.061610 accepted/tizen/5.0/unified/20181102.022937 accepted/tizen/unified/20180322.145005 submit/tizen/20180320.075658 submit/tizen_4.0/20180221.051822 submit/tizen_5.0/20181101.000005
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>
6 years agocoregl_tracepath_gl: Fix possible dereferencing null of _add_glbuf_object() 71/139771/2 accepted/tizen/4.0/unified/20170829.020129 accepted/tizen/unified/20170809.135001 submit/tizen/20170808.030621 submit/tizen_4.0/20170828.100004 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release
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>
6 years agocoregl_tracepath: Fix possible dereferencing null of _get_trace_data() 70/139770/2
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>
6 years agocoregl_trace: Fix possible dereferencing null of add_to_general_trace_list() 69/139769/2
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>
6 years agocoregl_fastpath_egl: Fix possible dereferencing null svace issues 68/139768/2
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>
6 years agocoregl_fastpath_gl: Fix svace issues - unreachable, null deref 66/139766/2
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>
6 years agocoregl_faspath: Fix possible dereferencing null of init_modules_tstate_fastpath() 65/139765/1
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>
6 years agocoregl: Fix possible dereferencing null of init_new_thread_state() 64/139764/1
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>
6 years agoAdded libtpl-egl to requires package. 50/139050/1 accepted/tizen/4.0/unified/20170816.013445 accepted/tizen/unified/20170720.164901 submit/tizen/20170718.051559 submit/tizen/20170719.053735 submit/tizen/20170719.075143 submit/tizen_4.0/20170811.094300
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>
6 years agocoregl_fastpath : fix wrong GLEnum usage for glGetIntegerv 54/127354/2
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

6 years agoeglext.h: Revised the wrong proc name of eglFrontBufferSetSEC. 96/129296/1
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>
6 years agocoregl_tracepath_egl: Added EGL_SEC_frontbuffer_set extension API to tracepath_egl. 95/129295/1
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>
7 years agoRevert "add libpng License to the spec file" 97/125597/2
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

7 years agoadd libpng License to the spec file 56/125556/1
SooChan Lim [Tue, 18 Apr 2017 04:29:29 +0000 (13:29 +0900)]
add libpng License to the spec file

Change-Id: I5fd081211997174af2cce98b0c3e5fb85a20f906

7 years agocoregl_fastpath_egl: Fix possible null pointer dereference 62/122962/1 accepted/tizen/unified/20170406.053435 submit/tizen/20170404.080448 tizen_4.0.m1_release
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>
7 years agouse %license macro to copy the COPYING file. 14/120214/2 accepted/tizen_3.0_ivi accepted/tizen_3.0_wearable accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable accepted/tizen/3.0/common/20170329.150915 accepted/tizen/3.0/ivi/20170329.021448 accepted/tizen/3.0/mobile/20170329.020823 accepted/tizen/3.0/tv/20170329.021047 accepted/tizen/3.0/wearable/20170329.021236 accepted/tizen/common/20170331.152521 accepted/tizen/ivi/20170329.034206 accepted/tizen/mobile/20170329.034000 accepted/tizen/tv/20170329.034115 accepted/tizen/unified/20170329.034228 accepted/tizen/wearable/20170329.034138 submit/tizen/20170328.072410 submit/tizen_3.0/20170328.074051
SooChan Lim [Wed, 22 Mar 2017 06:26:06 +0000 (15:26 +0900)]
use %license macro to copy the COPYING file.

Change-Id: Ib8b6144656ef05cebd999b7af74cf1db077f46d5

7 years agocoregl_fastpath: add support for create context robustness 54/114754/1
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

7 years agoCoreGL: Add support for OVR extensions 64/109064/3 tizen_3.0_tv accepted/tizen/3.0/common/20170119.105903 accepted/tizen/3.0/ivi/20170119.021025 accepted/tizen/3.0/mobile/20170119.020932 accepted/tizen/3.0/tv/20170119.020951 accepted/tizen/3.0/wearable/20170119.021008 accepted/tizen/common/20170119.171703 accepted/tizen/ivi/20170118.223552 accepted/tizen/mobile/20170118.223500 accepted/tizen/tv/20170118.223519 accepted/tizen/unified/20170309.034704 accepted/tizen/wearable/20170118.223534 submit/tizen/20170118.080808 submit/tizen_3.0/20170118.081015 submit/tizen_unified/20170308.100410
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

7 years agocoregl_fastpath: remove gl_color_writemask_for_glColorMask 55/106755/1
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

7 years agocoregl: Open driver library libGLESv1_CM.so forwardly 77/103677/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.141758 accepted/tizen/3.0.m2/tv/20170104.142135 accepted/tizen/3.0.m2/wearable/20170104.142429 accepted/tizen/3.0/common/20161221.180801 accepted/tizen/3.0/ivi/20161221.005627 accepted/tizen/3.0/mobile/20161221.010049 accepted/tizen/3.0/tv/20161221.005545 accepted/tizen/3.0/wearable/20161221.005609 accepted/tizen/common/20161210.161923 accepted/tizen/ivi/20161212.024057 accepted/tizen/mobile/20161212.024023 accepted/tizen/tv/20161212.024035 accepted/tizen/wearable/20161212.024048 submit/tizen/20161209.083001 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161209.083106 submit/tizen_3.0/20161219.222759
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

7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glTexImage2D() 52/102652/1 accepted/tizen/3.0/common/20161207.194624 accepted/tizen/3.0/ivi/20161207.012535 accepted/tizen/3.0/mobile/20161207.012440 accepted/tizen/3.0/tv/20161207.012458 accepted/tizen/3.0/wearable/20161207.012516 accepted/tizen/common/20161207.184030 accepted/tizen/ivi/20161207.030010 accepted/tizen/mobile/20161207.025915 accepted/tizen/tv/20161207.025930 accepted/tizen/wearable/20161207.025952 submit/tizen/20161206.090232 submit/tizen_3.0/20161206.090328
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferSt... 51/101251/1 accepted/tizen/3.0/common/20161203.012216 accepted/tizen/3.0/ivi/20161201.075441 accepted/tizen/3.0/mobile/20161201.075431 accepted/tizen/3.0/tv/20161201.075434 accepted/tizen/3.0/wearable/20161201.075437 accepted/tizen/common/20161201.135922 accepted/tizen/common/20161202.233538 accepted/tizen/ivi/20161202.005454 accepted/tizen/mobile/20161202.005357 accepted/tizen/tv/20161202.005411 accepted/tizen/wearable/20161202.005438 submit/tizen/20161201.053512 submit/tizen_3.0/20161201.053840 submit/tizen_common/20161201.141915
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferSt... 49/101249/1
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferSt... 34/101234/3
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of glGenRenderBuffersOES. 30/101230/1
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>
7 years agocoregl_fastpath_egl: Fix null reference in failure path of _dump_context_info. 25/101225/2
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>
7 years agoMerge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderb...
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

7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glRenderbufferSt... 27/101227/1
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>
7 years agoMerge "coregl_tracepath_gl: Fix null reference in failure path tracepath_glGenTexture...
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

7 years agoMerge "coregl_tracepath_gl: Fix null reference in failure path tracepath_glGenRenderb...
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

7 years agocoregl_tracepath_gl: Fix null reference in failure path tracepath_glGenTextures() 20/101220/1
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>
7 years agocoregl_tracepath_egl: Fix null reference in failure path of _dump_context_info. 21/101221/1
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path tracepath_glGenRenderbuffers() 18/101218/1
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path tracepath_glDeleteRenderbuffe... 13/101213/2
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>
7 years agocoregl_tracepath_egl: Fix null reference in failure path of _dump_context_info. 12/101212/1
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>
7 years agoMerge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteT...
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

7 years agoMerge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteR...
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

7 years agoMerge "coregl_tracepath_gl: Fix null reference in failure path of tracepath_fbdump_up...
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

7 years agocoregl_tracepath_gl: Fix null reference in failure path tracepath_glEGLImageTargetRen... 01/101201/2
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glEGLImageTarget... 93/101193/2
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteTextures() 92/101192/1
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_glDeleteRenderbu... 87/101187/1
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>
7 years agocoregl_tracepath_gl: Fix null reference in failure path of tracepath_fbdump_update() 85/101185/1
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>
7 years agocoregl_fastpath: Fix null reference in failure path of _create_program_object() 78/101178/1
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>
7 years agocoregl: Re-organize log solution 81/96281/2 accepted/tizen/3.0/common/20161114.082120 accepted/tizen/3.0/ivi/20161110.020454 accepted/tizen/3.0/mobile/20161110.020359 accepted/tizen/3.0/tv/20161110.020419 accepted/tizen/3.0/wearable/20161110.020437 accepted/tizen/common/20161109.140321 accepted/tizen/ivi/20161109.002937 accepted/tizen/mobile/20161109.002925 accepted/tizen/tv/20161109.002931 accepted/tizen/wearable/20161109.002934 submit/tizen/20161108.110211 submit/tizen_3.0/20161108.110713 submit/tizen_3.0_common/20161110.084657
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>
7 years agoupdate Khronos GLES/EGL headers 61/95961/1
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

7 years agocoregl_fastpath: avoid "Invalid context attribute" from efl_webview_app 99/95699/5
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

7 years agocoregl_fastpath: Separate glColorMask state from glColorMaski and glColorMaskiOES 85/95585/5
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

7 years agoBuild: Fix loading path of real vendor driver. 31/94131/1 accepted/tizen/3.0/ivi/20161103.121333 accepted/tizen/3.0/mobile/20161103.121105 accepted/tizen/3.0/tv/20161103.121315 accepted/tizen/3.0/wearable/20161103.121322 accepted/tizen/common/20161028.114823 accepted/tizen/ivi/20161028.152859 accepted/tizen/mobile/20161028.152809 accepted/tizen/tv/20161028.152826 accepted/tizen/wearable/20161028.152841 submit/tizen/20161028.071840 submit/tizen_3.0/20161103.052640
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

7 years agocoregl_fastpath_gl: Fix string over flow at _COREGL_FASTPATH_SUPPORTED_EXTENSION 72/92072/1 accepted/tizen/3.0/ivi/20161028.134039 accepted/tizen/3.0/mobile/20161028.133149 accepted/tizen/3.0/tv/20161028.133501 accepted/tizen/3.0/wearable/20161028.133756 accepted/tizen/common/20161018.175359 accepted/tizen/ivi/20161019.044319 accepted/tizen/mobile/20161019.044227 accepted/tizen/tv/20161019.044243 accepted/tizen/wearable/20161019.044257 submit/tizen/20161018.110254 submit/tizen_3.0/20161028.062323 submit/tizen_3.0/20161028.082423 submit/tizen_3.0_common/20161104.104000
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

7 years agocoregl_tracepath: Clear thread state for trace path terminating 85/90485/2
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

7 years agocoregl: Correct a typo 99/91699/2
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

7 years agocoregl_fastpath: Pass buffer to GL driver for GLES 1.x 83/91483/1
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

7 years agocoregl_fastpath: Create image with native surface 80/91480/1
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

7 years agocoregl_fastpath: Keep frame buffer binding state synchronization 38/87638/3 accepted/tizen/3.0/ivi/20161011.043906 accepted/tizen/3.0/mobile/20161015.032815 accepted/tizen/3.0/tv/20161016.004200 accepted/tizen/3.0/wearable/20161015.082015 accepted/tizen/common/20161004.194348 accepted/tizen/ivi/20161005.231845 accepted/tizen/mobile/20161005.231758 accepted/tizen/tv/20161005.231812 accepted/tizen/wearable/20161005.231827 submit/tizen/20161004.102645 submit/tizen_3.0_ivi/20161010.000001 submit/tizen_3.0_mobile/20161015.000001 submit/tizen_3.0_tv/20161015.000001 submit/tizen_3.0_wearable/20161015.000001
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

7 years agocoregl_fastpath: Fix NULL pointer access 55/88655/2
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

7 years agocoregl_fastpath: Fix logic error for module override switching 28/87128/3
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

7 years agowraps/coregl : Fix loading of CoreGL libary path 22/90122/1
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>
7 years agocoregl_fastpath: Change the module overriding when the API version is changed. 55/86855/3
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

7 years agocoregl_fastpath: Fix memory overread issue 54/86854/2
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

7 years agocoregl_fastpath: Keep states synchronization between color mask functions 95/86395/2
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

7 years agocoregl_fastpath: Keep state synchronization between binding functions 90/86390/2
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

7 years agocoregl_fastpath: Synchronize transform feedback buffer binding state 88/86388/2
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

7 years agocoregl_fastpath: Bypass fast path handling for GLES API 1.x 85/86385/2
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