History log of /external/mesa3d/src/egl/drivers/dri2/platform_android.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
74d41339087d2e1facb8e5d03845014e1b767a6f 21-Mar-2017 Rob Herring <robh@kernel.org> Android: kill off {MESA_}ANDROID_VERSION defines aka Android 4.1 and older

The Android version defines are only needed for versions less than 4.2
which aren't really supported or tested.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

(cherry picked from upstream commit 0e1ff22d55816c9a3710257c2e705a98ad3282bc)
Test: None
Bug: 32336912

Change-Id: I6e5f47f7595345969a01dcfd98437fa83df8777a
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
a0331a941cd8c798c0d7470930fedc5e4c43551a 25-Nov-2016 Tomasz Figa <tfiga@chromium.org> CHROMIUM: egl/android: Support opening render nodes from within EGL

This patch adds support for opening render nodes directly from within
display initialization, Instead of relying on private interfaces
provided by gralloc.

In addition to having better separation from gralloc and being able to
use different render nodes for allocation and rendering, this also fixes
problems encountered when using the same DRI FD for gralloc and Mesa,
when both stepped each over another because of shared GEM handle
namespace.

BUG=b:29036398
TEST=No significant regressions in dEQP inside the container

Test: No significant regressions in dEQP inside the container
Change-Id: I7f901eb9dadbfc2200484666fdc6a2bc0ca42a0c
(cherry picked from commit 4471713aa71d83943eb195868707ebe4e6515bb6)
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/367215
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
ba6b824a2cd5c0c02f7dc98374a8c8003464609d 02-Aug-2016 Tomasz Figa <tfiga@chromium.org> FROMLIST: egl/android: Make drm_gralloc headers optional (v2)

Make the code at least compile when being built without drm_gralloc
headers.

v2: Replaced #ifdefs with stubs for gralloc_drm_get_gem_handle()
and GRALLOC_MODULE_PERFORM_GET_DRM_FD.
Removed explicit render node probing code.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
(am from https://patchwork.freedesktop.org/patch/102547/)

BUG=b:29036398
TEST=No significant regressions in dEQP inside the container

Test: No significant regressions in dEQP inside the container
Change-Id: Id7b5087aaeb001cdcd6f384e7543da3aa6956ea6
(cherry picked from commit a038dd14dba799fa228b7781085b61e0605da8c2)
Reviewed-on: https://chromium-review.googlesource.com/367206
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Commit-Queue: Tomasz Figa <tfiga@chromium.org>
Tested-by: Tomasz Figa <tfiga@chromium.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
ace01b04599786484d432d8d3ff6f244dfeb9439 02-Feb-2017 Tapani Pälli <tapani.palli@intel.com> android: fix droid_create_image_from_prime_fd_yuv for YV12

Earlier changes introduced is_ycrcb flag which checks the component
order of u and v components. Condition for setting the flag was
incorrect, with ycrcb we are supposed to have cr before cb.

This patch (together with a fix in our gralloc) fixes corrupted
rendering from 'test-opengl-gl2_yuvtex' native test and corrupted
gallery thumbnail in application switcher on Android-IA.

Fixes: 51727b1cf57e8c4630767eb9ead207b102ffa489
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Plamena Manolova <plamena.manolova@intel.com>
Reviewed-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
(cherry picked from commit 0a2dcd3a8ac4bf18cd6ec2f778c9ef859ef90a51)
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
868ae3e31b0e479b299188d0047c88f0d260c6ec 25-Nov-2015 Boyan Ding <boyan.j.ding@gmail.com> egl/dri2: Unify the style of function pointer calls in structs

Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
[Emil Velikov: address platform_surfaceless]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
e2610bf1658971adf44f8558f652ae1a25c9a255 09-Dec-2016 Liu Zhiquan <zhiquan.liu@intel.com> EGL/android: Enhance pbuffer implementation

Some dri drivers will pass multiple bits in buffer_mask parameter
to droid_image_get_buffer(), more than the actual supported buffer
type combination. For such case, will go through all the bits, and
will not return error when unsupported buffer is requested, only
return error when the allocation for supported buffer failed.

v2: coding style and log changes
v3: coding style changes and update patch format

Signed-off-by: Liu Zhiquan <zhiquan.liu@intel.com>
Signed-off-by: Long, Zhifang <zhifang.long@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
51727b1cf57e8c4630767eb9ead207b102ffa489 10-Nov-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Use gralloc::lock_ycbcr for resolving YUV formats (v2)

There is an interface that can be used to query YUV buffers for their
internal format. Specifically, if gralloc:lock_ycbcr() is given no SW
usage flags, it's supposed to return plane offsets instead of pointers.
Let's use this interface to implement support for YUV formats in Android
EGL backend.

v2: Fixes from Emil's review:
a) Added comments for parts that might be not clear,
b) Changed get_fourcc_yuv() to return -1 on failure,
c) Changed is_yuv() to use bool.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
859d0b01217a0241a12a75899dcfb8263787f1ad 10-Nov-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Get gralloc module in dri2_initialize_android() (v2)

