Commit Graph

65 Commits

Author SHA1 Message Date
Emil Velikov f3e23ead53 egl: remove remnants of MESA_drm_display
Last set in st/egl, unused in mesa-demos and superseded by
EGL_KHR_platform_gbm.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-03-09 17:16:51 +00:00
Julien Isorce 7d642442d9 egl: use unix defines on osx with clang
I also created an bug in Khronos 's bugzilla as you suggested:
https://www.khronos.org/bugzilla/show_bug.cgi?id=1356
I'll let you know if I get feedback from this bug or else where.

Patch with updated error messages:

[PATCH] eglplatform: treat __APPLE__ the same way as __unix__ to handle X11 types

  CC       eglapi.lo
./egldisplay.h:258:19: error: unknown type name 'Display'
_eglGetX11Display(Display *native_display, const EGLint *attrib_list);
eglapi.c:290:4: error: array size is negative
   STATIC_ASSERT(sizeof(void*) == sizeof(nativeDisplay));
eglapi.c:291:25: warning: cast to 'void *' from smaller integer type
   'EGLNativeDisplayType' (aka 'int') [-Wint-to-void-pointer-cast]
   native_display_ptr = (void*) nativeDisplay;
eglapi.c:307:32: error: use of undeclared identifier 'Display'
      dpy = _eglGetX11Display((Display*) native_display, attrib_list);
eglapi.c:776:35: error: use of undeclared identifier 'Window'
      native_window = (void*) (* (Window*) native_window);
eglapi.c:847:35: error: use of undeclared identifier 'Pixmap'
      native_pixmap = (void*) (* (Pixmap*) native_pixmap);

Bugzilla Mesa: https://bugs.freedesktop.org/show_bug.cgi?id=90249
Bugzilla Khronos: https://www.khronos.org/bugzilla/show_bug.cgi?id=1356
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-08 13:19:33 +01:00
Marek Olšák 20249d3559 egl: import platform headers from registry (v2)
v2: don't remove local Mesa changes

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05 19:44:33 +02:00
Marek Olšák 6b31f22338 egl: import eglext.h from registry and cleanup eglmesaext.h (v2)
v2: include mesa and chromium extensions in eglext.h so as not to break
    existing users
v3: keep PFNEGLSWAPBUFFERSREGIONNOK because piglit uses it

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05 19:44:32 +02:00
Marek Olšák 49ae822183 egl: import egl.h from registry (v2)
v2: split the commit into 3 patches

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-06-05 19:44:32 +02:00
Emil Velikov 0c4eef6a2c egl: remove remaining EGL_MESA_copy_context skeleton
With earlier commit (7a58262e58 egl: Remove skeleton implementation of
EGL_MESA_screen_surface) we've removed the skeleton implementation of
eglCopyContextMESA(). Just like EGL_MESA_screen_surface this extension
was never implemented in mesa.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2015-05-14 21:05:16 +00:00
Emil Velikov f9bf9133cc egl: fix the EGL_MESA_image_dma_buf_export header declarations
Similar to other EGL extensions - guard the function prototypes by
EGL_EGLEXT_PROTOTYPES as the libEGL library does (should) not provide
the symbols statically.

Instead users should call eglGetProcAddress, which returns the function
pointer. The latter of which was missing the type declaration (typedef).

Cc: Dave Airlie <airlied@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-05-14 21:00:04 +00:00
Adam Jackson 7a58262e58 egl: Remove skeleton implementation of EGL_MESA_screen_surface
No backend wires this up to anything, and the extension spec has been
marked obsolete for 4+ years.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-05-11 14:19:37 -04:00
Dave Airlie b5045e2991 egl: image_dma_buf_export - use KHR 64-bit type
After talking to Jon Leech he suggested this should be fine.

update spec to the version in the registry.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-05-05 12:19:40 +10:00
Dave Airlie 8f7338f284 egl: add initial EGL_MESA_image_dma_buf_export v2.4
At the moment to get an EGL image to a dma-buf file descriptor,
you have to use EGL_MESA_drm_image, and then use libdrm to
convert this to a file descriptor.

This extension just provides an API modelled on EGL_MESA_drm_image,
to return a dma-buf file descriptor.

v2: update spec for new API proposal
add internal queries to get the fourcc back from intel driver.

