summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-12-16YaGL: Modified the startup scriptarchives/tizen_20150513jinhyung.jo2-4/+3
Checks the device node instead of the kernel command. Change-Id: I69aa6e322eb45d22454b56199eb12ff661c16439 Signed-off-by: Jinhyung Jo <jinhyung.jo@samsung.com>
2014-09-16Remove static variable for identifying wl_drm buffersTina Zhang10-13/+40
libwayland-drm.a is static link for libEGL.so and libgbm-yagl.so. We can't rely on comparing the address of a static vtable symbol in libwayland-drm.a to determine if a wl_buffer is a wl_drm_buffer. Instead, we move the vtable into the wl_drm struct and use that for comparing. Change-Id: I38e397f2d4806178ebb51bb3850040fad7961b0f Signed-off-by: Tina Zhang <tina.zhang@intel.com>
2014-09-16YaGL: Block for the frame callback in lock_back not swap_buffersTina Zhang1-23/+19
If the throttle only be used in the yagl_wayland_window_swap_buffers(), then in some situations the yagl_wayland_window_get_buffer() may get the NULL buffer. This could let the App draw into the wrong surface. Do throttle in the yagl_wayland_window_lock_back() will solve the problem. Change-Id: Id1d2bc8f1c95b3c956118b36b07b20cc1615046c Signed-off-by: Tina Zhang <tina.zhang@intel.com>
2014-07-29Revert "Remove static variable for identifying wl_drm buffers"Stanislav Vorobiov10-41/+13
This reverts commit f19f89d68723c868e3b1d8bbf75e04cf4e1809ba. Change-Id: Iab08ab64a0ede945298e5006cb441ea0c1d4ca4f Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-07-29Remove static variable for identifying wl_drm buffersTina Zhang10-13/+41
libwayland-drm.a is static link for libEGL.so and libgbm-yagl.so. We can't rely on comparing the address of a static vtable symbol in libwayland-drm.a to determine if a wl_buffer is a wl_drm_buffer. Instead, we move the vtable into the wl_drm struct and use that for comparing. Change-Id: I38e397f2d4806178ebb51bb3850040fad7961b0f Signed-off-by: Tina Zhang <tina.zhang@intel.com>
2014-06-02YaGL: Don't report GL_EXT_texture_storage supporttizen_3.0_ivi_releasetizen_3.0.m14.3_ivi_releasetizen_3.0.m14.2_ivi_releasetizen_3.0.2014.q3_common_releasesubmit/tizen_mobile/20141120.000000submit/tizen_ivi/20140623.104834submit/tizen_ivi/20140602.082939submit/tizen_common/20140602.082932accepted/tizen/ivi/20140624.123215accepted/tizen/common/20140610.160436tizen_3.0_ivitizen_3.0.m14.3_ivitizen_3.0.m14.2_ivitizen_3.0.2015.q1_commontizen_3.0.2014.q4_commontizen_3.0.2014.q3_commonaccepted/tizen_3.0.m14.3_iviaccepted/tizen_3.0.2014.q3_commonStanislav Vorobiov2-4/+0
We do support glTexStorageXXX in GLESv3, however, GL_EXT_texture_storage is different. GL_EXT_texture_storage requires supporting a lot of additional internal formats, which is hard to do for all possible host OpenGL versions, especially for OpenGL 2.1. Thus, we don't report GL_EXT_texture_storage support anymore Change-Id: I53bc097c453afac93c42f72b018e04a4e5a7438c Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-06-02YaGL: Report GL_OES_surfaceless_context supportStanislav Vorobiov2-0/+4
EGL_KHR_surfaceless_context can be used only with contexts that support GL_OES_surfaceless_context. YaGL supports GL_OES_surfaceless_context for any kind of context, so report this always Change-Id: I6d515b8b6eccff8a030508f1c2f1fc12db58d520 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-06-02YaGL: Don't report GL_ARB_texture_rectangle supportStanislav Vorobiov3-12/+0
We don't support GL_ARB_texture_rectangle, so don't report it in extension string Change-Id: Ib341b3cff3bd3ea70a5c70d6b3b5557d0c68d390 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-05-23add conditionnal build for emulator repos onlysubmit/tizen_ivi/20140528.131238submit/tizen_common/20140523.214219submit/tizen/20140528.103449accepted/tizen/ivi/20140612.112222Stephane Desneux1-0/+5
Package will be excluded from build except if the %with_emulator flag is defined in the project config. Change-Id: I1aab2e922399bd5a36c96ee9e6956b40be381826 Bug-Tizen: TIVI-2243 Bug-Tizen: TC-9 Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
2014-05-06YaGL: Remove X11 dependency from EGL headerssubmit/tizen_common/20140523.073647submit/tizen/20140506.063317accepted/tizen/common/20140506.152918Stanislav Vorobiov2-1/+11
Change-Id: I145130455797df19fbd3706b76e92fa72c65d20b Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-05-06YaGL: Remove X11 dependency for wayland buildssubmit/tizen/20140506.061245Stanislav Vorobiov1-6/+7
Change-Id: I1f6fdbfe354c7ee8c22ec30a5b4941be697e68a1 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-04-28YaGL: Fix glTexImageXXX NULL pointer offset bugsubmit/tizen/20140428.162945Stanislav Vorobiov2-4/+14
If we set non-0 GL_UNPACK_SKIP_XXX and call glTexImageXXX with NULL pointer then NULL will get offset and it'll result in guest app crash. We should offset NULL data pointer only if unpack PBO is bound, when no unpack PBO bound we should just calculate the size and don't offset the pointer Change-Id: Ie921016f0245f7042393cae98f04f80300bc85a1 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-04-14YaGL: Optimize glGetXXXsubmit/tizen/20140422.144844Stanislav Vorobiov11-135/+1095
1. Keep track of all remaining context state, thus, glGetXXX queries will return state values without vmexit 2. Cache glGetXXX results on target, queries such as GL_XXX_MAX don't change over time, so no need to vmexit every time user wants to read them Change-Id: I08de6a51b88ff70d60e6aaf1c7cf2161ea3b06b6 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-04-03YaGL: Configurable behavior for glBlitFramebufferStanislav Vorobiov3-2/+23
Currently minifying and magnifying blits in glBlitFramebuffer are disabled because of host OpenGL driver problems on many GPUs, they simply crash. But we want to be able to enable this for some apps that require it, thus we introduce YAGL_MIN_MAG_BLITS environment variable. We currently use this to run nintendo wii games with dolphin-emu, since dolphin-emu uses minifying glBlitFramebuffer every frame. For GameCube games however dophin-emu doesn't use it, so they can be run as usual Change-Id: Ie11a852bc53700231ce012938a8a531bb4e88394 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-31YaGL: Report OpenGL ES 3.0 support in eglQueryStringsubmit/tizen/20140402.053430accepted/tizen/ivi/panda/20140402.181503accepted/tizen/ivi/20140410.160645accepted/tizen_ivi_pandaStanislav Vorobiov1-1/+5
Change-Id: Ibf432697aa363911d911790a14df4d23c6ca46f9 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix separate depth/stencil attachmentssubmit/tizen/20140327.052722accepted/tizen/ivi/panda/20140327.194438Stanislav Vorobiov1-2/+20
Separate depth/stencil attachments are almost never supported on desktop OpenGL, so return GL_FRAMEBUFFER_UNSUPPORTED in this case, standard allows it Change-Id: Ia141c1990b072dd38bc96218dc9b99a1c59211bc Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix glClientWaitSync and glGetSyncivStanislav Vorobiov2-8/+24
Return proper error codes and statuses Change-Id: Ic75f7605c3eabe8aae8074188b9669ecb7c007c3 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix buffer object unbindingStanislav Vorobiov1-3/+9
When unbinding buffer object we should detach it from all attachment points, not just the first one Change-Id: I61dc449a6d20cbda112137ea12d8b084d6dfdeb2 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix pixel format bpp data typeStanislav Vorobiov1-2/+2
Should be int, not unsigned int Change-Id: I1a12d41addf1d5b965147078c819467dc2875109 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE queryStanislav Vorobiov1-4/+8
This query should fail when attachment is GL_DEPTH_STENCIL_ATTACHMENT Change-Id: I79efaf1a075d02a0e540ce586fcfbcf3ca1764a4 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix ETC2 textures unpackingStanislav Vorobiov1-24/+24
ETC2 textures were unpacking incorrectly if width or height were not multiple of block size. This is now fixed Change-Id: I68f249b61e285af8142115c4f7e907f66483ec78 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-21YaGL: Fix sized GL_DEPTH_COMPONENT texturesStanislav Vorobiov2-0/+28
Sized GL_DEPTH_COMPONENT textures are treated as luminance textures in desktop OpenGL, but according to OpenGL ES 3.0 they should be red, thus, we need to swizzle them. Also, when texture data is respecified we should unswizzle the texture when needed Change-Id: Ia1d5d3de860c04848a09bf84ac4a98f94466ea97 Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
2014-03-06Merge branch 'glesv3' into tizenStanislav Vorobiov123-4185/+24236
Change-Id: Iccd757b9ff0096faf69619a9ff5e1344ae0cab7e
2014-03-06YaGL: Version bumpglesv3Stanislav Vorobiov1-1/+1
GLESv3 merge version bump Change-Id: Ice426f2047d3669b33d75ad0d17141bb0f0ffcc1
2014-03-06YaGL: Fixes for Mac OS XStanislav Vorobiov4-14/+42
* glClearBufferfv must clamp floats by itself or else host OpenGL driver will crash * Don't call glGetIntegerv(GL_MAX_VARYING_COMPONENTS) * Features that are in core profile are not exposed in extension list, take this into account while creating our own extension list Change-Id: Ia9d1744b3a4880a2f20ea104e94811df34f2e241
2014-03-05YaGL: Don't call host's glGetIntegerv(GL_XXX_BITS)Stanislav Vorobiov6-240/+487
GL_XXX_BITS is deprecated in OpenGL 3.1+ core, so implement it ourselves Change-Id: I8c44feb22350c852d9f003985d41e0bb728d00f0
2014-03-05YaGL: Always strip #extension constuctsStanislav Vorobiov4-69/+36
Just moving these to the header isn't right, they can be enclosed in preprocessor. We can just strip them instead, it's pretty safe thing to do Change-Id: Idd61f3dab899c47e0cf1236cb4e971865ebfc3cc
2014-03-04YaGL: Fix for texture2D, texture2DProj, etc. bias parameterStanislav Vorobiov1-27/+41
bias parameter in texture2D, texture2DProj, etc. is only available in fragment shader Change-Id: Ica52e929d68e114237c970623197d81b32c12098
2014-03-04YaGL: Convert textures properlyStanislav Vorobiov9-81/+116
1. GL_ALPHA to GL_RGBA conversion is wrong after all, previous conversion was correct 2. GLESv1_CM should never convert textures since it always uses legacy host OpenGL context Change-Id: I1b8062c85f377b32bc2f75a58ff969e83acd65d0
2014-03-04YaGL: Move GLSL #extension constructs to the headerStanislav Vorobiov2-30/+42
If original GLSL source has #extension constructs then we need to move them to the header, so that our own declarations go after it Change-Id: Id8f8f85b520fe71ad86dd618ce30c6bfb19478b5
2014-03-03YaGL: Patch texture2D, texture2DProj, etc. properlyStanislav Vorobiov3-34/+253
Replacing texture2D, texture2DProj, etc. with texture, textureProj, etc. is not enough because there might be things like this in the shader: uniform sampler2D texture; texture2D(texture, ...); thus, after replacement this code will turn into: uniform sampler2D texture; texture(texture, ...); it'll lead to implementation-defined behavior in most cases it'll just output blackness. Now we workaround such situations by defining thunk texture2D, texture2DProj, etc. at the top of the shader, according to GLSL standard it's allowed and it'll shadow builtin functions. Inside we make a call to texture, textureProj, etc. Since our function is just a thunk any decent GLSL compiler will optimize it out, so no performance penalty is introduced Change-Id: I80449a6f9afdc17d1a6ab71e77501c84d41f3a25
2014-03-03YaGL: Make glGetUniformLocation conformant againStanislav Vorobiov1-11/+22
We used to set 'gen_locations' to 1 by default, but that's bad, since app may do something like this: if (glGetUniformLocation(p, "my_uniform") == -1) { // do logic when 'my_uniform' is not in the shader } else { // do logic when 'my_uniform' is in the shader } i.e. 'gen_locations == 1' will break this logic, thus, we now set gen_locations to 0 by default Change-Id: I75bc2935f763979dda82fbf91e5e0af60a06f83d
2014-03-03YaGL: Replace gl_MaxVaryingFloats when necessaryStanislav Vorobiov5-83/+219
gl_MaxVaryingFloats was replaced with gl_MaxVaryingComponents in OpenGL 3.1 and gl_MaxVaryingComponents in turn was removed in OpenGL 3.2, thus, we just use a constant when host OpenGL version is >= 3.1. Also, patch for textureXXProj, textuureXXLod and textureXXProjLod was added Change-Id: Ia952cb2644fe7fd9ebbeee6158a72830f98468e6
2014-03-01YaGL: Using flex/bison-based GLSL ES patcherStanislav Vorobiov13-459/+1062
Our old method of GLSL ES patching via simple tokenization isn't feasible for GLESv3 support, there're many GLSL ES and desktop GLSL variations and we must handle all of them. Also, we would like to have full shader validation in the future, thus, we can just extend this parser instead of introducing a new one Change-Id: Ib505a0b22c6dfa810b99a7353b15e8800ff5b55f
2014-02-20YaGL: Fix for weston incorrect glTexSubImage2D callStanislav Vorobiov1-1/+1
weston can call glTexSubImage2D with format = GL_RGB and type = GL_UNSIGNED_SHORT_5_6_5 while texture's internal format is GL_BGRA. Such combination is not allowed in OpenGL ES, but we allow it Change-Id: Ifce29ec49108d26801ea3c56307a13db71b7f42f
2014-02-20YaGL: Updated for surface scanout flagStanislav Vorobiov2-0/+2
Change-Id: Ia61a404a1104fb5a68194ddb6978cb9567778cc9
2014-02-20Merge branch 'tizen' into glesv3Stanislav Vorobiov2-10/+0
Change-Id: Ie75f90abff3a430c6a3647f3ba8d38c7ebe5dd16
2014-02-20YaGL: Allow zero draw/read fbo in glBlitFramebufferStanislav Vorobiov1-2/+16
Change-Id: I8230f24bf40ffb46556969b35d7f4a7354b1c012
2014-02-19YaGL: Disable minifying/magnifying blits in glBlitFramebufferStanislav Vorobiov1-0/+10
They cause crashes with some host OpenGL drivers, so disable them for now Change-Id: Ice85c38758556b6aded15de57bc86422d918f725
2014-02-19YaGL: Fix transform feedback checksStanislav Vorobiov6-12/+111
Some more transform feedback checks, we now pass khronos CTS 3.0 transform_feedback and transform_feedback2 tests (except for overflow tests, these will be fixed later) Change-Id: Ia3af2deac6e0cb75d33b3a35382e9119a5841b65
2014-02-19YaGL: Correct draw/read buffer set/getStanislav Vorobiov7-52/+67
Draw/read buffers must reside inside framebuffer object as well as inside context. When no framebuffer is bound context's values are used, when framebuffer is bound values from framebuffer are used Change-Id: I14af385e9c1d70870dfd6455305a608f13e9f2b6
2014-02-19YaGL: Support more glGetFramebufferAttachmentParameteriv queriesStanislav Vorobiov4-21/+110
And khronos CTS 3.0 framebuffer_srgb test now passes Change-Id: I7b8eeece78b1ca71693c9e5c85fe305f632d908c
2014-02-19YaGL: Proper GL_ALPHA/GL_LUMINANCE/GL_LUMINANCE_ALPHAStanislav Vorobiov12-110/+321
These texture formats are not supported in OpenGL 3.1+ core, so we implemented them by converting to RGBA. However, just converting pixel data to RGBA is not enough, we have to make sure that glCopyTexImage2D works and that texture is sampled correctly from shaders. To make this work we use swizzles and since swizzles are not available in OpenGL 2.1 we revert back to using these formats as they are and perform no converions when in OpenGL 2.1 mode Change-Id: I6fc4a58817253767d088975b94856a16c0c4adc4
2014-02-15YaGL: Fix GL_ALPHA to GL_BGRA conversionsStanislav Vorobiov1-7/+7
Change-Id: Id3548ee62dc4f76eb45934cdfe189ea94320404d
2014-02-15YaGL: Support texture zeroStanislav Vorobiov11-89/+115
Now that we have much better validations we also need to have an object for texture zero, so that operations on texture zero wouldn't fail Change-Id: I4279a6b54abd866a3d0994def7aeb2fcee3bd791
2014-02-15YaGL: Enable SRGB framebufferStanislav Vorobiov1-0/+7
GLESv3 has SRGB framebuffer turned on by default Change-Id: I2bb9f027059f5150120f7ae3315f36a7d056ce83
2014-02-14YaGL: Various format validation fixesStanislav Vorobiov18-304/+1051
Correct validation in glReadPixels, glCopyTexImage2D, glTexImage3D, glTexStorage3D, etc. Change-Id: Ifc7e1d99d3d5f72dc6e8d81ed717c92c8923d414
2014-02-06YaGL: Fixed drawing calls without vertex array pointerStanislav Vorobiov3-0/+41
The right thing to do here is crash, that's what host OpenGL drivers do, but we don't want to crash on host, we want to crash the app on target Change-Id: I4d92076352775f17bbc3ab8db9b70422beb88a43
2014-02-06YaGL: Expose GLESv2 extensions in GLESv3 contextsStanislav Vorobiov4-150/+86
This sounds illogical, but adreno does this. Also, khronos CTS 3.0 attempts to test GLESv2 extensions with GLESv3 context, so it's probably ok Change-Id: Ie5f9940ce9fe7b57e6c5ec411d76942245607071
2014-02-05YaGL: Better pixel format handling and validationStanislav Vorobiov21-957/+2090
We introduce yagl_pixel_format that is now used to describe pixel formats, it's also capable of doing target <-> host conversions. This is much better than old approach, it allows us to have all format descriptions in one place, validation is also easier and adding new format is a matter of adding new yagl_pixel_format Change-Id: I81cedb55ef2f871420aaf80c7b9d47d9fbf9aca2