platform/adaptation/emulator/emulator-yagl.git
10 years agoYaGL: Fix ETC2 textures unpacking 28/18328/2
Stanislav Vorobiov [Thu, 20 Mar 2014 09:10:03 +0000 (13:10 +0400)]
YaGL: Fix ETC2 textures unpacking

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>
10 years agoYaGL: Fix sized GL_DEPTH_COMPONENT textures 27/18327/2
Stanislav Vorobiov [Thu, 20 Mar 2014 07:07:09 +0000 (11:07 +0400)]
YaGL: Fix sized GL_DEPTH_COMPONENT textures

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>
10 years agoMerge branch 'glesv3' into tizen 74/17374/1
Stanislav Vorobiov [Thu, 6 Mar 2014 15:32:49 +0000 (19:32 +0400)]
Merge branch 'glesv3' into tizen

Change-Id: Iccd757b9ff0096faf69619a9ff5e1344ae0cab7e

10 years agoYaGL: Version bump 64/17364/1 glesv3
Stanislav Vorobiov [Thu, 6 Mar 2014 13:49:45 +0000 (17:49 +0400)]
YaGL: Version bump

GLESv3 merge version bump

Change-Id: Ice426f2047d3669b33d75ad0d17141bb0f0ffcc1

10 years agoYaGL: Fixes for Mac OS X 15/17315/1
Stanislav Vorobiov [Thu, 6 Mar 2014 07:14:51 +0000 (11:14 +0400)]
YaGL: Fixes for Mac OS X

* 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

10 years agoYaGL: Don't call host's glGetIntegerv(GL_XXX_BITS) 15/17215/1
Stanislav Vorobiov [Wed, 5 Mar 2014 13:39:30 +0000 (17:39 +0400)]
YaGL: Don't call host's glGetIntegerv(GL_XXX_BITS)

GL_XXX_BITS is deprecated in OpenGL 3.1+ core, so
implement it ourselves

Change-Id: I8c44feb22350c852d9f003985d41e0bb728d00f0

10 years agoYaGL: Always strip #extension constucts 98/17198/1
Stanislav Vorobiov [Wed, 5 Mar 2014 07:12:50 +0000 (11:12 +0400)]
YaGL: Always strip #extension constucts

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

10 years agoYaGL: Fix for texture2D, texture2DProj, etc. bias parameter 97/17197/1
Stanislav Vorobiov [Tue, 4 Mar 2014 16:01:02 +0000 (20:01 +0400)]
YaGL: Fix for texture2D, texture2DProj, etc. bias parameter

bias parameter in texture2D, texture2DProj, etc. is
only available in fragment shader

Change-Id: Ica52e929d68e114237c970623197d81b32c12098

10 years agoYaGL: Convert textures properly 96/17196/1
Stanislav Vorobiov [Tue, 4 Mar 2014 15:30:11 +0000 (19:30 +0400)]
YaGL: Convert textures properly

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

10 years agoYaGL: Move GLSL #extension constructs to the header 63/17163/1
Stanislav Vorobiov [Tue, 4 Mar 2014 09:04:56 +0000 (13:04 +0400)]
YaGL: Move GLSL #extension constructs to the header

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

10 years agoYaGL: Patch texture2D, texture2DProj, etc. properly 89/17089/1
Stanislav Vorobiov [Mon, 3 Mar 2014 15:27:25 +0000 (19:27 +0400)]
YaGL: Patch texture2D, texture2DProj, etc. properly

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

10 years agoYaGL: Make glGetUniformLocation conformant again 88/17088/1
Stanislav Vorobiov [Mon, 3 Mar 2014 09:36:42 +0000 (13:36 +0400)]
YaGL: Make glGetUniformLocation conformant again

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

10 years agoYaGL: Replace gl_MaxVaryingFloats when necessary 87/17087/1
Stanislav Vorobiov [Mon, 3 Mar 2014 08:30:26 +0000 (12:30 +0400)]
YaGL: Replace gl_MaxVaryingFloats when necessary

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

10 years agoYaGL: Using flex/bison-based GLSL ES patcher 26/17026/1
Stanislav Vorobiov [Wed, 26 Feb 2014 14:24:40 +0000 (18:24 +0400)]
YaGL: Using flex/bison-based GLSL ES patcher

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

10 years agoYaGL: Fix for weston incorrect glTexSubImage2D call 52/16652/1
Stanislav Vorobiov [Thu, 20 Feb 2014 11:00:26 +0000 (15:00 +0400)]
YaGL: Fix for weston incorrect glTexSubImage2D call

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

10 years agoYaGL: Updated for surface scanout flag 51/16651/1
Stanislav Vorobiov [Mon, 10 Feb 2014 16:34:38 +0000 (20:34 +0400)]
YaGL: Updated for surface scanout flag

Change-Id: Ia61a404a1104fb5a68194ddb6978cb9567778cc9

10 years agoMerge branch 'tizen' into glesv3 50/16650/1
Stanislav Vorobiov [Thu, 20 Feb 2014 08:27:32 +0000 (12:27 +0400)]
Merge branch 'tizen' into glesv3