v2.1: add gallium pieces.

v2.2: add offsets to spec and API, rename fd->fds, stride->strides
in API. rewrite spec a bit more, add some q/a

v2.3:
add modifiers to query interface and 64-bit type for that (Daniel Stone)
specifiy what happens to num fds vs num planes differences. (Chad Versace)

v2.4:
fix grammar (Daniel Stone)

Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-04-01 14:10:04 +10:00
Alexander von Gluck IV 400b833592 egl: Add Haiku code and support
* This is the cleaned up work of the Haiku GCI student
  Adrián Arroyo Calle adrian.arroyocalle@gmail.com
* Several patches were consolidated to prevent
  unnecessary touching of non-related code
2014-12-23 09:07:57 -05:00
Sarah Sharp f6e50994e1 Import eglextchromium.h from Chromium.
In order to support the (currently unregistered) Chromium-specific EGL
extension eglGetSyncValuesCHROMIUM on Intel systems, we need to import
the Chromium header that defines it.  The file was downloaded from

https://chromium.googlesource.com/chromium/chromium/+/trunk/ui/gl/EGL/eglextchromium.h

It is subject to the license found at

https://chromium.googlesource.com/chromium/chromium/+/trunk/LICENSE

I have imported the header file and added the license text to the top.
The only change was to fix the include guard on the Chromium header to
change the last line from a #define to a #endif, which makes the header
actually compile.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Jamey Sharp <jamey@minilop.net>
Cc: Ian Romanick <idr@freedesktop.org>
Cc: Stéphane Marchesin <stephane.marchesin@gmail.com>
2014-05-20 11:31:32 -07:00
Chad Versace 38848b6217 egl: Update to revision 24567 of eglext.h
This pulls in EGL_EXT_platform_base, EGL_EXT_platform_wayland,
EGL_EXT_platform_x11, and EGL_MESA_platform_gbm.

This patch has a lot of churn because Khronos recently changed its
method of generating headers. Khronos now generates it headers from XML.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-03-17 15:36:03 -07:00
Neil Roberts 551d459af4 Add the EGL_MESA_configless_context extension
This extension provides a way for an application to render to multiple
surfaces with different buffer formats without having to use multiple
contexts. An EGLContext can be created without an EGLConfig by passing
EGL_NO_CONFIG_MESA. In that case there are no restrictions on the surfaces
that can be used with the context apart from that they must be using the same
EGLDisplay.

_mesa_initialze_context can now take a NULL gl_config which will mark the
context as ‘configless’. It will memset the visual to zero in that case.
Previously the i965 and i915 drivers were explicitly creating a zeroed visual
whenever 0 is passed for the EGLConfig. Mesa needs to be aware that the
context is configless because it affects the initial value to use for
glDrawBuffer. The first time the context is bound it will set the initial
value for configless contexts depending on whether the framebuffer used is
double-buffered.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-03-12 14:40:47 -07:00
José Fonseca 8771285054 s/Tungsten Graphics/VMware/
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008.  Leaving the
old copyright name is creating unnecessary confusion, hence this change.

This was the sed script I used:

    $ cat tg2vmw.sed
    # Run as:
    #
    #   git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed
    #

    # Rename copyrights
    s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g
    /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./
    s/TUNGSTEN GRAPHICS/VMWARE/g

    # Rename emails
    s/alanh@tungstengraphics.com/alanh@vmware.com/
    s/jens@tungstengraphics.com/jowen@vmware.com/g
    s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/
    s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g
    s/keithw\?@tungstengraphics.com/keithw@vmware.com/g
    s/michel@tungstengraphics.com/daenzer@vmware.com/g
    s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/
    s/zack@tungstengraphics.com/zackr@vmware.com/

    # Remove dead links
    s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g

    # C string src/gallium/state_trackers/vega/api_misc.c
    s/"Tungsten Graphics, Inc"/"VMware, Inc"/

Reviewed-by: Brian Paul <brianp@vmware.com>
2014-01-17 20:00:32 +00:00
Neil Roberts 5cddb1ce3c wayland: Add an extension to create wl_buffers from EGLImages
This adds an extension called EGL_WL_create_wayland_buffer_from_image
which adds the following single function:

struct wl_buffer *
eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImageKHR image);

