]> git.cworth.org Git - apitrace/commit
egl: EGL image trace support
authorImre Deak <imre.deak@intel.com>
Mon, 4 Jun 2012 11:14:24 +0000 (14:14 +0300)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 2 Aug 2012 06:13:49 +0000 (07:13 +0100)
commit2b745f6c67ac66bb31d6e4da6436a031f9c9ae42
tree11e740e652788749adb26a5c678736233ac9bc1d
parent9a40d9e636d026a3e60af2ebe8be50ebdae608a8
egl: EGL image trace support

Getting the dimension / format of EGL images is not straitghforward.
One way to get these would be through glGetTexLevelParameter, but it's
not supported by GLES. Another way is to attach the EGL image to a
renderbuffer and call glGetRenderbufferParameter on it, but at least
mesa doesn't support attaching images in RGBA_REV format. And that
format happens to be an important one in applications we care about
(like the Android browser). We could also check the parameters of the
underlying native buffer, but these are not exposed through any API (for
either Xpixmaps or Android native buffers)

So the only way I found is to try a non-destructive glCopyTexSubImage2D
with sizes starting from GL_MAX_TEXTURE_SIZE down to 1 and determine the
correct size based on whether this returns an error or not.

Signed-off-by: Imre Deak <imre.deak@intel.com>
helpers/eglsize.cpp [new file with mode: 0644]
helpers/eglsize.hpp [new file with mode: 0644]
retrace/glretrace_egl.cpp
wrappers/CMakeLists.txt
wrappers/egltrace.py