Change-Id: Ie75f90abff3a430c6a3647f3ba8d38c7ebe5dd16

10 years agoYaGL: Allow zero draw/read fbo in glBlitFramebuffer 42/16642/1
Stanislav Vorobiov [Thu, 20 Feb 2014 06:35:00 +0000 (10:35 +0400)]
YaGL: Allow zero draw/read fbo in glBlitFramebuffer

Change-Id: I8230f24bf40ffb46556969b35d7f4a7354b1c012

10 years agoYaGL: Disable minifying/magnifying blits in glBlitFramebuffer 04/16604/1
Stanislav Vorobiov [Wed, 19 Feb 2014 14:31:56 +0000 (18:31 +0400)]
YaGL: Disable minifying/magnifying blits in glBlitFramebuffer

They cause crashes with some host OpenGL drivers, so
disable them for now

Change-Id: Ice85c38758556b6aded15de57bc86422d918f725

10 years agoYaGL: Fix transform feedback checks 03/16603/1
Stanislav Vorobiov [Wed, 19 Feb 2014 14:01:14 +0000 (18:01 +0400)]
YaGL: Fix transform feedback checks

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

10 years agoYaGL: Correct draw/read buffer set/get 02/16602/1
Stanislav Vorobiov [Wed, 19 Feb 2014 11:09:08 +0000 (15:09 +0400)]
YaGL: Correct draw/read buffer set/get

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

10 years agoYaGL: Support more glGetFramebufferAttachmentParameteriv queries 01/16601/1
Stanislav Vorobiov [Wed, 19 Feb 2014 09:52:39 +0000 (13:52 +0400)]
YaGL: Support more glGetFramebufferAttachmentParameteriv queries

And khronos CTS 3.0 framebuffer_srgb test now passes

Change-Id: I7b8eeece78b1ca71693c9e5c85fe305f632d908c

10 years agoYaGL: Proper GL_ALPHA/GL_LUMINANCE/GL_LUMINANCE_ALPHA 00/16600/1
Stanislav Vorobiov [Sat, 15 Feb 2014 13:12:25 +0000 (17:12 +0400)]
YaGL: Proper GL_ALPHA/GL_LUMINANCE/GL_LUMINANCE_ALPHA

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

10 years agoYaGL: Fix GL_ALPHA to GL_BGRA conversions 01/16401/1
Stanislav Vorobiov [Sat, 15 Feb 2014 13:12:25 +0000 (17:12 +0400)]
YaGL: Fix GL_ALPHA to GL_BGRA conversions

Change-Id: Id3548ee62dc4f76eb45934cdfe189ea94320404d

10 years agoYaGL: Support texture zero 00/16400/1
Stanislav Vorobiov [Sat, 15 Feb 2014 14:16:47 +0000 (18:16 +0400)]
YaGL: Support texture zero

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

10 years agoYaGL: Enable SRGB framebuffer 99/16399/1
Stanislav Vorobiov [Sat, 15 Feb 2014 09:37:44 +0000 (13:37 +0400)]
YaGL: Enable SRGB framebuffer

GLESv3 has SRGB framebuffer turned on by default

Change-Id: I2bb9f027059f5150120f7ae3315f36a7d056ce83

10 years agoYaGL: Various format validation fixes 97/16397/1
Stanislav Vorobiov [Fri, 14 Feb 2014 13:51:42 +0000 (17:51 +0400)]
YaGL: Various format validation fixes

Correct validation in glReadPixels, glCopyTexImage2D,
glTexImage3D, glTexStorage3D, etc.

Change-Id: Ifc7e1d99d3d5f72dc6e8d81ed717c92c8923d414

10 years agoYaGL: Fixed drawing calls without vertex array pointer 83/16083/1
Stanislav Vorobiov [Thu, 6 Feb 2014 08:39:00 +0000 (12:39 +0400)]
YaGL: Fixed drawing calls without vertex array pointer

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

10 years agoYaGL: Expose GLESv2 extensions in GLESv3 contexts 82/16082/1
Stanislav Vorobiov [Thu, 6 Feb 2014 07:29:10 +0000 (11:29 +0400)]
YaGL: Expose GLESv2 extensions in GLESv3 contexts

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

10 years agoYaGL: Better pixel format handling and validation 56/16056/1
Stanislav Vorobiov [Wed, 5 Feb 2014 15:59:29 +0000 (19:59 +0400)]
YaGL: Better pixel format handling and validation

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

10 years agoYaGL: Minor fixes 10/16010/1
Stanislav Vorobiov [Tue, 4 Feb 2014 15:41:59 +0000 (19:41 +0400)]
YaGL: Minor fixes

* yagl_gles_get_stride made static, it's now only used inside yagl_gles_utils.c
* removed assert(count > 0) from yagl_gles2_context_pre_draw, this can happen
  on integer overflow and it's normal

Change-Id: I246a501288a7e8f115d96e76b8eefc7c6b3acfc4