The function creates a wl_buffer which shares its contents with the given
EGLImage. The expected use case for this is in a nested Wayland compositor
which is using subsurfaces to present buffers from its clients. Using this
extension it can attach the client buffers directly to the subsurface without
having to blit the contents into an intermediate buffer. The compositing can
then be done in the parent compositor.

The extension is only implemented in the Wayland EGL platform because of
course it wouldn't make sense anywhere else.
2013-12-04 17:04:57 -08:00
Stanislav Vorobiov 1281a90532 egl: add EGL_WAYLAND_Y_INVERTED_WL attribute
This enables querying of wl_buffer's orientation
2013-09-16 22:20:27 -07:00
Ander Conselvan de Oliveira 8d29b5271a egl: Update to Wayland 1.2 server API
Since Wayland 1.2, struct wl_buffer and a few functions are deprecated.

References to wl_buffer are replaced with wl_resource and some getter
functions and calls to deprecated functions are replaced with the proper
new API. The latter changes are related to resource versioning.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2013-08-07 10:37:58 -07:00
Ross Burton 2c6186390c eglplatform: use unsigned long instead of 32-bit ints in generic platform
In the generic Unix case use the "unsigned long" type instead of 32-bit
integers so that the type sizes are consistant on 64-bit machines between X11
and not-X11.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-07-01 10:06:24 -07:00
Robert Bragg 95dda0d649 egl: Update to revision 21254 of eglext.h
This pulls in EGL_EXT_swap_buffers_with_damage.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2013-05-07 17:07:44 +01:00
Kristian Høgsberg f79739ebdd egl: Update to revision 19987 of eglext.h
This pulls in EGL_EXT_buffer_age.
2013-01-04 11:20:12 -05:00
Matt Turner aec36a10dd egl: Update eglext.h to revision 19571
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-11-15 15:21:28 -08:00
Matt Turner d654afd892 egl: Import eglext.h revision 19332
The version number (14) wasn't updated.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-25 10:49:09 -07:00
Brian Paul 8433f80add egl: remove redundant PFNEGLQUERYSTREAMTIMEKHRPROC typedef
This typedef is present earlier in the header and isn't part of the
EGL_KHR_stream_cross_process_fd extension.  Looks like a Khronos glitch.
2012-08-07 07:31:05 -06:00
Ian Romanick 45e592c3dd egl: Import eglext.h version 14
This is necessary for EGL_KHR_create_context work (including writing
piglit tests).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06 15:37:04 -07:00
Kristian Høgsberg e23bfdb329 wayland: Use existing EGL_TEXTURE_FORMAT for querying wl_buffer texture format
We also reuse EGL_TEXTURE_RGBA and EGL_TEXTURE_RGB, adding only the new
planar YUV texture formats: EGL_TEXTURE_Y_U_V_WL, EGL_TEXTURE_Y_UV_WL and
EGL_TEXTURE_Y_XUXV_WL.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-07-19 14:03:17 -04:00
Kristian Høgsberg e6a33570b7 egl: Add EGL_WAYLAND_PLANE_WL attribute
This lets us specify the plane to create the image for for multiplanar
wl_buffers.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-07-11 15:28:36 -04:00
Chia-I Wu ed1ff2acec egl: remove EGL_ANDROID_swap_rectangle
We never support this unofficial extension, and it has been removed from
Android recently.  There is no point in keeping it.
2011-12-20 16:20:17 +08:00
Chia-I Wu b7acfe7755 egl: update headers
Update to revision 15052.

EGL_MESA_drm_image is now official.  But apparently we have our own extension
to it and we need this in eglmesaext.h:

  #ifdef EGL_MESA_drm_image
  /* Mesa's extension to EGL_MESA_drm_image... */
  #ifndef EGL_DRM_BUFFER_USE_CURSOR_MESA
  #define EGL_DRM_BUFFER_USE_CURSOR_MESA		0x0004
  #endif
  #endif

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-12-20 16:12:14 +08:00
Chia-I Wu ab7bb10a2a egl: move unofficial extensions to eglmesaext.h
As suggested by Ian in

  http://lists.freedesktop.org/archives/mesa-dev/2011-December/016035.html