Currently droid_open_device() gets a reference to the gralloc module
only for its own use and does not store it anywhere. To make it possible
to call gralloc methods from code added in further patches, let's
refactor current code to get gralloc module in dri2_initialize_android()
and store it in dri2_dpy.

v2: fixes from Emil's review:
a) remove duplicate initialization of 'err'.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
925ff0b5341e0df494b647f02fbc136757fdd48e 09-Nov-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Remove handling of RGB_888 pixel format

It is currently completely broken, as it ends up using RGBX_8888 on
hardware side, due to no way of distinguishing between these two in the
DRI API, while HAL_PIXEL_FORMAT_RGB_888 is clearly defined to be the
3-byte per pixel RGB format.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
b663753f3b27b2bbc14ec7552c178f9900e79954 16-Nov-2016 Liu Zhiquan <zhiquan.liu@intel.com> EGL/android: pbuffer implementation

Android path didn't support pbuffer, so add pbuffer support to fix
most failing dEQP and CTS pbuffer test cases.

Patch adds a single buffer config to support pbuffer, and creates
image in getBuffers for pbuffer when surface type is front surface.

The EGL 1.5 spec states that pbuffers have a back buffer but no front
buffer, single-buffered surfaces with no front buffer confuse Mesa;
so we deviate from the spec, following the precedent of Mesa's EGL
X11 platform.

V3: update commit message and code review changes.

Signed-off-by: Liu Zhiquan <zhiquan.liu@intel.com>
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
1ef787339774bc7f1cc9c1615722f944005e070c 20-Oct-2016 Tapani Pälli <tapani.palli@intel.com> Revert "egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT"

This reverts commit b1d636aa007c0c354a217024b4befe15cfb5149f, previous
commit sets these values for all egl configs.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Cc: "12.0 13.0" <mesa-stable@lists.freedesktop.org>
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
af7abc512c422183a761ce3d687086abe282fa74 12-Sep-2016 Emil Velikov <emil.velikov@collabora.com> loader: remove loader_get_driver_for_fd() driver_type

Reminiscent from the pre-loader days, were we had multiple instances of
the loader logic in separate places and one could build a "GALLIUM_ONLY"
version.

Since that is no longer the case and the loaders (glx/egl/gbm) do not
(and should not) require to know any classic/gallium specific we can
drop the argument and the related code.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
3d48353e299c1f6ab4dc331c70074fe69dbfcc6d 17-Oct-2016 Tapani Pälli <tapani.palli@intel.com> egl/android: fix error in droid_add_configs_for_visuals()

This was some kind of leftover in commit acd35c8 and format_count
array variable (declared in outer scope) should be used instead.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Fixes: acd35c8758dc73240903 ("egl/android: tweak droid_add_configs_for_visuals()")
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
acd35c8758dc732409035cb0488c9d1c896f636d 25-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/android: tweak droid_add_configs_for_visuals()

Iterate over the driver_configs first in order to cut down the number of
getConfigAttrib() calls by a factor of 5.

While we're here, also drop the sentinel of the visuals array. We
already know its size so we can use that and save a few bytes.

v2: Use correct comparison in loop conditional (Eric)
Use valid C initializer (Gurchetan)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
637d001a97a82142bc20d410655098a0b7b39694 25-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/android: remove duplicate KHR_image_base set

The core egl/dri2 already sets the extension bit _only_ when possible -
which in Android's case is always.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
f871946594129500a67c05a6d9fe99db54b4bb64 25-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/dri2: rework dri2_egl_display::extensions storage

Remove the error prone fixed size array.
While we're here also rename to loader_extensions like in the GLX code.

v2: Rebase. Keep image_loader_extension within the wayland_drm
dri2_loader_extensions list.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
6a8fe32430077c44fda8a84c014a986e3fc77204 16-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/android: don't populate dri2_dpy->dri2_loader_extension

The extension stored in struct dri2_egl_display isn't used, thus we can
create a static const instance of the extension and point extensions[]
to it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
8fb9ea413de31cc6a95ac4c38215b621de728687 16-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/dri2: move surface refcounting out of the platform code