10 years agoYaGL: Fixes for khronos CTS 3.0 / uniform_buffer_object 97/15997/1
Stanislav Vorobiov [Tue, 4 Feb 2014 10:47:45 +0000 (14:47 +0400)]
YaGL: Fixes for khronos CTS 3.0 / uniform_buffer_object

Change-Id: I81e7dbb3b5ca04cf0849a0af57f8bfd6fc3804d2

10 years agoYaGL: Fixed vertex attribute 0 problem 87/15987/1
Stanislav Vorobiov [Tue, 4 Feb 2014 08:08:24 +0000 (12:08 +0400)]
YaGL: Fixed vertex attribute 0 problem

Host OpenGL vertex attribute 0 is "magic", OpenGL ES
vertex attribute 0 is usual, we now handle this properly

Change-Id: Ic3e4a021f17c0e1cff18248c4a8f32fe2e260b38

10 years agoYaGL: Fixed khronos CTS 3.0 host crashes 72/15972/1
Stanislav Vorobiov [Mon, 3 Feb 2014 10:08:33 +0000 (14:08 +0400)]
YaGL: Fixed khronos CTS 3.0 host crashes

Change-Id: If46861bb32664c86d9f40018bd611fe12d2f5cdd

10 years agoYaGL: Some more minor fixes for khronos CTS 3.0 71/15971/1
Stanislav Vorobiov [Mon, 3 Feb 2014 09:42:17 +0000 (13:42 +0400)]
YaGL: Some more minor fixes for khronos CTS 3.0

Change-Id: If8cbec23351b9f91d822ff11e4b138d3e5ef05e2

10 years agoYaGL: Fixes for khronos CTS 3.0 / ES30 GLCoverage 70/15970/1
Stanislav Vorobiov [Mon, 3 Feb 2014 07:08:37 +0000 (11:08 +0400)]
YaGL: Fixes for khronos CTS 3.0 / ES30 GLCoverage

Change-Id: Ia18a7846faac041e7b75e0b4877cd70528e8dfc5

10 years agoYaGL: GLESv3 function stub file removed 42/15942/1
Stanislav Vorobiov [Fri, 31 Jan 2014 11:33:37 +0000 (15:33 +0400)]
YaGL: GLESv3 function stub file removed

All GLESv3 functions have been implemented, so no
need for dummy.c anymore. Remaining functions were
program binary related, we don't support them for now,
so they just generate GL_INVALID_OPERATION

Change-Id: I6f020406c422eabb35eaefd47ea4463b6ce183c7

10 years agoYaGL: glDrawRangeElements implemented 41/15941/1
Stanislav Vorobiov [Fri, 31 Jan 2014 11:03:51 +0000 (15:03 +0400)]
YaGL: glDrawRangeElements implemented

Change-Id: I5e885bfc96992505863febd400e420ea9f7f309d

10 years agoYaGL: glGetFragDataLocation implemented 40/15940/1
Stanislav Vorobiov [Fri, 31 Jan 2014 10:23:34 +0000 (14:23 +0400)]
YaGL: glGetFragDataLocation implemented

Change-Id: Idd5428a0da0cc02cda08e584f78bb4786e8449b3

10 years agoYaGL: glFramebufferTexture3D dummy 39/15939/1
Stanislav Vorobiov [Fri, 31 Jan 2014 09:57:29 +0000 (13:57 +0400)]
YaGL: glFramebufferTexture3D dummy

We can implement glFramebufferTexture3D, but it's not
needed for GLESv3, so we just place a dummy for now

Change-Id: I6e74a2d83056df8a71a8739403c910bf2dfd92fa

10 years agoYaGL: Implemented glUniformMatrixAxBfv 38/15938/1
Stanislav Vorobiov [Fri, 31 Jan 2014 09:50:29 +0000 (13:50 +0400)]
YaGL: Implemented glUniformMatrixAxBfv

Change-Id: I582da14c8bfba8721abd5c333b4724f0014a406b

10 years agoYaGL: glClearBuffer and glInvalidateSubFramebuffer implemented 37/15937/1
Stanislav Vorobiov [Fri, 31 Jan 2014 09:12:56 +0000 (13:12 +0400)]
YaGL: glClearBuffer and glInvalidateSubFramebuffer implemented

glInvalidateSubFramebuffer is currently a no-op

Change-Id: Ic2fd7d5cf1872f69dca466016b2196b7e13c1cfe

10 years agoYaGL: Integer vertex attributes and uniforms supported 36/15936/1
Stanislav Vorobiov [Fri, 31 Jan 2014 08:20:42 +0000 (12:20 +0400)]
YaGL: Integer vertex attributes and uniforms supported

Change-Id: I3f6d7ab114f627da0463eb6bc0898e7a6d6629fb

10 years agoYaGL: 64-bit parameter queries and indexed queries implemented 25/15925/1
Stanislav Vorobiov [Thu, 30 Jan 2014 14:56:38 +0000 (18:56 +0400)]
YaGL: 64-bit parameter queries and indexed queries implemented