Note that eglext.h has to include eglmesaext.h at the end instead of the
beginning because some extensions in eglmesaext.h depend on the official
extensions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-12-20 16:11:41 +08:00
Chia-I Wu 75cc24c876 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.
2011-11-25 12:34:33 +08:00
Chia-I Wu 00b365bc78 egl: add Android-specific extensions
Add EGL_ANDROID_image_native_buffer and EGL_ANDROID_swap_rectangle.
There is no spec for them though.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-08-21 02:01:48 +08:00
Chia-I Wu b0945c14df egl: add _EGL_PLATFORM_ANDROID
This is Android Gingerbread platform.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
2011-08-21 02:01:48 +08:00
Benjamin Franzke eddcecbf74 Add gbm (generic/graphics buffer manager) 2011-06-23 21:07:17 +02:00
Kristian Høgsberg e5169e9615 egl: Add a cursor use bit to MESA_drm_image 2011-05-06 10:33:50 -04:00
Kristian Høgsberg b6ed837ffe wayland: Fix prototypes for EGL_WL_bind_wayland_display extension 2011-04-25 15:07:15 -04:00
Kristian Høgsberg c0f8c9911c wayland-egl: Update to wayland-egl.h changes, drop struct wl_egl_display 2011-04-20 17:47:20 -04:00
Benjamin Franzke 6b369c4c7c egl: Add EGL_WL_bind_wayland_display 2011-03-01 17:23:50 -05:00
Kristian Høgsberg 04c5cc5b8b eglplatform.h: Define Wayland native platform types
This is conditional on WL_EGL_PLATFORM being #defined, so application
must make sure to include wayland-egl.h before including any egl header.
2011-02-09 10:58:20 -05:00
Kristian Høgsberg b7a8893a24 egl: Add EGL_MESA_drm_image extension
Create EGLImages from DRM buffer handles.
2010-08-25 09:17:47 -04:00
Chia-I Wu b2a575ff28 egl: Update eglext.h.
Update to version 7 for EGL_KHR_fence_sync.
2010-08-17 00:06:18 +08:00
Chia-I Wu 985c2fca10 egl: Add a test for MESA_EGL_NO_X11_HEADERS.
When the macro is defined, X11 headers will not be included.
2010-06-23 15:15:00 +08:00
Chia-I Wu 78d70ddbbd egl: Add support for EGL_MESA_drm_display.
The extension defines eglGetDRMDisplay that creates an EGLDisplay from a
DRM fd.  Calling eglCreateWindowSurace or eglCreatePixmapSurface with
such displays will generate EGL_BAD_NATIVE_WINDOW or
EGL_BAD_NATIVE_PIXMAP.
2010-06-23 15:14:59 +08:00
Chia-I Wu 0d820fc203 egl: Use khronos types for EGL_MESA_screen_surface.
That is, use khronos_uint32_t instead of uint32_t.
2010-05-31 11:31:08 +08:00
Kristian Høgsberg 5dc0f49084 egl: Implement EGL_NOK_texture_from_pixmap
This extension allows a color buffer to be used for both rendering and
texturing.  EGL allows the use of color buffers of pbuffer drawables
for texturing, this extension extends this to allow the use of color
buffers of pixmaps too.
2010-05-14 14:47:54 -04:00
Kristian Høgsberg 52c554a79d egl: Implement EGL_NOK_swap_region
This extension adds a new function which provides an alternative to
eglSwapBuffers. eglSwapBuffersRegionNOK accepts two new parameters in
addition to those in eglSwapBuffers. The new parameters consist of a
pointer to a list of 4-integer blocks defining rectangles (x, y,
width, height) and an integer specifying the number of rectangles in
the list.
2010-05-13 20:30:45 -04:00
Alan Coopersmith 8a985a988b eglplatform.h: recognize __unix as well for Solaris & other SVR4 platforms
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-02-05 19:38:16 -08:00
Chia-I Wu 95f8f75ad8 egl: Update headers.
Update to the current versions found at
http://www.khronos.org/registry/egl/.  There is one modification in
khrplatform.h for GCC visibility.
2010-01-25 11:28:27 +08:00
Chia-I Wu 897cb8950a egl: Fix breakage from -fvisibility=hidden.
Mark EGL API and driver functions as PUBLIC.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2010-01-05 11:23:52 -05:00
Brian Paul 18bdb6e712 egl: also use X types for building on Apple/MacOS X
See bug 20413.
2009-09-08 09:20:43 -06:00