Commit Graph

1127 Commits

Author SHA1 Message Date
David Turner
02e363eeb2 am 8324d38c: am a0bd0cbe: Merge "opengles emulator: Fixed Windows renderer termination"
* commit '8324d38c281d97dce68204d1c8ff2a5a3849a09b':
  opengles emulator: Fixed Windows renderer termination
2011-08-10 01:21:42 -07:00
David Turner
bf65b7feb8 am 278d1058: am 6bb95113: Merge "opengles emulator: GLES memory leaks"
* commit '278d10586dfb14be87e1bb8b4def77725bcac45f':
  opengles emulator: GLES memory leaks
2011-08-10 01:21:40 -07:00
David Turner
ec3cac82e2 am 7ed0fc9a: am 5bc21905: Merge "opengles emulator: fix glGetUnifrom"
* commit '7ed0fc9ab39f34b206ca21cc43a919c356d56ea1':
  opengles emulator: fix glGetUnifrom
2011-08-10 01:21:37 -07:00
David Turner
c9cd1777ca am 833d1a4e: am 6c812a6e: Merge "opengles emulator: libEGL fixes for ATI driver on windows."
* commit '833d1a4e336167865db43fe155e29f606d2a8757':
  opengles emulator: libEGL fixes for ATI driver on windows.
2011-08-10 01:21:35 -07:00
David Turner
bc1b310fb5 am 69ae2a4a: am b49454ac: Merge "opengles emulator: limit X11 configs some more"
* commit '69ae2a4ae2924257dc4e682641b0d409ad6c1caf':
  opengles emulator: limit X11 configs some more
2011-08-10 01:21:32 -07:00
David Turner
d0d6657a50 am a9605f55: am 385ae28d: Merge "opengles emulator: fixing pointer size bug."
* commit 'a9605f557651cf6d9642e2345330bfc8ccc164ee':
  opengles emulator: fixing pointer size bug.
2011-08-10 01:21:29 -07:00
David Turner
1a50f15fe9 am ae707198: am 275e99fd: Merge "opengles emulator: remove compilation warning."
* commit 'ae70719852919ca3a7ed614481380e2ad14d97a3':
  opengles emulator: remove compilation warning.
2011-08-10 01:21:25 -07:00
David Turner
7cd5d7bfdc am 3d0d9865: am 26892efa: Merge "opengles emulator: fixed renderer termination flow"
* commit '3d0d98658ec74afc2c2a542fc3b051c9372502db':
  opengles emulator: fixed renderer termination flow
2011-08-10 01:21:20 -07:00
Guy Zadickario
62c6532937 opengles emulator: handle window surface resize
resize the internal pbuffer we use for a WindowSurface
when a color buffer of different size is attached to the "window".
That fixes "Glyder 2 by glu" application view while loading.

Change-Id: I8f235f428e93077d57bd200f10b45b9a92f1a9d3
2011-08-10 10:13:38 +02:00
Stas Gurtovoy
af8fb702d5 opengles emulator: fix bug in glTranslatex
We need to convert the fixed values to floats before we call glTranslatef

Change-Id: If164a8f67b32177e7229f4c5c2f6eff99680d685
2011-08-10 10:13:38 +02:00
Stas Gurtovoy
42b6b44939 opengles emulator: fix printf's
On guest we use LOGD and on host fprintf to stderr.

Change-Id: I1f419ef3e5af5358f0dc8368d246254393acb674
2011-08-10 10:13:38 +02:00
Stas Gurtovoy
0957f4acda opengles emulator: fix a bug in RangeList
When an intersection is found, we want to add it to the output list, if splitting is needed and if not.

Change-Id: I9c9827b1c0ecd434925ff5698dd42bc1025dbedf
2011-08-10 10:11:13 +02:00
Guy Zadickario
ded8587d2d opengles emulator: Fixed Windows renderer termination
Make the event pump loop in the renderer process we do on Windows
exit when the Framebuffer's subwindow is destroyed.
Fixed TcpStream to close the socket using 'closesocket' on windows,
otherwise the other end of the socket does not sense that the socket
is closed.

+ Use WS_DISABLED to ensure that our GL subwindow doesn't receive
  any input events.

Change-Id: Icb477b3e1d7993a8880acb5e01bc5da29309ae50
2011-08-10 10:11:13 +02:00
Liran
5018365268 opengles emulator: GLES memory leaks
fix some memory leaks detected in valgrind