Change-Id: I8b9f797b1de8190699e6411959d1e162284101c6

10 years agoYaGL: EGL_KHR_fence_sync and GLESv3 sync objects implemented 18/15918/1
Stanislav Vorobiov [Fri, 24 Jan 2014 14:19:11 +0000 (18:19 +0400)]
YaGL: EGL_KHR_fence_sync and GLESv3 sync objects implemented

Change-Id: I99eb93e66f2614306e9e91de20b46a46dff727cb

10 years agoYaGL: GL_EXT_unpack_subimage and GL_NV_pack_subimage implemented 83/15583/1
Stanislav Vorobiov [Thu, 23 Jan 2014 16:06:53 +0000 (20:06 +0400)]
YaGL: GL_EXT_unpack_subimage and GL_NV_pack_subimage implemented

Change-Id: I56d770ae18273ee9c2d1a6c28c4a375fe9028d46

10 years agoYaGL: GL_OES_compressed_ETC1_RGB8_texture implemented 75/15575/1
Stanislav Vorobiov [Thu, 23 Jan 2014 11:51:07 +0000 (15:51 +0400)]
YaGL: GL_OES_compressed_ETC1_RGB8_texture implemented

Change-Id: Ic2dff3f5b7b219919ff5013819063a6036f34c3a

10 years agoYaGL: Buffer object copying implemented 13/15513/1
Stanislav Vorobiov [Wed, 22 Jan 2014 12:58:02 +0000 (16:58 +0400)]
YaGL: Buffer object copying implemented

Change-Id: Ic98ee60fcf3c967374402c6a619584ce5129d756

10 years agoYaGL: Multisampled renderbuffer implemented 04/15504/1
Stanislav Vorobiov [Wed, 22 Jan 2014 11:07:09 +0000 (15:07 +0400)]
YaGL: Multisampled renderbuffer implemented

This is basically glRenderbufferStorageMultisample
part of GL_EXT_multisampled_render_to_texture

Change-Id: Id2b14ab759d1a88c22ae3dd216591ebbfb4f1ac3

10 years agoYaGL: GL_NV_read_buffer implemented 03/15503/1
Stanislav Vorobiov [Wed, 22 Jan 2014 10:48:54 +0000 (14:48 +0400)]
YaGL: GL_NV_read_buffer implemented

Change-Id: Id6fbcd6a8c175a99c2263064bd8a4bf4683ad573

10 years agoYaGL: Full GL_NV_pixel_buffer_object support 97/15497/1
Stanislav Vorobiov [Wed, 22 Jan 2014 09:15:37 +0000 (13:15 +0400)]
YaGL: Full GL_NV_pixel_buffer_object support

Change-Id: Id1ac9c7cc4b17cac12a52a2598446dc362d314d1

10 years agoYaGL: Fix get_stride bug 96/15496/1
Stanislav Vorobiov [Wed, 22 Jan 2014 06:16:18 +0000 (10:16 +0400)]
YaGL: Fix get_stride bug

Change-Id: I57c6dec95cc9c4f85062f79b23070412fb58b97a

10 years agoYaGL: Implemented GL_OES_texture_3D compressed API 54/15454/1
Stanislav Vorobiov [Tue, 21 Jan 2014 09:04:32 +0000 (13:04 +0400)]
YaGL: Implemented GL_OES_texture_3D compressed API

Compressed API part of GL_OES_texture_3D is now
implemented

Change-Id: Ie53238ef69a33715c75202549a6027191b0c84e3

10 years agoYaGL: Basic GL_NV_pixel_buffer_object support 53/15453/1
Stanislav Vorobiov [Tue, 21 Jan 2014 08:00:13 +0000 (12:00 +0400)]
YaGL: Basic GL_NV_pixel_buffer_object support

Automatic PBO transfers between host and guest not
implemented yet

Change-Id: I48e171983ff7c8b4be2adaf6a1d70952e6e8075b

10 years agoYaGL: GL_EXT_texture_storage fixed 52/15452/1
Stanislav Vorobiov [Mon, 20 Jan 2014 14:11:23 +0000 (18:11 +0400)]
YaGL: GL_EXT_texture_storage fixed

We can't simply specify GL_BGRA and GL_UNSIGNED_BYTE in
glTexStorage implementations, format and type must match
internalformat

Change-Id: Ifda341614e1ab2b2d1ce653ab2e11d541aad19aa

10 years agoYaGL: GL_EXT_texture_storage implemented 51/15451/1
Stanislav Vorobiov [Mon, 20 Jan 2014 08:37:05 +0000 (12:37 +0400)]
YaGL: GL_EXT_texture_storage implemented

Change-Id: I1e8c1431a06cc01bd4987457492cc604b7d4a30d

10 years agoYaGL: Fix YAGL_NUM_GLES_TEXTURE_TARGETS
Stanislav Vorobiov [Sun, 19 Jan 2014 11:32:04 +0000 (15:32 +0400)]
YaGL: Fix YAGL_NUM_GLES_TEXTURE_TARGETS