All the platforms are duplicating what should be a driver/dri2 thing -
refcounting. Just fold it accordingly.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
c8fd7d060d000a89f08f690ec72349ab97ae41bc 02-Oct-2016 Matt Whitlock <freedesktop@mattwhitlock.name> egl/android: replace call to dup(2) with fcntl(F_DUPFD_CLOEXEC)

Without this fix, duplicated file descriptors leak into child processes.
See commit aaac913e901229d11a1894f6aaf646de6b1a542c for one instance
where the same fix was employed.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Matt Whitlock <freedesktop@mattwhitlock.name>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
b1d636aa007c0c354a217024b4befe15cfb5149f 26-Aug-2016 Haixia Shi <hshi@chromium.org> egl/android: Set EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT

Set config attributes EGL_MAX_PBUFFER_WIDTH and EGL_MAX_PBUFFER_HEIGHT to
hard-coded non-zero values. These two attributes are required on Android.

v2: use _EGL_MAX_PBUFFER_WIDTH/HEIGHT from egldefines.h
(based on discussion on the first version)

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
4f5f9575d079376544a2ff70fb19f1dca417a931 25-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/android: remove config post-processing

No longer needed as of last commit, since we no longer add OPENGL to the
ClientAPIs thus, RenderType and Conformant don't have the desktop GL
bit set.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
4472b6e46985d0e80bdcf385f9dde542daeb5c55 25-Aug-2016 Emil Velikov <emil.velikov@collabora.com> egl/android: annotate static const data as such

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
c0580f6a3859ec373ed11b3a6266c9b94d01a343 04-Aug-2016 Nicolas Boichat <drinkcat@chromium.org> egl/android: Set dpy->DriverData to NULL on error

Avoid use-after-free on error.

Fixes: 9ee683f877 (egl/dri2: Add reference count for dri2_egl_display)
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
a7c6993a33e894556e45fc2882ad19f34274d689 28-Jul-2016 Haixia Shi <hshi@chromium.org> egl: android: query native window default width and height (v2)

On android platform, the width and height of a native window surface may
be updated after initialization. It is therefore necessary to query android
framework for the current width and height.

v2: remove Android specific #ifdef's and just implement the fallback directly
if the platform query_surface() callback is not provided.

TEST=dEQP-EGL.functional.resize.surface_size#* on cyan-cheets

Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org> (v1)
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: I673f7d2f1d90c3bf572b30f63da537f2cae1496e
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
3723e9826f3662ed8ff160f8f24a9b7ee2617db9 02-Aug-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Add support for YV12 pixel format (v2)

This patch adds support for YV12 pixel format to the Android platform
backend. Only creating EGL images is supported, it is not added to the
list of available visuals.

v2: Use const array defined just for YV12 instead of trying to be overly
generic.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Tested-by: Rob Herring <rob@kernel.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: I4aeb2d67a95c5cdd10b530c549b23146c8f0b983
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
7dfb1a4074328bcdff4b407b8f44be538180791d 02-Aug-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Make get_fourcc() accept HAL formats

There are DRI_IMAGE_FOURCC macros, for which there are no corresponding
DRI_IMAGE_FORMAT macros. To support such formats we need to make the
lookup function take the native format directly. As a side effect, it
simplifies all existing calls to this function, because they all called
get_format() first to convert from native to DRI_IMAGE_FORMAT.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Rob Herring <rob@kernel.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: I4674000fb5ccfd02e38b8fa89bc567ac1d4fc16b
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
e77b4933907106238c7872cb74d0ba0b5246aee6 02-Aug-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Refactor image creation to separate flink and prime paths (v2)

This patch splits current dri2_create_image_android_native_buffer() into
main entry point and two additional functions, one for creating an image
from flink name and one for handling prime FDs using the generic DMA-buf
path. This makes the code cleaner and also prepares for disabling flink
path more easily in the future.

v2: Split into separate patch.
Add error messages.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Rob Herring <rob@kernel.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: Ifdfb5927399d56992fe707160423c29278f49172
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
217af75a4092545fb9f5afe4a12e0b74cb1b48e4 02-Aug-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Respect buffer mask in droid_image_get_buffers (v2)

Drivers can request different set of buffers depending on the buffer
mask they pass to the get_buffers callback. This patch makes
droid_image_get_buffers() respect this mask.

v2: Return error only in case of real error condition and ignore requests
of unavailable buffers.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Rob Herring <rob@kernel.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: I6c3c4eca90f4c618579f6725dec323c004cb44ba
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
c6c26bc589f57c083f040ad70d1606cfa382c66a 02-Aug-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Remove unused variables in droid_get_buffers_with_format()