Change-Id: I48d91223c520c9c10b797a89a679eed7a950a3e6
2011-08-10 10:08:05 +02:00
Liran
8ee217f9cc opengles emulator: fix glGetUnifrom
added state tracking for uniforms in program objects
for each active uniform in index i we will save its starting location
,size and type, so when calling glGetUniform on its location,
we can tell how many bytes we should read from the stream according to
the uniform's type

add some type and size definitions to functions
that calculate size from enum

some other fixes to the codec

Change-Id: I4ecdf41e752454a908d131e76bab113a616f2bc8
2011-08-10 10:08:05 +02:00
Guy Zadickario
d2fae7055e opengles emulator: libEGL fixes for ATI driver on windows.
Removed calling into opengl/wgl from the initialiation code
of libEGL (was made during creation for the EglGlobalInfo object
during global variable initialization) !
That causes issues on ATI driver on windows since we might call into
the driver before it gets initialized. Instead we initialie the EglGlobalInfo
during the first call into libEGL.

Also ATI's version of wglChoosePixelFormatARB does not accept
NULL in the attribute list arguments.

Change-Id: I508263dc0440561ee1cd1311ed5ce37cee4d407e
2011-08-10 10:08:05 +02:00
Yochai Shefi Simchon
a22010c0f4 opengles emulator: limit X11 configs some more
On Linux/Intel, some configurations are returned which make no sense.
Also, no use for single buffer config, and we don't support pixmap
visuals.

Change-Id: I11f37c8ba612ee10dd654141e6f167add1675dce
2011-08-10 10:08:05 +02:00
Amit Feller
cd359e5718 opengles emulator: fixing pointer size bug.
Fix for a bug in pointer size of shaders param in
glGetAttachedShaders function

Change-Id: I647032b2bfcc9d341214accd72700adce07e6e4c
2011-08-10 10:08:05 +02:00
Guy Zadickario
e2dfd84f1f opengles emulator: remove compilation warning.
There was very few compilation warning on Windows and Linux.
This change just fixes those warnings.

Change-Id: I0428aa3dd33b2add40aa6cd12da76910950533b8
2011-08-10 10:03:07 +02:00
Guy Zadickario
467e5fb162 opengles emulator: fixed renderer termination flow
Handling clean exit of the renderer when stopOpenGLRenderer
is called. This is done by openning a connection to the renderer
and flag that it should exit. Added 'clientFlags' field which must
be send after every connection is made to the renderer for this purpose.
The server will wait for running rendering threads to exit and then will
close all EGL/GL resources and will exit. The stopOpenGLRenderer will
return only when the renderer has exited.

Change-Id: I8272b8ea59d5fc78453bb7bd2d25908068869fa7
2011-08-10 10:03:07 +02:00
David 'Digit' Turner
2a3bcf93a0 am 44d6a0fa: am 4e9cf45c: am 891ad0e8: Merge "emulator: opengl: Make render_api.h C-compatible"
* commit '44d6a0fa6f828f2196dd5a39ca80eff9c2db0922':
  emulator: opengl: Make render_api.h C-compatible
2011-08-09 13:37:28 -07:00
David Turner
edc55c16c7 am 611b3af6: am 385d396f: Merge "opengles emulator: fixing GL_HALF_FLOAT_OES bug"
* commit '611b3af642d6c1a873cf0f285a67233c75f437d2':
  opengles emulator: fixing GL_HALF_FLOAT_OES bug
2011-08-09 10:07:02 -07:00
David Turner
8320204067 am 89c5482b: am 283df9c4: Merge "opengles emulator: forced GLSL version to be 120."
* commit '89c5482b0f673d40778ba9a4f424135255d243f7':
  opengles emulator: forced GLSL version to be 120.
2011-08-09 10:07:00 -07:00
David Turner
b5e8d4c520 am 81973086: am c7fb2970: Merge "opengles emulator: GLES2 codec - glFinishRoundTrip"
* commit '81973086cf93e84fdbac204a4d9dd06cbe72798c':
  opengles emulator: GLES2 codec - glFinishRoundTrip
2011-08-09 10:06:58 -07:00
David Turner
eac7fbd6b3 am e6954209: am fc15a710: Merge "opengles emulator: test: added shader flags to triangleV2 test"
* commit 'e69542091eec03625b6f63abdf6e6db7c36ad1ca':
  opengles emulator: test: added shader flags to triangleV2 test
2011-08-09 10:06:55 -07:00
David Turner
f1482edd61 am 96221311: am 8b5652be: Merge "opengles emulator: support glEGLImageTargetRenderbufferStorageOES"
* commit '96221311b4eb6a139d856c03d360f1abf51a2d33':
  opengles emulator: support glEGLImageTargetRenderbufferStorageOES