10 years agoYaGL: Samplers implemented 79/15279/1
Stanislav Vorobiov [Fri, 17 Jan 2014 15:59:26 +0000 (19:59 +0400)]
YaGL: Samplers implemented

Change-Id: I90b08b9cf07b97daa4578de8925f15fa97b34c0a

10 years agoYaGL: Add more functions to GLESv3 dummy 78/15278/1
Stanislav Vorobiov [Fri, 17 Jan 2014 13:40:36 +0000 (17:40 +0400)]
YaGL: Add more functions to GLESv3 dummy

This is to make GFXBench compile. Also, add asserts
so we can see what function is required and implement
it

Change-Id: I634501fec106cb5911af39c330127f480193a95d

10 years agoYaGL: 2D array textures implemented 82/15182/1
Stanislav Vorobiov [Thu, 16 Jan 2014 16:26:54 +0000 (20:26 +0400)]
YaGL: 2D array textures implemented

Change-Id: I05c38628280c15d8a0221f186694d81e89dafff0

10 years agoYaGL: TODO GL_OES_texture_3D 81/15181/1
Stanislav Vorobiov [Thu, 16 Jan 2014 10:09:05 +0000 (14:09 +0400)]
YaGL: TODO GL_OES_texture_3D

Will implement remaining functionality later,
currently it's hard to test it, since there're no
samples/test that cover these

Change-Id: I147ceda77fd13c7f3be32ac6206aa42c6cce8e0f

10 years agoYaGL: Basic GL_OES_texture_3D functionality implemented 80/15180/1
Stanislav Vorobiov [Wed, 20 Nov 2013 07:59:52 +0000 (11:59 +0400)]
YaGL: Basic GL_OES_texture_3D functionality implemented

Change-Id: I764c9ab539a0b0736506648d3d72b0a6deef2711

10 years agoYaGL: removed 95-tizen-emulator.rules 11/15111/1
Stanislav Vorobiov [Thu, 16 Jan 2014 06:51:58 +0000 (10:51 +0400)]
YaGL: removed 95-tizen-emulator.rules

system-plugin-emulator now contains yagl related
udev rules, so no need to install our own
95-tizen-emulator.rules anymore

Change-Id: Ib6e0647a441f20c1968967ab5b472c923d13db60

10 years agoMerge remote-tracking branch 'origin/tizen' into glesv3 62/15062/1
Stanislav Vorobiov [Wed, 15 Jan 2014 08:01:43 +0000 (12:01 +0400)]
Merge remote-tracking branch 'origin/tizen' into glesv3

Conflicts:
EGL/yagl_egl_calls.c
EGL/yagl_state.c
GLES_common/yagl_gles_calls.c
GLES_common/yagl_host_gles_calls.c
GLESv2/yagl_gles2_context.c

Change-Id: Ibc911f6538e6e3d805e95196d1748c3381db2495

10 years agoYaGL: invalidate after eglSwapBuffers only on X11 42/14842/1
Stanislav Vorobiov [Mon, 13 Jan 2014 06:33:13 +0000 (10:33 +0400)]
YaGL: invalidate after eglSwapBuffers only on X11

We can't remove that invalidate call after
eglSwapBuffers on X11 (see comments in code), but
we can on gbm/wayland

Change-Id: I8a9338db88ddda2a906d527f039f382ba741d591

10 years agoYaGL: Multicore rendering and fence support added 41/14841/1
Stanislav Vorobiov [Thu, 28 Nov 2013 10:48:52 +0000 (14:48 +0400)]
YaGL: Multicore rendering and fence support added

We now use multicore rendering, i.e. we offload all
rendering to a separate thread and use fences to wait
until certain parts of it are complete. This patch adds
both fence support and modifies transport to allow waiting
for rendering completion on target instead of on host

Change-Id: I20cb7f72544d18583ff92cffa64a47a5cdecff17

10 years agoYaGL: Fix regression in GLESv1_CM 08/13308/1 accepted/tizen/generic accepted/tizen/ivi accepted/tizen/mobile accepted/tizen_generic accepted/tizen_ivi_release tizen_ivi_release accepted/tizen/20131205.214900 accepted/tizen/20131209.172121 accepted/tizen/generic/20140110.145954 accepted/tizen/generic/20140312.101045 accepted/tizen/ivi/20140108.022647 accepted/tizen/ivi/20140108.192409 accepted/tizen/ivi/panda/20140312.092854 accepted/tizen/ivi/panda/20140402.031357 accepted/tizen/ivi/release/20140108.220906 accepted/tizen/ivi/release/20140113.211324 accepted/tizen/ivi/release/20140312.041959 accepted/tizen/ivi/release/20140312.123852 accepted/tizen/ivi/release/20140315.003206 accepted/tizen/ivi/release/20140317.184720 submit/tizen/20131204.061627 submit/tizen/20131206.040731 submit/tizen/20131214.010851 submit/tizen/20140107.222856 submit/tizen/20140108.191637 submit/tizen/20140312.070634 submit/tizen_ivi_panda/20140402.031811 submit/tizen_ivi_release/20140107.223025 submit/tizen_ivi_release/20140113.211354 submit/tizen_ivi_release/20140312.041934 submit/tizen_ivi_release/20140312.071056 submit/tizen_ivi_release/20140315.003422 submit/tizen_ivi_release/20140317.184953
Stanislav Vorobiov [Tue, 3 Dec 2013 08:23:28 +0000 (12:23 +0400)]
YaGL: Fix regression in GLESv1_CM