Fix compilation warnings due to unused variables left after some earlier
code changes.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Rob Herring <rob@kernel.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: Iec09eb2a62887f3a38dff156756ed8385f3f3447
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
9e1248d0752e692714b58ef1f2211ec7e172c8cf 15-Jul-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Stop leaking DRI images

Current implementation of the DRI image loader does not free the images
created in get_back_bo() and so leaks memory. Moreover, it creates a new
image every time the DRI driver queries for buffers, even if the backing
native buffer has not changed. leaking memory again.

This patch adds missing call to destroyImage() in droid_enqueue_buffer()
and a check if image is already created to get_back_bo() to fix the
above.

Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
565fa6b748e952098b2e69eff4be6ac15c204043 15-Jul-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Add some useful error messages

It is much easier to debug issues when the application gives some
meaningful error messages. This patch adds few to the EGL Android
platform backend.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
94282b6dd0e7c15030b09b6789a7aa5a15e8a869 15-Jul-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Check return value of dri2_get_dri_config()

It might return NULL if specific config variant is unsupported.

Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
ccda100a5a2838adec16ac10b2cc1c73e666e7d2 13-Jul-2016 Tomasz Figa <tfiga@chromium.org> egl/android: Remove unused variables

There are some unused variables left after previous clean-ups triggering
compiler warnings. Let's remove them.

Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
1ea233c6f30a74e6ff5456c3521328237b01eed8 02-Jun-2016 Haixia Shi <hshi@chromium.org> platform_android: prevent deadlock in droid_swap_buffers

To avoid blocking other EGL calls, release the display mutex before
we enqueue buffer to android frameworks and re-acquire the mutex
upon return.

v2: moved lock/unlock inside droid_window_enqueue_buffer().

TEST=verify pinch zoom in Photos app no longer causes hangs

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
1816c837c1906382c370d65afe65a691738fd03b 04-Jun-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: android: don't add the image loader extension for !render_node

With earlier commit we introduced support for render_node devices, which
was couples with the use of the image loader extension.

As the work was inspired by egl/wayland we (erroneously) added the
extension for the !render_node path as well.

That works for wayland, as the implementations of the DRI2 and IMAGE
loader extensions converge behind the scenes. As that is not yet
the case for Android we shouldn't expose the extension.

Fixes: 34ddef39cef ("egl: android: add dma-buf fd support")

Cc: <mesa-stable@lists.freedesktop.org>
Reported-by: Mauro Rossi <issor.oruam@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
d67e757d11342f9cfa566f85c3961259bc4d6870 01-May-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: android: remove explicit glFlush call

The DRI flush extension should already do the same thing.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Rob Herring <robh@kernel.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
9b3c7481c61098be1f780f91d8e06dc55afd5b0b 01-May-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: android: drop dri2_create_image_android_native_buffer argument

The drv is no longer used/needed as of last commit.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
38ef6f5f6019e168f584d99f94bc675afbb0b33a 01-May-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: android: directly use dri2_create_image_dma_buf()

Make the function non static so that we can use it directly from the
android platform code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
fb653641ea342efa253097d3a01533d634ae32ed 01-May-2016 Emil Velikov <emil.l.velikov@gmail.com> egl: android: do not feed invalid fourcc/pitch into the dri module

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
34ddef39cefc15ac6c82815c6339f5b666bb08d4 01-May-2016 Rob Herring <robh@kernel.org> egl: android: add dma-buf fd support

Add support for creating images from Android native buffers with dma-buf
fd. As dma-buf support also requires DRI image loader extension, add
that as well.

This is based on several originally patches written by Varad Gautam.
I've collapsed them into logical changes and done a bit of reformatting.
Using dma-bufs vs. GEM handles is now a runtime decision similar to the
wayland EGL instead of being compile time selection. The dma-buf support
is also re-written to use common dri2_create_image_dma_buf function in
egl_dri2.c.

Cc: Varad Gautam <varadgautam@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
81a6fff4c5246c0604b065a6b34145cdad9be423 28-Apr-2016 Rob Herring <robh@kernel.org> egl: android: factor out back buffer handling code

In preparation to use the same code for dma-bufs, factor out the code to a
separate function.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
dfaccf25f577987737568a8e1b21ba3a68ef2d80 28-Apr-2016 Rob Herring <robh@kernel.org> egl: android: factor out format conversion code to a function

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
d45884ef054eea539d4bf0018a99ed29e69d59c9 28-Apr-2016 Rob Herring <robh@kernel.org> egl: android: disable __DRI_DRI2_LOADER support on render nodes