2011-08-09 10:06:53 -07:00
David Turner
8fbd35c5b1 am d76a7100: am 0660de71: Merge "emulator opengl: fixed encoding of glGenRendebuffer"
* commit 'd76a71002068556c6be39b3b39ca1dc26714f467':
  emulator opengl: fixed encoding of glGenRendebuffer
2011-08-09 10:06:50 -07:00
David Turner
10ed98e019 am e79b525d: am bf13fc81: Merge "opengles emulator: fix bugs in CUBE_MAP implementation in GLES_CM"
* commit 'e79b525d8bb342967bb211cc8a14985ffca9f0af':
  opengles emulator: fix bugs in CUBE_MAP implementation in GLES_CM
2011-08-09 10:06:47 -07:00
David Turner
8c764ac447 am 853839b7: am 3618e8c9: Merge "opengles emulator: add GL_OES_depth_texture extension"
* commit '853839b72a9d58ff9d71027bb673480e898cf42e':
  opengles emulator: add GL_OES_depth_texture extension
2011-08-09 10:06:43 -07:00
David Turner
c89c5e8cc7 am 124babe3: am 8abaa9a0: Merge "opengles emulator: fix GL_EXT_packed_depth_stencil string"
* commit '124babe3b6e34170b82faee6783e0da9b08fb780':
  opengles emulator: fix GL_EXT_packed_depth_stencil string
2011-08-09 10:06:40 -07:00
David Turner
d30bb0b4b7 am 2b96b0fc: am 42dd982a: Merge "opengles emulator: 2.0: handle texture=0 on glFramebufferTexture2D"
* commit '2b96b0fc993914b3908dd103c05d50768fcbc0dd':
  opengles emulator: 2.0: handle texture=0 on glFramebufferTexture2D
2011-08-09 10:06:36 -07:00
David Turner
5dd949d29c am 42d5bd12: am ad3f4df3: Merge "opengles emulator: limit GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS"
* commit '42d5bd124b94dbcc684c8c3840891bbb54278071':
  opengles emulator: limit GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
2011-08-09 10:06:32 -07:00
David Turner
6b445a641c am 9e0dba41: am 06524031: Merge "opengles emulator: Call XInitThreads on Linux."
* commit '9e0dba41bfa5f2029618958a7c2fcfa12e1723ad':
  opengles emulator: Call XInitThreads on Linux.
2011-08-09 10:06:28 -07:00
David Turner
984ccfa171 am c4e4ba87: am 0e0638e5: Merge "opengles emulator: fix glGetShaderSource"
* commit 'c4e4ba87bba41f414ba268a42c1751263480057a':
  opengles emulator: fix glGetShaderSource
2011-08-09 10:06:23 -07:00
David Turner
f0e93f9634 am 30dce171: am a75d7c69: Merge "opengles emulator: fix GLESv2 shader source packing"
* commit '30dce17194d9290ccac8dd1492ba6d9196eead38':
  opengles emulator: fix GLESv2 shader source packing
2011-08-09 10:06:19 -07:00
David Turner
5473c6ae99 am ad3166ad: am 9e883e8b: Merge "opengles emulator: fix eglGetProcAddress"
* commit 'ad3166add78dff8407466d271540bbfd20a06320':
  opengles emulator: fix eglGetProcAddress
2011-08-09 10:06:14 -07:00
David Turner
8c6d04a662 am 53dfd83d: am 23685f03: Merge "opengles emulator: fixed EGLContext and EGLSurface ref-counting."
* commit '53dfd83d48777e0196117322a498cea8cc29f863':
  opengles emulator: fixed EGLContext and EGLSurface ref-counting.
2011-08-09 10:06:09 -07:00
David Turner
87cbeada5c am 2ad48e99: am 54502698: Merge "opengles emulator: fix the mixing between pack/unpack alignments"
* commit '2ad48e99d267e1d03e27e8f49c95b753e2bcf41a':
  opengles emulator: fix the mixing between pack/unpack alignments
2011-08-09 10:06:03 -07:00
David Turner
4b3baea530 am 6b2470ef: am 450fb0a6: Merge "opengles emulator: cache all buffer on the guest"
* commit '6b2470ef2b1e9915ad6303607aefd8659ebc502c':
  opengles emulator: cache all buffer on the guest