Array user data needs to be passed always

Change-Id: I3fa68e6367192d43dda8b16fcd0294251146e5a5

10 years agoYaGL: Support EGL_WAYLAND_Y_INVERTED_WL 64/13064/1
Stanislav Vorobiov [Wed, 27 Nov 2013 07:57:57 +0000 (11:57 +0400)]
YaGL: Support EGL_WAYLAND_Y_INVERTED_WL

Change-Id: I9e37871333968c42899ee5a51ff5ff886795a47e

10 years agoYaGL: spec fixed for Tizen IVI 63/13063/1
Stanislav Vorobiov [Wed, 27 Nov 2013 07:57:06 +0000 (11:57 +0400)]
YaGL: spec fixed for Tizen IVI

We now install YaGL to correct locations in
Tizen IVI

Change-Id: I6a1c80b717cc9a6d2b301133bc8978c6bb4701ed

10 years agoYaGL: Don't bind VBO if there's nothing to transfer 03/12903/1
Stanislav Vorobiov [Mon, 25 Nov 2013 14:59:53 +0000 (18:59 +0400)]
YaGL: Don't bind VBO if there's nothing to transfer

Instead of binding VBOs every draw call we bind it
once in glVertexAttribPointer and friends. We bind
it on draw calls only if there's data to be transferred

Change-Id: I59b0f893acfab2eb4115ff0df7d40ec348722659

10 years agoYaGL: Remove remaining dependencies on GL_ARB_ES2_compatibility 60/12760/1
Stanislav Vorobiov [Thu, 21 Nov 2013 10:32:48 +0000 (14:32 +0400)]
YaGL: Remove remaining dependencies on GL_ARB_ES2_compatibility

We still had some dependencies on GL_ARB_ES2_compatibility.
Mac OS X doesn't implement GL_ARB_ES2_compatibility, because
of that WebGL didn't work

Change-Id: Ib6941f61065d84e3b41a028b2071db5d28628dd6

10 years agoYaGL: Fix ETC2 RG11 texture unpacking 27/13127/1
Stanislav Vorobiov [Tue, 19 Nov 2013 12:44:52 +0000 (16:44 +0400)]
YaGL: Fix ETC2 RG11 texture unpacking

Blue component should be set to 0 explicitly
or else it'll contain garbage

Change-Id: I33464491ff7ea14548f50083929d0b0432cd4568

10 years agoYaGL: ETC2 compressed texture formats implemented 26/13126/1
Stanislav Vorobiov [Tue, 19 Nov 2013 11:00:40 +0000 (15:00 +0400)]
YaGL: ETC2 compressed texture formats implemented

We'll try to use host's implementation when possible, when
it's not possible we'll fall back to software implementation
which is taken from mesa. The code in mesa is in turn taken
from LunarG and is licensed under MIT license which allows
us to use it

Change-Id: I006dc334c18fa4ecc5637230e46186f9710807da

10 years agoYaGL: GL_EXT_instanced_arrays full support 25/13125/1
Stanislav Vorobiov [Fri, 15 Nov 2013 12:44:32 +0000 (16:44 +0400)]
YaGL: GL_EXT_instanced_arrays full support

Change-Id: I94a14f9c722b28e994ee9855cfe84d8e10a32332

10 years agoYaGL: Fixed shader preprocessing 24/13124/1
Stanislav Vorobiov [Fri, 15 Nov 2013 10:00:23 +0000 (14:00 +0400)]
YaGL: Fixed shader preprocessing

Things like this:

can be present in shader code and the code inside
extension is available on host.

As a workaround we find all GL_xxx_yyy tokens and if it's
not a OpenGL ES extension we replace it with ND_xxx_yyy, thus
making sure that the code inside such #ifdef's won't be compiled.
When GL_xxx_yyy is not a preprocessor token it's not a
problem either, it'll be replaced in all places, thus,
shader will operate correctly

Change-Id: Id23f790c1c2a67f1a188e0161d20832e589a24d0

10 years agoYaGL: Add GLESv3 function stubs in order to run khronos cts es 3.0 23/13123/1
Stanislav Vorobiov [Thu, 14 Nov 2013 17:08:43 +0000 (21:08 +0400)]
YaGL: Add GLESv3 function stubs in order to run khronos cts es 3.0

Change-Id: I862a0a9e33488821bd259fe2df9fafe12466cdfe

10 years agoYaGL: GL_EXT_instanced_arrays initial support 22/13122/1
Stanislav Vorobiov [Thu, 14 Nov 2013 15:02:07 +0000 (19:02 +0400)]
YaGL: GL_EXT_instanced_arrays initial support