Use of __DRI_DRI2_LOADER extension is only supported for card nodes. In
order to support dmabufs, Android will be moving to using render nodes and
we need to disable the DRI2 loader extension.

This is based on the Wayland EGL code.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
de743a07aca97b7b96f6cd3b9f9e3d3c8bf5b845 14-Apr-2016 Jakob Sinclair <sinclair.jakob@openmailbox.org> egl: Remove every double semi-colon

Removes all accidental semi-colons in egl.

Signed-off-by: Jakob Sinclair <sinclair.jakob@openmailbox.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
952720ccee0b4e97729e1972cf22b463641f1569 02-Feb-2016 Rob Herring <robh@kernel.org> egl: android: enable EGL_FRAMEBUFFER_TARGET_ANDROID and EGL_RECORDABLE_ANDROID

Set EGL_FRAMEBUFFER_TARGET_ANDROID and EGL_RECORDABLE_ANDROID config
attributes to true for Android. These are required in Marshmallow.

The implementation of EGL_RECORDABLE_ANDROID support has 2 options in
the definition of the extension. Android implements the 2nd option
which is the encoder must support RGB input. The requested input format
is RGB888, so setting the attribute on all the native Android visual
formats should be sufficient.

Similarly, setting EGL_FRAMEBUFFER_TARGET_ANDROID for all configs with
a EGL_NATIVE_VISUAL_ID should be sufficient. Most likely, the HWC should
support the same set of formats the underlying DRM driver supports.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
ba06ea1a37fd6f4807a70e12fa2581a027d6358d 02-Feb-2016 Rob Herring <robh@kernel.org> egl: android: clean-up config attribute setting

Pass the additional config attributes to dri2_add_config to set them
instead of open coding them. This is in preparation to add more attributes.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
e35c5af337524011c3d4f37ca3dbfca28d33ccad 02-Feb-2016 Varad Gautam <varadgautam@gmail.com> egl: android: fix visuals declaration

Signed-off-by: Varad Gautam <varadgautam@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
a25df5457121d40fef86929d4c10d8058a4d5c72 21-Jul-2015 Boyan Ding <boyan.j.ding@gmail.com> egl_dri2: Add a function to let platform code return dri drawable from _EGLSurface

dri3 for EGL will use different struct other than dri2_egl_surface for
an EGL surface, the common code only uses __DRIdrawable from that
struct, so instead of converting _EGLSurface to dri2_egl_surface, let
the platform code return the __DRIdrawable by its own (although the
current platforms use the same function).

v2: From Martin Peres
- convert to the new drawable interface (Kristian)

Signed-off-by: Boyan Ding <boyan.j.ding@gmail.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.co.uk>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
c2c2e9ab604793c6e01f85497f3f5bf645f962fa 10-Jun-2015 Marek Olšák <marek.olsak@amd.com> egl: implement EGL_KHR_gl_colorspace (v2)

v2: add missing "break"

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
efda9c56491f5cb90e77f5fe7979477fc9b2b529 11-May-2015 Marek Olšák <marek.olsak@amd.com> egl: set the EGL version in common code

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
70e8ccc459d9bf579ad7efeae453cb8641266c94 21-Dec-2014 Eric Anholt <eric@anholt.net> egl: Inform the client API when ancillary buffers may become undefined.

This is part of the EGL spec, and is useful for a tiled renderer to avoid
the memory bandwidth cost of storing the depth/stencil buffers.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
dfa6dc5eb8e76953bfc45a966813f736b0aa2346 27-Jul-2014 Emil Velikov <emil.l.velikov@gmail.com> android: drop HAL_PIXEL_FORMAT_RGBA_{5551,4444}

Upstream Android (system/core) has dropped these formats with commit
6bac41f1bf9(get rid of HAL pixelformats 5551 and 4444) yet does not
mention why.

These formats never really worked so we're safe to drop them as well.

Identical commit is available in the android-x86 external/mesa repo

commit 06a2d36edcd1e2247440e5800e6bf3028f37aee6
Author: Chih-Wei Huang <cwhuang@linux.org.tw>
Date: Wed Sep 25 01:16:57 2013 +0800

android: get rid of HAL pixelformats 5551 and 4444

Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
6980cae6aeb6671b6b0245e20a2d34957c1fff0a 05-Jun-2014 Adrian Negreanu <adrian.m.negreanu@intel.com> android, egl: typo dri2_fallback_pixmap_surface -> dri2_fallback_create_pixmap_surface

