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
Gwan-gyeong Mun [Thu, 11 Aug 2016 12:14:49 +0000 (05:14 -0700)]
Merge "coregl_fastpath: Change GL error for failed real object getting" into tizen
Gwan-gyeong Mun [Thu, 11 Aug 2016 11:57:14 +0000 (04:57 -0700)]
Merge "coregl_fastpath: Convert for more parameter types" into tizen
Gwan-gyeong Mun [Thu, 11 Aug 2016 11:55:44 +0000 (04:55 -0700)]
Merge "coregl_fastpath: Add support for some extensions" into tizen
Gwan-gyeong Mun [Thu, 11 Aug 2016 11:51:13 +0000 (04:51 -0700)]
Merge "coregl_fastpath: Remove support for unnecessary interface" into tizen
Gwan-gyeong Mun [Thu, 11 Aug 2016 11:46:36 +0000 (04:46 -0700)]
Merge "coregl_fastpath: Add process of some missed state" into tizen
Zhaowei Yuan [Mon, 8 Aug 2016 20:37:30 +0000 (04:37 +0800)]
coregl_fastpath: reconstruct two functions
This patch reconstruct function fastpath_glBindFramebuffer
and fastpath_glBindFramebufferOES, make them more readable
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I4409475b970408da31bf95564954c43861657868
Zhaowei Yuan [Mon, 8 Aug 2016 20:34:17 +0000 (04:34 +0800)]
coregl_fastpath: Fix some issue in core_fastpath_gl.c
Modification includes:
1. Add process for missed target
2. Pass real object to GL driver
3. Convert output parameters as needed
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Idcb6a992db8204d5880f098d6d8b37fdaae6e553
Zhaowei Yuan [Mon, 8 Aug 2016 19:58:43 +0000 (03:58 +0800)]
coregl_fastpath: Change GL error for failed real object getting
If failed to get a real object, GL error should be set according
to the same behavior of GL driver
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I2f3f3506aa459ad1a0409a58e0364cfae3e75837
Zhaowei Yuan [Mon, 8 Aug 2016 19:40:09 +0000 (03:40 +0800)]
coregl_fastpath: Convert for more parameter types
Output paremeters which have types added by this
patch should be converted by attaching object type
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Idd582f5810062b2423e8e81e621d3eecdb5735b6
Zhaowei Yuan [Mon, 8 Aug 2016 19:21:09 +0000 (03:21 +0800)]
coregl_fastpath: Add support for some extensions
This patch adds fast path support for extensions
and add missed override process of some interfaces
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ie6a700c80048ea37310c2214063f71f6370ab85a
Zhaowei Yuan [Mon, 8 Aug 2016 19:09:02 +0000 (03:09 +0800)]
coregl_fastpath: Remove support for unnecessary interface
This patch removes some interfaces which are not supposed
to go through fast path
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: If7865ad9aee404ebaaaf7dc04e92d3f7123cf017
Zhaowei Yuan [Sun, 7 Aug 2016 19:20:04 +0000 (03:20 +0800)]
coregl_fastpath: Add process of some missed state
1. Redefine macro STATE_COMPARE
2. Add handling for state array in function
fastpath_make_context_current()
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I2e3a4b098acfbad02265e3115da38bb0006a31e4
Zhaowei Yuan [Sun, 7 Aug 2016 17:54:28 +0000 (01:54 +0800)]
coregl_fastpath_egl: Check type before retrieving object
Object type of argument buffer maybe either
TEXTURE or RENDERBUFFER, check it
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I5468ef8105d29a6c655b064f2b2406dc9b1655e6
Zhaowei Yuan [Sun, 24 Jul 2016 21:20:18 +0000 (05:20 +0800)]
Add support for some missing processing of state which is detected by Khronos CTS
Modification including:
1. Add missing contest states and related processing like
gl_shader_storage_buffer_binding
2. Rename all context states in the from of gl_num_xxx
to gl_xxx_num, for convenient macro processing in
fastpath_glBindBuffer()
3. Clear all buffer binding related state arrays which are
set in fastpath_glBindBufferBase() if argument buffer 0 is
passed to fastpath_glBindBuffer()
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ie28eaac2bdff8299c4575e6415c34ae41273f39f
Zhaowei Yuan [Sun, 24 Jul 2016 18:17:36 +0000 (02:17 +0800)]
Add considering of initial value when compare state
Initial value of each state can be possible the same
with the variable which it is going to compare
with, it blocks caller from calling of GPU Verndor GL Driver's mistaken
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I8ecfb62a4679f34d3925ba41ddad52892183f16d
Zhaowei Yuan [Sun, 24 Jul 2016 15:06:17 +0000 (23:06 +0800)]
Add support for extensions needed by Khronos CTS
Those extensions are needed by Khronos CTS test case
"ES3-CTS.gtf.GLCoverage.CoverageES30"
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I5acee917083d9af9a48593ddf588ce8b2ea307ed
Zhaowei Yuan [Sun, 24 Jul 2016 14:13:35 +0000 (22:13 +0800)]
Fix runtime warning about "GL_MAX_UNIFORM_BUFFER_BINDINGS"
Vaule of initial_ctx->gl_num_uniform_buffer_bindings[0]
is get by calling glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS..)
Various GPU Vendor GLES/EGLDirvers can return the result from 36 to 72.
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I8e25dbd7f166933a1718ebbaf8d923c383b5e508
xuelian.bai [Thu, 7 Jul 2016 11:02:28 +0000 (19:02 +0800)]
Remove assert in eglReleaseThread,according to spec,
Even if EGL is not initialized on any EGLDisplay,
eglReleaseThread should succeed
Change-Id: Ie15e8f57305d2a8f81cb6e3ddb623ca8bae08358
Signed-off-by: xuelian.bai <xuelian.bai@samsung.com>
Zhaowei Yuan [Wed, 13 Jul 2016 20:11:00 +0000 (04:11 +0800)]
Fix memory accessing overflow
Size of arrays like ctx->gl_tex_2d_state[] should
be assgined to GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
which is the max number of active textures
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Id2512f705beb6fff532c108202910cca24504103
Zhaowei Yuan [Wed, 13 Jul 2016 20:09:00 +0000 (04:09 +0800)]
Fix context creating error when FASTPATH is enabled
1. According to EGL spec file, set default value of
major_version in real_ctx_option as 1 and set default
value of minor_version in real_ctx_option as 0
2. Don't take an exist context as the sharing of the
new created one if their major versions don't match
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I2d9e3333adf6601e921c1ec6befd129f4673a887
Zhaowei Yuan [Wed, 13 Jul 2016 20:02:44 +0000 (04:02 +0800)]
Apply fastpath and tracepath for GLES 1.1
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I025add95138d500d7c7f25af953b2cc1ebaedd46
Zhaowei Yuan [Wed, 6 Jul 2016 17:53:17 +0000 (01:53 +0800)]
Add support for GLES 3.2
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I3f7b9a3d5f19408c537945b6c7a7fd0cb9a1b7ef
xuelian.bai [Tue, 5 Jul 2016 17:07:29 +0000 (01:07 +0800)]
Fix GLview gear test crash
Crash is caused by
1. Limited temp string length
2. Uninitialized egl context.
GLview gear test created a new context
but never makecurrent it, that cause
crash in iterate.
Change-Id: I603268ebf50a7019e9c6cca4f772f776d773f159
Signed-off-by: xuelian.bai <xuelian.bai@samsung.com>
xuelian.bai [Wed, 6 Jul 2016 09:25:48 +0000 (17:25 +0800)]
Fix runtime warning for GLES3.2
Change-Id: I0d4a1455a3b90a726c3ec66f705ebd7c94dc0b92
Signed-off-by: xuelian.bai <xuelian.bai@samsung.com>
Zhaowei Yuan [Wed, 22 Jun 2016 15:20:35 +0000 (23:20 +0800)]
Separate GLES API according to version
This patch separates GLES API into 2 individual librays:
libGLESv1_CM.so.1.1 & libGLESv2.so.2.0
code changes:
1. Divide coregl_gl.c into coregl1.c, coregl2.c and coregl_common.c
2. Divide sym_gl.h into sym_gl1.h, sym_gl2.h and sym_gl_common.h
3. Remove fastpath and tracepath support for GLES1.1 APIs
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I178cb4b0926236219f031fbf0c898e238faf1dee
Zhaowei Yuan [Tue, 14 Jun 2016 18:28:10 +0000 (02:28 +0800)]
Add support for GLES V1.1
This patch adds supprot for GLES V1.1:
1. Add GLES V1.1 interfaces
2. Add typedef PFNGLPOINTSIZEPOINTEROESPROC in include_khr\gles\gl.h
3. Create soft link libGLESv1_CM.so.1.1
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: I5f4c227abda85fed825573281bcc0bb20458d1f4
Zhaowei Yuan [Mon, 13 Jun 2016 21:43:08 +0000 (05:43 +0800)]
Revert commit "Add GLESV1_CM virtual (dummy function) library"
Reverted commit ID:
448c9c9a97e4d97b1c1982ea3fbf9ecebf2767e0
Link: https://review.tizen.org/gerrit/#/c/66597/2
Signed-off-by: Zhaowei Yuan <zhaowei.yuan@samsung.com>
Change-Id: Ie0a2281b9aa8b0ece13fea8d6e33497568c4bd2e
Mun, Gwan-gyeong [Mon, 30 May 2016 08:54:13 +0000 (17:54 +0900)]
Add support for eglFrontBufferSetSEC
Change-Id: I911384d5da893412d52b0053d9cf562f4d7bb715
Mun, Gwan-gyeong [Tue, 17 May 2016 08:20:43 +0000 (17:20 +0900)]
Update Khronos headers
- Generated on date
20160419
- from https://www.khronos.org/registry/gles/
Change-Id: I65e643552516b83d240c667bdbaa479c295db911
Xuelian Bai [Tue, 10 May 2016 19:33:47 +0000 (03:33 +0800)]
Add support for KHR_partial_update and KHR_swap_buffers_with_damage
Extension links:
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_partial_update.txt
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_swap_buffers_with_damage.txt
Signed-off-by: Xuelian Bai <xuelian.bai@samsung.com>
Change-Id: I34a0a513da6f7563ddc32cef4f0804df6f886b65
xuelian.bai [Fri, 6 May 2016 05:34:12 +0000 (13:34 +0800)]
Change type of ctx name from array to pointer, to avoid data overflow.
Change-Id: Iaa01af8521369b596f021e10994f517a0e00e605
Mun, Gwan-gyeong [Mon, 2 May 2016 12:34:54 +0000 (21:34 +0900)]
Add null check before pointer value dereference
Change-Id: Ife9b8af01a3a148c6a4a5c49385cdc0d7c567584
Mun, Gwan-gyeong [Fri, 29 Apr 2016 13:47:28 +0000 (22:47 +0900)]
Fix implicit removal of dummy symbolic link file (libGLESv1_CM.so.1.1) by ldconfig.
Change-Id: Ic21138555a2998f72818ad849ec43dd5f2857893
Mun, Gwan-gyeong [Thu, 28 Apr 2016 02:58:14 +0000 (11:58 +0900)]
Fix typo of glesv1.1 package config file
Change-Id: Ia201e61cf7de3290f14fe78fe4948fa7809cd474
Mun, Gwan-gyeong [Mon, 25 Apr 2016 13:50:35 +0000 (22:50 +0900)]
Remove symbolic link of libGLESv1_CM.so and create libGLESv1_CM.so's symbolic link on rpm post section.
: on https://build.tizen.org/package/view_file?expand=1&file=_service%3Agbs%3Arpm.spec&package=rpm&project=Tizen%3ABase
"install -m 644 %{SOURCE9} %{buildroot}%{rpmhome}/fileattrs/libsymlink.attr" makes explicit dependancy for symbolic link file if package does not include symbolic link's target.
Change-Id: Ib3515321e4ec47755d1522794d6917b9d94336ca
Mun, Gwan-gyeong [Tue, 19 Apr 2016 16:11:38 +0000 (01:11 +0900)]
Add GLESV1_CM virtual (dummy function) library.
- It is used for application linking with GLESV1_CM
- this library is provided by devel package
Change-Id: Ifd0483e3b8d4a6dd6d8031517a5e70df881827fd
Mun, Gwan-gyeong [Tue, 15 Mar 2016 11:53:04 +0000 (20:53 +0900)]
Fix int to pointer typecasting build warnings on 64bit environment.
Change-Id: I7b4a66bf3af8086447e07be21e248ca703674c51
Mun, Gwan-gyeong [Mon, 14 Mar 2016 09:03:20 +0000 (18:03 +0900)]
Replace vulnerable function 'sprintf' to 'snprintf on coregl_fastpath_egl.c
Change-Id: Idabe5f0a01f44ca8e00217d870847966dcd9a8fa
joonbum.ko [Fri, 11 Mar 2016 05:46:25 +0000 (14:46 +0900)]
Modify spec file for installing license files.
Change-Id: I93d99158ed5eda1bba6ef184a3d892f7f6edf821
Mun, Gwan-gyeong [Mon, 7 Mar 2016 14:12:38 +0000 (23:12 +0900)]
Replace vulnerable function 'sprintf' to 'snprintf'
Change-Id: I746a13501ebc7f4f0df320f6639928a5f6dab494
Mun, Gwan-gyeong [Mon, 7 Mar 2016 13:08:20 +0000 (22:08 +0900)]
Add null check before pointer value dereference
Change-Id: I45e790447f9e03b19bd1a77e03c1d3b9a2ac906a
Mun, Gwan-gyeong [Mon, 7 Mar 2016 12:55:07 +0000 (21:55 +0900)]
Replace vulnerable function 'strcpy' to 'strncpy'
Change-Id: I120694b6c0c1ed0dbfc58f76ea2811d4517b0cdb
Mun, Gwan-gyeong [Mon, 7 Mar 2016 12:48:46 +0000 (21:48 +0900)]
Add Null check on Return value of a function 'dlsym'
Change-Id: Ibd16dfa12003dbd6964c08cd1c06688cd0aa34aa
Mun, Gwan-gyeong [Mon, 7 Mar 2016 06:22:51 +0000 (15:22 +0900)]
Update CoreGL License
Apache 2.0
SGI Free Software License B v2.0
MIT
Zlib
Change-Id: Ic4942c3b78377caf2a66b7fac048727be0ffcb62