glDrawArraysInstanced and glDrawElementsInstanced
are supported. glVertexAttribDivisor to be
implemented

Change-Id: Ie6e184bba9bd148342f09aa7732d231de1b70574

10 years agoYaGL: GL_OES_element_index_uint implemented 21/13121/1
Stanislav Vorobiov [Thu, 14 Nov 2013 07:33:22 +0000 (11:33 +0400)]
YaGL: GL_OES_element_index_uint implemented

Change-Id: I98b5aed1e5838899c2d8b37bbfb2cf9f09fbc2a5

10 years agoYaGL: Fix glGet for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 20/13120/1
Stanislav Vorobiov [Wed, 13 Nov 2013 11:50:02 +0000 (15:50 +0400)]
YaGL: Fix glGet for GL_TRANSFORM_FEEDBACK_BUFFER_BINDING

Change-Id: I677e5e89cf26831936762a8f91117b4190b62032

10 years agoYaGL: Occlusion queries implemented 19/13119/1
Stanislav Vorobiov [Wed, 13 Nov 2013 11:23:07 +0000 (15:23 +0400)]
YaGL: Occlusion queries implemented

Change-Id: I3029823126f229a5f4e2931235a15a178bee7efa

10 years agoYaGL: Queries support implemented 18/13118/1
Stanislav Vorobiov [Wed, 13 Nov 2013 10:36:35 +0000 (14:36 +0400)]
YaGL: Queries support implemented

Change-Id: Ifd7de09a920974d526432403895e043fd55967d3

10 years agoYaGL: Transform feedback initial support 17/13117/1
Stanislav Vorobiov [Wed, 13 Nov 2013 07:50:29 +0000 (11:50 +0400)]
YaGL: Transform feedback initial support

Transform feedback objects and buffers are implemented,
all transform feedback operations are also implemented.
Still needs validations in drawing calls and
transform feedback buffers aren't updated on transform
feedback completion yet

Change-Id: I1534003bdb9257e7101be9206057247546fc4001

10 years agoYaGL: Remaining uniform APIs implemented 16/13116/1
Stanislav Vorobiov [Mon, 11 Nov 2013 13:40:41 +0000 (17:40 +0400)]
YaGL: Remaining uniform APIs implemented

glGetActiveUniformBlockName and glGetActiveUniformBlockiv
implemented

Change-Id: Ib4499a39d8ac66b1f9f4e96a4bd10c8a8e8863d2

10 years agoYaGL: More uniform APIs implemented 15/13115/1
Stanislav Vorobiov [Mon, 11 Nov 2013 10:21:54 +0000 (14:21 +0400)]
YaGL: More uniform APIs implemented

glGetUniformBlockIndex and glUniformBlockBinding implemented

Change-Id: I7aab39fb4bc3213c8fce49a9489fa7cd28d47707

10 years agoYaGL: glGetUniformIndices implemented 14/13114/1
Stanislav Vorobiov [Fri, 8 Nov 2013 16:11:22 +0000 (20:11 +0400)]
YaGL: glGetUniformIndices implemented

Change-Id: I00a5b02653f274be1b03ad79f848eef4e7aa0e2d

10 years agoYaGL: glGetActiveUniformsiv implemented 13/13113/1
Stanislav Vorobiov [Fri, 8 Nov 2013 13:23:50 +0000 (17:23 +0400)]
YaGL: glGetActiveUniformsiv implemented

Change-Id: I83fb22f385616b4ba6dd6b59c811cc3d373e5b91

10 years agoYaGL: Simplified active variable caching 12/13112/1
Stanislav Vorobiov [Fri, 8 Nov 2013 10:20:40 +0000 (14:20 +0400)]
YaGL: Simplified active variable caching

Instead of keeping a vector and expanding
it whenever user queries new variable and trying
to guess if a variable name is complete or not
we simply query all these parameters from a program
object on link and use them. This does not degrade
performance since the user will query at
least for GL_LINK_STATUS anyway after program is
linked

Change-Id: I4ce1bd381287b5f5fcfa1b7b4ca7e236bf9b7724

10 years agoYaGL: Basic uniform buffer object support 11/13111/1
Stanislav Vorobiov [Thu, 7 Nov 2013 15:13:03 +0000 (19:13 +0400)]
YaGL: Basic uniform buffer object support

Just preparing grounds here. For now we can
bind/unbind/query generic uniform buffer target
and bind/unbind indexed uniform buffer target

Change-Id: I496fb2d0ea161a2167c2ac3a411529860c370d66

10 years agoYaGL: GL_OES_mapbuffer and GL_EXT_map_buffer_range implemented 10/13110/1
Stanislav Vorobiov [Thu, 7 Nov 2013 08:07:10 +0000 (12:07 +0400)]
YaGL: GL_OES_mapbuffer and GL_EXT_map_buffer_range implemented

Change-Id: I1c70ecaec48fe18b355a9d66690e638e929d555e

