Commit Graph

2596 Commits

Author SHA1 Message Date
David Turner
0ee2955a59 am a68ff59e: am 63e88ce1: Merge "opengles emulator: fix initialization of vertex attribute"
* commit 'a68ff59e3c7d63f4767bd8af90d501417db1e53e':
  opengles emulator: fix initialization of vertex attribute
2011-08-10 01:55:36 -07:00
David Turner
04befcc927 am 2cd8a6d9: am dc84793a: Merge "opengles emulator: object name manager name generation"
* commit '2cd8a6d91614be6eae82c09d227610c0abcd8f23':
  opengles emulator: object name manager name generation
2011-08-10 01:55:34 -07:00
Liran
50c0fb0eff opengles emulator: GLES2 translator / codec
fix glGetAttachedShaders
NULL is allowed in count parameter
fix problem with nvidia driver which returned invalid count

Change-Id: Icfaa5688b04325de2890486eb87b163babaddf30
2011-08-10 10:53:06 +02:00
Liran
0fd3ee21c8 opengles emulator: GLES fix memory leaks
fix some memory leaks and potential risks
detected using valgrind

Change-Id: I0f69cf4d4b4ba5eeb9c735f6712c301bcd4d3d36
2011-08-10 10:53:06 +02:00
Guy Zadickario
f6b9241094 opengles emulator: support glEGLImageTargetRenderbufferStorageOES
needed changes to support glEGLImageTargetRenderbufferStorageOES,
added implementation in egl and added tokens to renderControl.

Also fixed function pointers returned by eglGetProcAddress to
return functions that works independant of the current context,
see system/egl/ClientAPIExts.cpp

That makes the egl_image conformance test to pass on the guest.

Change-Id: I580cda82ba0fb44f12b75aa0bbacf5cd9f15f744
2011-08-10 10:53:06 +02:00
Guy Zadickario
f1d98dd318 opengles emulator: filter-out non-RGB configs
some applications and conformance tests expects to have
non-zero bit counts for all red,green and blue channels.
The translator expose all EGL compliant configs, including
monochrome and RG configs.
We now filter those out and expose to the guest only the RGB
configs.

Change-Id: I9a293675359135a548ce1c089f31a48ea2b7f46e
2011-08-10 10:53:06 +02:00
Guy Zadickario
52829d82ab opengles emulator: Workaround Cordy (Unity) bug with intel driver.
Uniform locations are 32-bit values which the application queries
from the driver after a shader program is linked. It seems that Cordy
game (possibly all Unity based apps) store the returned location as
16-bit value. Intel driver returns location values in the upper 16-bit
range :(
This is a workaround for this issue, when a program is linked we check
the locations of all uniforms, if all locations are within the upper
16-bit range (as with Intel driver) we shift the location value before
returning to the application. Also override all functions which take
a location parameter and do the reverse shift before sending a location
value to the host.

Change-Id: I234aaafe3313774b5da79eb1dac713b89b10ad60
2011-08-10 10:53:06 +02:00
David Turner
997c4c2a62 am 2257c1fd: am 3127d80b: Merge "opengles emulator: handle window surface resize"
* commit '2257c1fd9f7f9d057bdc811208e342483c59c935':
  opengles emulator: handle window surface resize
2011-08-10 01:46:49 -07:00
David Turner
cf81212c67 am 705e64ef: am 3ba4f8b8: Merge "opengles emulator: fix bug in glTranslatex"
* commit '705e64ef2a8e57e98e449f6115ba9138d0c2b848':
  opengles emulator: fix bug in glTranslatex
2011-08-10 01:46:47 -07:00
David Turner
7c36194cf0 am 3bf1beed: am b1f4d3cb: Merge "opengles emulator: fix printf\'s"
* commit '3bf1beeda1e9793cc1c488af5c6011657980123f':
  opengles emulator: fix printf's
2011-08-10 01:46:45 -07:00
Yochai Shefi Simchon
29994cba1a opengles emulator: make glFramebufferTexture2D work
The GLES and OpenGL specs for glFramebufferTexture2D are different, which
caused valid GLES calls to fail when moved over to OpenGL. Specifically,
a framebuffer in OpenGL must have a color attachment in order to be valid
for draw, while in GLES it doesn't. So add a validate function, and call
it from each drawing API call.
This patch also contains a workaround for a bug in the ATI driver, where
changing the framebuffer attachments requires a rebind of the framebuffer.

Change-Id: I011fbe0e2b1c66564322268868a24a9d5958a434
2011-08-10 10:43:25 +02:00
Yochai Shefi Simchon
aac306dfbb opengles emulator: Separate FramebufferData to header and source files
Change-Id: I5baefa87fb086d6250c29fa55e58ad129bc8f02a
2011-08-10 10:43:25 +02:00
Yochai Shefi Simchon
14d40b879d opengles emulator: GLESv2: glGetShaderPrecision
to overcome a bug in intel driver which returnes incorrect precision
and range for integers. query the driver for precision format only
for floats. for integers, we return values defined in gles spec.

Change-Id: Idfec2826d811220873c18f301cf4268fc54dabee
2011-08-10 10:41:20 +02:00
Yochai Shefi Simchon
142ed5bf31 opengles emulator: fix initialization of vertex attribute
fix the default values of vertex attrib array to match gles spec
size should be initialized to 4, and type should be initialized to GL_FLOAT

Change-Id: If23b3aec574ca660181be2ef1c91de1de2b07a70
2011-08-10 10:41:20 +02:00
Yochai Shefi Simchon
aaac179eb5 opengles emulator: object name manager name generation
genName in the globalNameSpace now calls the glGen* function of opengl
to generate a global name instead of inventing one.
this is to overcome a bug in intel driver which raises glError when
binding a framebuffer/renderbuffer with a name that was not generated
by opengl.

Change-Id: Ia0c2fefbf3538c185c380ba62d74eb94f2b28254
2011-08-10 10:41:20 +02:00
David Turner
34492d762e am dc8f3c37: am 5a034089: Merge "opengles emulator: fix a bug in RangeList"
* commit 'dc8f3c37940a2f99c3cfba6a798c3c123faf7d90':
  opengles emulator: fix a bug in RangeList
2011-08-10 01:21:44 -07:00
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
Jake Hamby
ad716fc412 Exclude some non-source folders from IntelliJ projects.
Add some excludeFolder lines to android.iml generated by idegen.sh.
This removes a large number of non-Java files that IntelliJ would
otherwise have to stat and parse.

Change-Id: I362711daba6cc0c7ebec761d013c57c27a29d58d
2011-08-09 16:00:35 -07: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