I used commit bc8b07a6 as reference, and only the droid_display_vtbl had this issue.

This fixes:
src/egl/drivers/dri2/platform_android.c:641:29:
error: 'dri2_fallback_pixmap_surface' undeclared here (not in a function)

Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
c524f3ef9155caba6cd4f9fc72485426b1da76fd 06-May-2014 Sarah Sharp <sarah.a.sharp@linux.intel.com> egl: Add EGL_CHROMIUM_sync_control extension.

Chromium defined a new GL extension (that isn't registered with Khronos).
We need to add an EGL extension for it, so we can migrate ChromeOS on
Intel systems to use EGL instead of GLX.

http://git.chromium.org/gitweb/?p=chromium/src/third_party/khronos.git;a=commitdiff;h=27cbfdab35c601f70aa150581ad1448d0401f447

The EGL_CHROMIUM_sync_control extension is similar to the GLX extension
OML_sync_control, but only defines one function,
eglGetSyncValuesCHROMIUM, which is equivalent to glXGetSyncValuesOML.

http://www.opengl.org/registry/specs/OML/glx_sync_control.txt

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Jamey Sharp <jamey@minilop.net>
Cc: Ian Romanick <idr@freedesktop.org>
Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
6d1f83ec09164bd805c90785635bbcf861b403e5 07-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/main: Stop using EGLNative types internally

Internally, much of the EGL code uses EGLNativeDisplayType,
EGLNativeWindowType, and EGLPixmapType. However, the EGLNative type
often does not match the variable's actual type.

The concept of EGLNative types are a bad match for Linux, as explained
below. And the EGL platform extensions don't use EGLNative types at all.
Those extensions attempt to solve cross-platform issues by moving the
EGL API away from the EGLNative types.

The core of the problem is that eglplatform.h can define each EGLNative
type once only, but Linux supports multiple EGL platforms.

To work around the problem, Mesa's eglplatform.h contains multiple
definitions of each EGLNative type, selected by feature macros. Mesa
expects EGL clients to set the feature macro approrpiately. But the
feature macros don't work when a single codebase must be built with
support for multiple EGL platforms, *such as Mesa itself*.

When building libEGL, autotools chooses the EGLNative typedefs based on
the first element of '--with-egl-platforms'. For example,
'--with-egl-platforms=x11,drm,wayland' defines the following:

typedef Display* EGLNativeDisplayType;
typedef Window EGLNativeWindowType;
typedef Pixmap EGLNativePixmapType;

Clearly, this doesn't work well for Wayland and GBM. Mesa works around
the problem by casting the EGLNative types to different things in
different files.

For sanity's sake, and to prepare for the EGL platform extensions, this
patch removes from egl/main and egl/dri2 all internal use of the
EGLNative types. It replaces them with 'void*' and checks each explicit
cast with a static assertion. Also, the patch touches egl_gallium the
minimal amount to keep it compatible with eglapi.h.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
eef68a9094396ee85f73a94911f8919d232b9a08 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglCreateImageKHR by display, not driver

Add dri2_egl_display_vtbl::create_image, set it for each platform, and
let egl_dri2 dispatch eglCreateImageKHR to that.

To remove ambiguity, rename egl_dri2.c:dri2_create_image() to
dri2_create_image_from_dri().

This prepares for the EGL platform extensions.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
eadd5e0c0a3c4b24c25e6368ea0a8352a8fd0701 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglCreateWaylandBufferFromImageWL by display, not driver

Add dri2_egl_display_vtbl::create_wayland_buffer_from_image, set it for
each platform, and let egl_dri2 dispatch
eglCreateWaylandBufferFromImageWL to that.

This prepares for the EGL platform extensions.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
688a0e8e73b916438878b4fc2271453ee79ec7a6 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglPostSubBufferNV by display, not driver

Add dri2_egl_display_vtbl::post_sub_buffer, set it for each
platform, and let egl_dri2 dispatch eglPostSubBufferNV to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
75d398ed9309c0cb8179380bd317d8f935618df7 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglSwapBuffersRegionNOK by display, not driver

Add dri2_egl_display_vtbl::swap_buffers_region, set it for each
platform, and let egl_dri2 dispatch eglSwapBuffersRegionNOK to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
bc2cbc0951ded883dc610672a6f6d4cca5d99502 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglCopyBuffers by display, not driver

Add dri2_egl_display_vtbl::copy_buffers, set it for each
platform, and let egl_dri2 dispatch eglCopyBuffers to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
3fdfbd2572ea42f3ef71db032b31cc87ea274e11 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch API.QueryBufferAge by display, not driver

Add dri2_egl_display_vtbl::query_buffer_age, set it for each
platform, and let egl_dri2 dispatch API.QueryBufferAge to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
958dd80c40dc87545b49d09cb2e4415a30746004 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglDestroySurface by display, not driver

Add dri2_egl_display_vtbl::destroy_surface, set it for each
platform, and let egl_dri2 dispatch eglDestroySurface to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
bf20076bafcf0809529ae470fb12af5eae12b33d 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglCreatePbufferSurface by display, not driver

Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each
platform, and let egl_dri2 dispatch eglCreatePbufferSurface to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
bc8b07a65722ad25aa52aa4918b51e236a13b09e 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglCreatePixmapSurface by display, not driver

Add dri2_egl_display_vtbl::create_pbuffer_surface, set it for each
platform, and let egl_dri2 dispatch eglCreatePixmapSurface to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
0a0c881a13afc99c7a88bf16117850350ccb85df 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglCreateWindowSurface by display, not driver

Add dri2_egl_display_vtbl::create_window_surface, set it for each
platform, and let egl_dri2 dispatch eglCreateWindowSurface to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
d03948a76634392455ae53fbf975d09c58bfc7aa 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglSwapBuffersWithDamage by display, not driver

Add dri2_egl_display_vtbl::swap_buffers_with_damage, set it for each
platform, and let egl_dri2 dispatch eglSwapBuffersWithDamageEXT to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
ad173bcfdbeaa52d6a024cd7ef6c068c5a999ba2 29-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglSwapBuffers by display, not driver

Add dri2_egl_display_vtbl::swap_buffers, set it for each platform, and
let egl_dri2 dispatch eglSwapBuffers to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
8b9298af0a3bce1360cc2c020b31470b37b660fe 28-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Dispatch eglSwapInterval by display, not driver

Add dri2_egl_display_vtbl::swap_interval, set it for each platform, and
let egl_dri2 dispatch eglSwapInterval to that.

This prepares for the EGL platform extensions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
90502b18b2b868250ab7e9189810ca42b3c812a1 28-Jan-2014 Chad Versace <chad.versace@linux.intel.com> egl/dri2: Move dri2_egl_display virtual funcs to vtbl

dri2_egl_display has only one virtual function, 'authenticate'. Define
dri2_egl_display::vtbl and move 'authenticate' there.

This prepares for the EGL platform extensions, which will add many
more virtual functions to dri2_egl_display.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
165eecf1f64b800321745956064ae0a5007b0ca4 25-Jan-2014 Emil Velikov <emil.l.velikov@gmail.com> egl/dri2/android: free driver_name in dri2_initialize_android error path

v2:
Cleanup driver name if dri2_load_driver() fails. Spotted by Chad

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
8d4357b5ba9e224ffe02e2457a2f4ffe2915f608 11-Jan-2014 Emil Velikov <emil.l.velikov@gmail.com> egl_dri2: use loader util lib

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
44e584a73af0ef78321d06a92f372d920b6ee8b7 15-Sep-2013 Kristian Høgsberg <krh@bitplanet.net> egl_dri2: Remove depth argument from dri2_add_config()

All callers now use the more correct rgba mask mechanism for filtering
out mathcing DRI configs. Even if depth and buffer size match, the
color component layout can be different, or in case or ARGB8888 and
ARGB2101010 the color components can even be different sizes.

Since anything that the depth check would reject is also rejected by
the rgba mask comparison, the depth parameter is redundant and not
specific enough. We should probably have removed it when the rgba
masks argument was introduced, but better late than never.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
3998cfa933dcd9134b75d9f0ae2c9cfcd6f2ee45 05-Jun-2013 Rico Schüller <kgbricola@web.de> mesa: remove outdated version lines in comments

Signed-off-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
2878f4685c8a5165937b5f4510b602d1a67af055 06-May-2013 Chad Versace <chad.versace@linux.intel.com> egl/android: Fix error condition for EGL_ANDROID_image_native_buffer

Emit EGL_BAD_CONTEXT if the user passes a context to
eglCreateImageKHR(type=EGL_ANDROID_image_native_buffer).

From the EGL_ANDROID_image_native_buffer spec:
* If <target> is EGL_NATIVE_BUFFER_ANDROID and <ctx> is not
EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated.

Note: This is a candidate for the stable branches.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
407029591c24edfd75970e8709f68b8e800ff50a 24-Jan-2013 Tapani Pälli <tapani.palli@intel.com> android: use gralloc_drm_get_gem_handle api

Currently a gralloc internal structure is exposed to Mesa,
Use a query function instead to maintain ABI compatibility.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
bfe28b8d938c4082e9334e4ccaf423fcd1625154 20-Dec-2012 Chad Versace <chad.versace@linux.intel.com> egl/android: Fix build for Jelly Bean (v2)

In Jelly Bean, the interface to ANativeWindow changed. The change included
adding a new parameter the queueBuffer and dequeueBuffer methods,
removing the lockBuffer method, and requiring libsync.

v2:
- s/fence_fd == -1/fence_fd != -1/
- Fix leak. Close the fence_fd.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
d58ca43b809593314907694e744780ab9b28d590 13-Aug-2012 Tapani Pälli <tapani.palli@intel.com> android: do not expose single buffered eglconfigs

On Android we want to add only double buffered configs for visuals.
Earlier implementation set the SurfaceType as 0 for single buffered
configs but driver still exposed these configs that were not compatible
with any egl surface type. This caused Khronos conformance test runs to
fail on Android. This patch fixes the issue by skipping single buffered
configs earlier and not exposing them.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
29d394b9ba4d7a23524fc6fba6da6e043085744b 13-Aug-2012 Tapani Pälli <tapani.palli@intel.com> android: fix liblog API changes

android logging macros changed their name in JellyBean.

Signed-off-by: Bruce E. Robertson <bruce.e.robertson@intel.com>
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
81f95ce13d92f15df2941a831ddb5a415f0f816e 24-Apr-2012 Sean V Kelley <sean.v.kelley@linux.intel.com> egl/android: Add support for RGBX_8888 used in Android native buffers

Add new format __DRI_IMAGE_FORMAT_XBGR8888 to __DRI_IMAGE.
HAL_PIXEL_FORMAT_RGBX_8888 now maps to __DRI_IMAGE_FORMAT_XBGR8888.

Signed-off-by: Sean V Kelley <sean.v.kelley@linux.intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
75cc24c876059d6eb183e07ed802f997fb416864 25-Nov-2011 Chia-I Wu <olv@lunarg.com> android: add support for ICS

With ICS (Android 4.0), several headers and structs are renamed. Define
ANDROID_VERSION so that we can choose a different path depending on the
platform version.

I've tested only softpipe and llvmpipe. r600g is also reported to work.
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
48eb1fe6f9bca74364cf43c36e48ff3fd7cd53f5 21-Aug-2011 Chia-I Wu <olv@lunarg.com> egl_dri2: add support for RGBA_8888 android native buffer

HAL_PIXEL_FORMAT_RGBA_8888 maps to __DRI_IMAGE_FORMAT_ABGR8888.
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
93d59637446ba98802fa349afc1f365d71a66c9d 26-Aug-2011 Chia-I Wu <olv@lunarg.com> egl_dri2: add pbuffer support to platform_android

This is a simple change thanks to allocateBuffer.

Reviewed-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
c8e18f85da9b41e79b67c39450917b46b6de8fb4 26-Aug-2011 Chia-I Wu <olv@lunarg.com> egl_dri2: check the surface type in platform_android

Check the surface type is EGL_WINDOW_BIT before doing anything, in
preparation for pbuffer support.

Reviewed-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
384f228a2573ce592854f58c45564f75419fe987 26-Aug-2011 Chia-I Wu <olv@lunarg.com> egl_dri2: refactor droid_get_buffers_with_format

Move the loop to parse attachments to its own function.

Reviewed-by: Chad Versace <chad@chad-versace.us>
/external/mesa3d/src/egl/drivers/dri2/platform_android.c
9779f6f5c143506d71420d78bb51b2fa7c995378 05-Aug-2011 Chia-I Wu <olvaffe@gmail.com> egl_dri2: add support for Android

Add platform_android.c that supports _EGL_PLAFORM_ANDROID. It works
with drm_gralloc, where back buffers of windows are backed by GEM
objects.

In Android a native window has a queue of back buffers allocated by the
server, through drm_gralloc. For each frame, EGL needs to

dequeue the next back buffer
render to the buffer
enqueue the buffer

After enqueuing, the buffer is no longer valid to EGL. A window has no
depth buffer or other aux buffers. They need to be allocated locally by
EGL.

Reviewed-by: Benjamin Franzke <benjaminfranzke@googlemail.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>

[olv: with assorted minor changes, mostly suggested during the review]
/external/mesa3d/src/egl/drivers/dri2/platform_android.c