10 years agoYaGL: Separated GLESv2/GLESv3 shader processing 09/13109/1
Stanislav Vorobiov [Wed, 6 Nov 2013 07:58:53 +0000 (11:58 +0400)]
YaGL: Separated GLESv2/GLESv3 shader processing

GLESv3 can run ES3 shaders which require separate
processing, this code is now inside yagl_gles3_context.
Only GL_ARB_ES3_compatibility case is supported for now,
other cases will be supported later

Change-Id: I22caea6b4500e52dd1369d4b9d90d4beeb4b75ab

10 years agoYaGL: GL_EXT_draw_buffers implemented 08/13108/1
Stanislav Vorobiov [Tue, 5 Nov 2013 15:51:43 +0000 (19:51 +0400)]
YaGL: GL_EXT_draw_buffers implemented

Change-Id: I1a15a6e8b7bf7be93c44122efee97a9887931645

10 years agoYaGL: GL_ANGLE_framebuffer_blit implemented 07/13107/1
Stanislav Vorobiov [Tue, 5 Nov 2013 11:33:35 +0000 (15:33 +0400)]
YaGL: GL_ANGLE_framebuffer_blit implemented

Change-Id: Ib33968c3016e99e063a7f17bcc43b014ed0a51df

10 years agoYaGL: Complete VAO support 06/13106/1
Stanislav Vorobiov [Tue, 5 Nov 2013 07:12:32 +0000 (11:12 +0400)]
YaGL: Complete VAO support

GL_OES_vertex_array_object now fully supported

Change-Id: Ieb9a425e301090dba53efc2f7baa3012c229c7a0

10 years agoYaGL: Add OpenGL 3.1 without ES3 to supported versions 05/13105/1
Stanislav Vorobiov [Tue, 5 Nov 2013 05:46:16 +0000 (09:46 +0400)]
YaGL: Add OpenGL 3.1 without ES3 to supported versions

Even if OpenGL 3.1 doesn't support GL_ARB_ES3_compatibility
we still should use it instead of 2.1 because in case of mesa
3.1 has much smaller memory footprint

Change-Id: I141a8b8da3bfac8a3b86a4fcafa132703ff18b54

10 years agoYaGL: glCopyTexImage2D TODO 04/13104/1
Stanislav Vorobiov [Fri, 1 Nov 2013 11:21:00 +0000 (15:21 +0400)]
YaGL: glCopyTexImage2D TODO

glCopyTexImage2D should be fixed for
OpenGL 3.1 core profile. Will do that later

Change-Id: Id8b2d808d3ae01f086207b98c01af4500743fdde

10 years agoYaGL: Fix GL_POINT_SPRITE 03/13103/1
Stanislav Vorobiov [Thu, 31 Oct 2013 14:08:52 +0000 (18:08 +0400)]
YaGL: Fix GL_POINT_SPRITE

In OpenGL 3.1 core profile GL_POINT_SPRITE is
always enabled, don't call glEnable

Change-Id: Iaab5da9ac1fb9728a43ffe74055dceb5247cdfac

10 years agoYaGL: Fix OpenGL 2.1 specific texture formats support 02/13102/1
Stanislav Vorobiov [Wed, 30 Oct 2013 13:31:27 +0000 (17:31 +0400)]
YaGL: Fix OpenGL 2.1 specific texture formats support

In OpenGL 3.1 core profile GL_ALPHA, GL_LUMINANCE and
GL_LUMINANCE_ALPHA are not supported, therefore these
texture formats have to be emulated

Change-Id: Ibf682d8f87cb55804905cecc5fa74018977e863b

11 years agoYaGL: Basic VAO support 01/13101/1
Stanislav Vorobiov [Tue, 22 Oct 2013 15:27:08 +0000 (19:27 +0400)]
YaGL: Basic VAO support
YaGL: Framebuffer object sharing changed

In OpenGL 3.1 core we can't work without VAOs, so at least
one VAO has to be created and bound. We currently have only basic
support that creates a single VAO in context preparation callback
and binds it.
In OpenGL 2.1 there're no VAOs, but for simplicity we'll just have
one single fake VAO in this case.

According to GLESv2 spec. framebuffer object sharing behavior
is undefined, but GLESv3 spec. states that framebuffer objects
are not shared between contexts. Previously our framebuffer
objects were shared between contexts, now they're not.

Change-Id: I7d7267495caffc7056100d014e063698646a32f6

11 years agoYaGL: GLESv3 supported in EGL 00/13100/1
Stanislav Vorobiov [Tue, 22 Oct 2013 10:14:05 +0000 (14:14 +0400)]
YaGL: GLESv3 supported in EGL

Change-Id: Ife98eb6614f8371bd79f93e57db5fade0dabd0fe

11 years agoYaGL: Some GLESv3 dummies 99/13099/1
Stanislav Vorobiov [Fri, 18 Oct 2013 11:44:22 +0000 (15:44 +0400)]
YaGL: Some GLESv3 dummies

Change-Id: Idb715f8aca289322cd975bb0002d5bb6b47ed1a5