2011-08-09 10:05:58 -07:00
David Turner
19fdd87fc6 am 8cfde07c: am a0045f20: Merge "opengles emulator: dynamicaly grow ReadBuffer"
* commit '8cfde07c61e9ab0b8b9d8815547124545f59f80d':
  opengles emulator: dynamicaly grow ReadBuffer
2011-08-09 10:05:52 -07:00
David Turner
8713e3858c am ecb7c06f: am 321714ab: Merge "opengles emulator: fix eglGetError"
* commit 'ecb7c06ff4a670ea473ac053aaa9c0f99f4e0bf6':
  opengles emulator: fix eglGetError
2011-08-09 10:05:46 -07:00
David Turner
1a30107ecc am 81e21789: am c1db962f: Merge "opengles emulator: inc/dec ref-count of buffer on SwapBuffers"
* commit '81e21789a87f530cec499694186885cbe059b7db':
  opengles emulator: inc/dec ref-count of buffer on SwapBuffers
2011-08-09 10:05:39 -07:00
Amit Feller
e993528d8e opengles emulator: fixing GL_HALF_FLOAT_OES bug
when calculating the data size to pack, the type GL_HALF_FLOAT_OES,
wasn't recognized at all and therefore was by default 0, while it
should be 2 bytes.

Change-Id: Ib1f0dcdb837dd1b9cfebd1090cabfb59de472c53
2011-08-09 17:38:48 +02:00
Guy Zadickario
ee2388cb94 opengles emulator: forced GLSL version to be 120.
GLSL ES 1.0.17 spec states that its written against
OpenGL GLSL version 1.2, that means that #version 100
in GLSL ES should be mapped to #version 120 in OpenGL
GLSL.
We now force "$version 120" in all shaders except if
higher version has been requested in the shader source
or when GOOGLE_GLES_FORCE_GLSL_VERSION is defines.
(Note that GOOGLE_GLES_DEFAULT_GLSL_VERSION is renamed
 to GOOGLE_GLES_FORCE_GLSL_VERSION).

That fixes "Aqua Slash GL Demo" application !!

Change-Id: I0f61ba3aa1c5591df3dacd3afd7f216dba13b56e
2011-08-09 17:38:48 +02:00
Liran
e1a6d10a54 opengles emulator: GLES2 codec - glFinishRoundTrip
fix glFinishRoundTrip
the function was not implemented on the host side,
calling glFinish caused segfault

Change-Id: Ic3a726d22a499f6560d905d177dcb7f997397628
2011-08-09 17:38:48 +02:00
Guy Zadickario
0d5ea9bb69 opengles emulator: test: added shader flags to triangleV2 test
Added the ability to provide external vertex and fragment shader
files to the test application triangleV2. That makes easy to test
various shaders we see failing in applications.

Change-Id: Ifaae8490ac76c022aa712ae516355658922b47bd
2011-08-09 17:38:48 +02:00
Guy Zadickario
6d0f92b88d opengles emulator: support glEGLImageTargetRenderbufferStorageOES
That adds support to create a renderbuffer storage from an EGL
image (previously only texture was supported).
For that we have added Renderbuffer and Framebuffer attachment points
state tracking and when a renderbuffer which attached to an EGLImage
get attached to a framebuffer we attach the underlying EGLImage's
texture instead.

Also fixed some egl_image related bugs.
That makes the egl_image conformance test to pass on host.

Change-Id: I4e8c4935e45b27214038ecf1c1187ed96c5cea5b
2011-08-09 17:38:48 +02:00
Stas Gurtovoy
0710435277 emulator opengl: fixed encoding of glGenRendebuffer
Fixed pointer direction to be out (receives info from host).

Change-Id: I881b68393232cd262dd06eb1c124cf305ba28f31
2011-08-09 17:36:35 +02:00
Stas Gurtovoy
9254c7adc1 opengles emulator: fix bugs in CUBE_MAP implementation in GLES_CM
We save the texData->target in original format, but use our internal format
(using GLTextureTargetToLocal) to make sure we're not mixing 2D and CUBE_MAP textures on
glBindTexture.
Also added the GL_S/R/T/Q constants where needed.
This fixes the Cube Map test in Api Demos.

Change-Id: Id5de45581f2227fe0978d7982a147cb6b4b595c4
2011-08-09 17:36:35 +02:00
Yochai Shefi Simchon
65f8c50cbb opengles emulator: add GL_OES_depth_texture extension
Change-Id: I4f254be743b61ba00ebf58d136aa91f4eaf8b643
2011-08-09 17:33:04 +02:00