Commit Graph

7 Commits

Author SHA1 Message Date
David 'Digit' Turner
2dfb7b549f emulator: opengl: fix the build
Change-Id: Ia20d15b63a059ed5d86c9087b827bdfa32c41c86
2011-08-26 18:17:13 +02:00
David 'Digit' Turner
5dfd5b292a emulator: opengl: support moved shared libraries.
It is possible to move the final installation path of a shared
library by using LOCAL_MODULE_PATH/LOCAL_UNSTRIPPED_PATH in its
module declaration.

We do this for example to put certain libraries under /system/lib/egl
or /system/lib/hw.

However, the Android build system has a small bug where you cannot
depend on these shared libraries because it will complain it doesn't
find them under /system/lib, the default install location.

More precisely, consider libfoo defined as:

  include $(CLEAR_VARS)
  LOCAL_MODULE := libfoo
  LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/egl
  ...
  include $(BUILD_SHARED_LIBRARY)

Its final binary will be installed to /system/lib/egl/libfoo.so

Now, let's write a module that depends on it, as:

  include $(CLEAR_VARS)
  LOCAL_MODULE := libbar
  LOCAL_SHARED_LIBRARIES += libfoo
  ...
  include $(BUILD_SHARED_LIBRARY)

The build system will complain there is no rule to define the target
/system/lib/libfoo.so, but the target should be /system/lib/egl/libfoo.so.

A work-around is to define libbar as follows instead:

  include $(CLEAR_VARS)
  LOCAL_MODULE := libbar
  LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_SHARED_LIBRARIES)/egl/libfoo.so
  ...
  include $(BUILD_SHARED_LIBRARY)

This works if you don't need to link against the library when building your
shared library (which is fortunately the case for the GLES emulation
libraries).

That's essentially what this patch implements under common.mk. We update
emugl-set-shared-library-subpath to record that a module has been "moved",
and we avoid adding them to the LOCAL_SHARED_LIBRARIES variable of the
modules that export it.

+ Simplify three Android.mk files accordingly.

Change-Id: Id15bef5359b0daa8d82bfaa5abf9346f00190ab5
2011-08-24 16:01:00 +02:00
Guy Zadickario
75094ee1ac opengles emulator: use bionic tls slot
This make the EGL/GLESv1/GLESv2 libraries on the guest to use
the OPENGL bionic tls slot for faster tls access.
Note that we still setting the slower tls in order to have the
tls destructor which allow us to close the host connection
when the thread exits.

Gives slightly performance improvement, the avg score for the
teapot test in 0xBench goes from 34 to 37 fps. (This test is
near immediate mode since it renders a lot of small primitives
so it is a good candicate to be improved).

Change-Id: I9060c75cc29c2e28721fa11d3f318b438edb5da9
2011-08-16 15:12:03 +03:00
Vladimir Chtchetkine
b2b6f2f9da Get rid of libqemu library.
Its implementation has been inlined in hardware/libhardware/include/hardware/qemu_pipe.h

Change-Id: I355764f87047c915ac43b85cd18bf0f27f06ede3
2011-08-03 09:10:14 -07:00
Stas Gurtovoy
6a79e88f01 emulator opengl: pool of fixups to the system components.
Those fixes make the system load without failure.
Also the flinger and bootanimation are running.

Change-Id: Ieb7039e76c444df778a421a07bccc48514199245
2011-06-21 01:41:50 +03:00
David 'Digit' Turner
892a6306e7 emulator: opengl: Use QEMU pipe.
This patch modifies the guest libraries to use the new
fast qemu "opengles" pipe to communicate with the host
renderer process.

Note that the renderer is still listening on a TCP socket
on port 22468.

Change-Id: I6ab84f972a8024e1fdababa4615d0650c8d461bf

Conflicts:

	tools/emulator/opengl/tests/gles_android_wrapper/Android.mk
	tools/emulator/opengl/tests/gles_android_wrapper/ServerConnection.h
2011-05-03 16:21:12 +02:00
Guy Zadikario
f7cd7ec421 emulator opengl: first commit of gralloc implementation.
This is the emulator opengl implementation of gralloc.

NOTE that it is currently build only if BUILD_EMULATOR_OPENGL_DRIVER
is defined, This is because the other driver peices (EGL/GLES) are
still missing.

Change-Id: If48f5ed619df6efb00cb4e590d99ce49d87875f6
2011-04-16 10:42:34 +03:00