summaryrefslogtreecommitdiff
path: root/src/egl
AgeCommit message (Collapse)AuthorFilesLines
2012-08-06egl: Replace KHR_surfaceless_* extensions with KHR_surfaceless_contextIan Romanick5-35/+8
KHR extension name is reserved for Khronos ratified extensions, and there is no such thing as EGL_KHR_surfaceless_{gles1,gles2,opengl}. Replace these three extensions with EGL_KHR_surfaceless_context since that extension actually exists. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06egl_dri2: Refactor dereference of dri2_ctx_sharedIan Romanick1-6/+5
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-08-06egl_dri2: Remove swrast version >= 2 checksIan Romanick1-27/+11
Since support for swrast version 2 was added (f55d027a), it has also been required. In swrast_driver_extensions, version 2 is set for __DRI_SWRAST extension. Remove the spurious version checks sprinked through the code. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-07-19wayland: Support EGL_WIDTH and EGL_HEIGHT queries for wl_bufferKristian Høgsberg1-1/+8
We're going to make the public wl_buffer struct as small as possible. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-07-19wayland: Use existing EGL_TEXTURE_FORMAT for querying wl_buffer texture formatKristian Høgsberg1-11/+11
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-17wayland: Include wl_drm format enum in wayland-drm.hKristian Høgsberg1-1/+64
This gets referenced before we get to generate the header files, so just include the enum that we need and don't include the generated header.
2012-07-16egl_dri2: NULL check for EGLNativeWindowTypeElvis Lee1-0/+2
Some application calls eglCreateWindowSurface with EGLNativeWindowType parameter having zero value. It causes SEGV and disturbs error handling like EGL_NO_SURFACE. Signed-off-by: Elvis Lee <kwangwoong.lee@lge.com> Signed-off-by: Brian Paul <brianp@vmware.com>
2012-07-16gbm: Add new gbm_bo_import entry pointKristian Høgsberg1-3/+0
This generalizes and replaces gbm_bo_create_for_egl_image. gbm_bo_import will create a gbm_bo from either an EGLImage or a struct wl_buffer.
2012-07-13wayland: Stop trying to use make rules from aclocal, just copy and pasteKristian Høgsberg2-1/+8
Defeated by autotool, copy and paste to the rescue. https://bugs.freedesktop.org/show_bug.cgi?id=51997 https://bugs.freedesktop.org/show_bug.cgi?id=51531 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-07-13automake: convert libglapiJon TURNEY1-1/+1
* "configure substitutions are not allowed in _SOURCES variables" in automake, so remove the AC_SUBST'ed GLAPI_ASM_SOURCES and instead use some AM_CONDITIONALS to choose which asm sources are used * Change GLAPI_LIB to point to the .la file in other Makefile.am files, and make a link to the .a file for the convenience of other Makefiles which have not yet been converted to automake v2: - Use AM_CPPFLAGS for cleaner build output - EXTRA_SOURCES is not needed - Remove libglapi.a compatibility link on clean Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Matt Turner <mattst88@gmail.com>
2012-07-11egl: Add EGL_WAYLAND_PLANE_WL attributeKristian Høgsberg6-16/+166
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-11wayland-drm: Add protocol to create planar buffersKristian Høgsberg4-21/+91
2012-07-11wayland-drm: Pass struct wl_drm_buffer to the driverKristian Høgsberg3-37/+33
We're going to extend this to support multi-plane buffers, so pass this to the driver so it can access the details.
2012-07-05egl_dri2: Reorganize the EGLImage constructors to share more codeKristian Høgsberg1-78/+37
We factor out all the EGL book-keeping into dri2_create_image() and simplify the wayland case by using dupImage. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-06-21automake: Convert src/egl/Makefile to automake.Eric Anholt3-36/+29
2012-05-03egl_dri2: Fix out of tree builds with the wayland backend enabledRobert Hooker1-0/+1
Otherwise it fails like so: CC egl_dri2.lo In file included from egl_dri2.h:40:0, from egl_dri2.c:42: ../../../../../../src/egl/wayland/wayland-drm/wayland-drm.h:8:41: fatal error: wayland-drm-server-protocol.h: No such file or directory compilation terminated.
2012-04-30egl/android: Add support for RGBX_8888 used in Android native buffersSean V Kelley1-0/+2
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>
2012-04-13radeonsi: initial WIP SI codeTom Stellard1-2/+5
This commit adds initial support for acceleration on SI chips. egltri is starting to work. The SI/R600 llvm backend is currently included in mesa but that may change in the future. The plan is to write a single gallium driver and use gallium to support X acceleration. This commit contains patches from: Tom Stellard <thomas.stellard@amd.com> Michel Dänzer <michel.daenzer@amd.com> Alex Deucher <alexander.deucher@amd.com> Vadim Girlin <vadimgirlin@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> The following commits were squashed in: ====================================================================== radeonsi: Remove unused winsys pointer This was removed from r600g in commit: commit 96d882939d612fcc8332f107befec470ed4359de Author: Marek Olšák <maraeo@gmail.com> Date: Fri Feb 17 01:49:49 2012 +0100 gallium: remove unused winsys pointers in pipe_screen and pipe_context A winsys is already a private object of a driver. ====================================================================== radeonsi: Copy color clamping CAPs from r600 Not sure if the values of these CAPS are correct for radeonsi, but the same changed were made to r600g in commit: commit bc1c8369384b5e16547c5bf9728aa78f8dfd66cc Author: Marek Olšák <maraeo@gmail.com> Date: Mon Jan 23 03:11:17 2012 +0100 st/mesa: do vertex and fragment color clamping in shaders For ARB_color_buffer_float. Most hardware can't do it and st/mesa is the perfect place for a fallback. The exceptions are: - r500 (vertex clamp only) - nv50 (both) - nvc0 (both) - softpipe (both) We also have to take into account that r300 can do CLAMPED vertex colors only, while r600 can do UNCLAMPED vertex colors only. The difference can be expressed with the two new CAPs. ====================================================================== radeonsi: Remove PIPE_CAP_OUTPUT_READ This CAP was dropped in commit: commit 04e324008759282728a95a1394bac2c4c2a1a3f9 Author: Marek Olšák <maraeo@gmail.com> Date: Thu Feb 23 23:44:36 2012 +0100 gallium: remove PIPE_SHADER_CAP_OUTPUT_READ r600g is the only driver which has made use of it. The reason the CAP was added was to fix some piglit tests when the GLSL pass lower_output_reads didn't exist. However, not removing output reads breaks the fallback for glClampColorARB, which assumes outputs are not readable. The fix would be non-trivial and my personal preference is to remove the CAP, considering that reading outputs is uncommon and that we can now use lower_output_reads to fix the issue that the CAP was supposed to workaround in the first place. ====================================================================== radeonsi: Add missing parameters to rws->buffer_get_tiling() call This was changed in commit: commit c0c979eebc076b95cc8d18a013ce2968fe6311ad Author: Jerome Glisse <jglisse@redhat.com> Date: Mon Jan 30 17:22:13 2012 -0500 r600g: add support for common surface allocator for tiling v13 Tiled surface have all kind of alignment constraint that needs to be met. Instead of having all this code duplicated btw ddx and mesa use common code in libdrm_radeon this also ensure that both ddx and mesa compute those alignment in the same way. v2 fix evergreen v3 fix compressed texture and workaround cube texture issue by disabling 2D array mode for cubemap (need to check if r7xx and newer are also affected by the issue) v4 fix texture array v5 fix evergreen and newer, split surface values computation from mipmap tree generation so that we can get them directly from the ddx v6 final fix to evergreen tile split value v7 fix mipmap offset to avoid to use random value, use color view depth view to address different layer as hardware is doing some magic rotation depending on the layer v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on evergreen, align bytes per pixel to a multiple of a dword v9 fix handling of stencil on evergreen, half fix for compressed texture v10 fix evergreen compressed texture proper support for stencil tile split. Fix stencil issue when array mode was clear by the kernel, always program stencil bo. On evergreen depth buffer bo need to be big enough to hold depth buffer + stencil buffer as even with stencil disabled things get written there. v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen, old ddx overestimate those. Fix linear case when pitch*height < 64. Fix r300g. v12 Fix linear case when pitch*height < 64 for old path, adapt to libdrm API change v13 add libdrm check Signed-off-by: Jerome Glisse <jglisse@redhat.com> ====================================================================== radeonsi: Remove PIPE_TRANSFER_MAP_PERMANENTLY This was removed in commit: commit 62f44f670bb0162e89fd4786af877f8da9ff607c Author: Marek Olšák <maraeo@gmail.com> Date: Mon Mar 5 13:45:00 2012 +0100 Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY" This reverts commit 0950086376b1c8b7fb89eda81ed7f2f06dee58bc. It was decided to refactor the transfer API instead of adding workarounds to address the performance issues. ====================================================================== radeonsi: Handle PIPE_VIDEO_CAP_PREFERED_FORMAT. Reintroduced in commit 9d9afcb5bac2931d4b8e6d1aa571e941c5110c90. ====================================================================== radeonsi: nuke the fallback for vertex and fragment color clamping Ported from r600g commit c2b800cf38b299c1ab1c53dc0e4ea00c7acef853. ====================================================================== radeonsi: don't expose transform_feedback2 without kernel support Ported from r600g commit 15146fd1bcbb08e44a1cbb984440ee1a5de63d48. ====================================================================== radeonsi: Handle PIPE_CAP_GLSL_FEATURE_LEVEL. Ported from r600g part of commit 171be755223d99f8cc5cc1bdaf8bd7b4caa04b4f. ====================================================================== radeonsi: set minimum point size to 1.0 for non-sprite non-aa points. Ported from r600g commit f183cc9ce3ad1d043bdf8b38fd519e8f437714fc. ====================================================================== radeonsi: rework and consolidate stencilref state setting. Ported from r600g commit a2361946e782b57f0c63587841ca41c0ea707070. ====================================================================== radeonsi: cleanup setting DB_SHADER_CONTROL. Ported from r600g commit 3d061caaed13b646ff40754f8ebe73f3d4983c5b. ====================================================================== radeonsi: Get rid of register masks. Ported from r600g commits 3d061caaed13b646ff40754f8ebe73f3d4983c5b..9344ab382a1765c1a7c2560e771485edf4954fe2. ====================================================================== radeonsi: get rid of r600_context_reg. Ported from r600g commits 9344ab382a1765c1a7c2560e771485edf4954fe2..bed20f02a771f43e1c5092254705701c228cfa7f. ====================================================================== radeonsi: Fix regression from 'Get rid of register masks'. ====================================================================== radeonsi: optimize r600_resource_va. Ported from r600g commit 669d8766ff3403938794eb80d7769347b6e52174. ====================================================================== radeonsi: remove u8,u16,u32,u64 types. Ported from r600g commit 78293b99b23268e6698f1267aaf40647c17d95a5. ====================================================================== radeonsi: merge r600_context with r600_pipe_context. Ported from r600g commit e4340c1908a6a3b09e1a15d5195f6da7d00494d0. ====================================================================== radeonsi: Miscellaneous context cleanups. Ported from r600g commits e4340c1908a6a3b09e1a15d5195f6da7d00494d0..621e0db71c5ddcb379171064a4f720c9cf01e888. ====================================================================== radeonsi: add a new simple API for state emission. Ported from r600g commits 621e0db71c5ddcb379171064a4f720c9cf01e888..f661405637bba32c2cfbeecf6e2e56e414e9521e. ====================================================================== radeonsi: Also remove sbu_flags member of struct r600_reg. Requires using sid.h instead of r600d.h for the new CP_COHER_CNTL definitions, so some code needs to be disabled for now. ====================================================================== radeonsi: Miscellaneous simplifications. Ported from r600g commits 38bf2763482b4f1b6d95cd51aecec75601d8b90f and b0337b679ad4c2feae59215104cfa60b58a619d5. ====================================================================== radeonsi: Handle PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION. Ported from commit 8b4f7b0672d663273310fffa9490ad996f5b914a. ====================================================================== radeonsi: Use a fake reloc to sleep for fences. Ported from r600g commit 8cd03b933cf868ff867e2db4a0937005a02fd0e4. ====================================================================== radeonsi: adapt to get_query_result interface change. Ported from r600g commit 4445e170bee23a3607ece0e010adef7058ac6a11.
2012-04-13egl: fix uninitialized valuesDylan Noblesmith1-1/+1
Noticed by clang: eglimage.c:48:28: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] memset(attrs, 0, sizeof(attrs)); ~~~~~ ^~~~~ NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Brian Paul <brianp@vmware.com>
2012-04-12wayland-drm: Implement wl_buffer.damage in old versions of WaylandNeil Roberts1-0/+26
Commit 272bc48976 removed the damage implementation for the wl_buffer_interface because that has been removed from git master of Wayland. However this breaks building with the 0.85 branch of Wayland because it would end up initialising the struct incorrectly. For the time being it's quite convenient for some compositors to track the 0.85 branch of Wayland because the protocol is stable but they will also want to track the master branch of Mesa so that they can use the gbm surface changes. This patch adds a compile-time check for the version of Wayland so that it can work with either Wayland master or the 0.85 branch. krh: Edited to also account for API changes in 6802eaa68, which removes the timestamp argument from wl_resource_destroy().
2012-04-10egl_dri2: fix aux buffer leak in drm platformMandeep Singh Baines1-5/+4
Keep a reference to any newly allocated aux buffers to avoid re-allocating for every st_framebuffer_validate() (i.e. leaking). Signed-off-by: Mandeep Singh Baines <msb@chromium.org> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2012-04-10wayland-drm: remove wl_buffer.damagePekka Paalanen1-7/+0
This is a related fix for the Wayland change: commit 83685c506e76212ae4e5cb722205d98d3b0603b9 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Mon Mar 26 16:33:24 2012 -0400 Remove wl_buffer.damage and simplify shm implementation Apparently, this should also fix a memory leak. When wl_buffer.damage was removed from Wayland and Mesa was not fixed, wl_buffer.destroy ended up in the (empty) damage function instead of calling wl_resource_destroy(). Spotted during build as: CC wayland-drm-protocol.lo wayland-drm.c:80:2: warning: initialization from incompatible pointer type wayland-drm.c:82:1: warning: excess elements in struct initializer wayland-drm.c:82:1: warning: (near initialization for 'drm_buffer_interface') Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-03-28egl_dri2: use gbm_surface as the native window type in drm platformAnder Conselvan de Oliveira2-1/+324
2012-03-27egl_dri2: make flush extension useable by drm platformAnder Conselvan de Oliveira1-0/+1
2012-03-27wayland: Stop using wl_buffer.damageKristian Høgsberg1-2/+0
2012-03-20Add Makefile.in to toplevel .gitignoreKenneth Graunke3-3/+0
To avoid redundancies, this patch also removes Makefile.in from the other .gitignore files. Acked-by: Eric Anholt <eric@anholt.net>
2012-03-20Add .deps/, .libs/, and *.la to toplevel .gitignorePaul Berry2-7/+0
To avoid redundancies, this patch also removes .deps, .libs, and *.la from .gitignore files in subdirectories. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-19shared-glapi: Convert to automakeKristian Høgsberg1-1/+0
This fixes a build problem where EGL links to libgbm.la, which encodes a relative path to it's libglapi.so dependency. The relative path breaks when the linker tries to resolve it from src/egl/main instead of src/gbm. Typically we silently fall back to the system libglapi.so, which is wrong and breaks when there isn't one. Morale of the story: don't mix mklib and libtool.
2012-03-11Set close on exec flag FD_CLOEXECDavid Fries2-1/+19
Set the close on exec flag when opening dri character devices, so they will be closed and free any resouces allocated in exec. Signed-off-by: David Fries <David@Fries.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-05egl: Use -no-undefined libtool flagJon TURNEY1-1/+1
"Use -no-undefined to assure libtool that the library has no unresolved symbols at link time, so that libtool will build a shared library on platforms require that all symbols are resolved when the library is linked." If I had a dollar for every time I wrote this patch, I'd have about $10 :-) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
2012-03-05wayland: Use new wl_display_disconnectBenjamin Franzke1-1/+1
This replaces the previously used wl_display_destroy. wl_display_destroy was povided by wayland-client.so and wayland-server.so, to resolve that conflict its renamed client-side.
2012-03-02egl: Also put a symlink from libEGL.so in lib/ for now.Eric Anholt1-0/+1
This fixes the egl_gallium.so driver build when no system libEGL.so is present, since it's relying on the lib/ to build against until it gets converted to automake.
2012-03-01egl: Don't include strings.h on Windows.José Fonseca2-1/+1
strings.h is needed for the declaration of strcasecmp(), but only on non-Windows platforms.
2012-02-29egl/drivers: Convert to automake.Eric Anholt6-105/+97
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29egl/main: Convert to automake.Eric Anholt9-224/+185
The drivers/ walk-through-subdirs makefile is converted as well so I didn't need to keep EGL_DRIVERS_DIRS along with the per-driver HAVE_EGL_DRIVER_WHATEVER. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29egl: Drop the non-builtin-drivers support.Eric Anholt2-30/+2
The two drivers both did builtin mode, so drop the non-builtin build system. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-02-29egl: Drop _EGL_MAIN entrypoint obfuscation.Eric Anholt5-5/+2
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-29add wayland cflags when building wayland-eglJuan Zhao1-1/+2
to fix the header file missing when building wayland-egl
2012-01-26automake: src/egl/waylandBenjamin Franzke10-158/+39
So we can use the wayland scanner makro, which is way better than our previous runtime-pkgconfig hack. Reviewed-by: Matt Turner <mattst88@gmail.com>
2012-01-24Revert "Always build shared glapi"Matt Turner3-0/+13
This reverts commit adefee50d954151f76150af80207081ae3c247d9. Shared glapi was never tested with --enable-xlib-glx and turns out to cause a lot of problems. Conflicts: configure.ac
2012-01-24gbm: install libgbm.so into libMatt Turner1-1/+0
This partially reverts commit 90e256853418eaaba3717f930cc6a331e4099056.
2012-01-24egl,gbm_gallium: Fix linkage against gbm from automakeBenjamin Franzke1-0/+1
Add src/gbm/.libs to ldflags. The gbm lib is src/gbm/.libs/ instead of lib/ as of commit 06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
2012-01-20Always build shared glapiMatt Turner3-13/+0
libglapi.so, libGL.so, libGLESv2.so, libGLESv1_CM.so must all come from the same version of Mesa or bad things may happen. Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
2012-01-11wayland-drm: Drop the non-premul formats, use format codes from drm_fourcc.hKristian Høgsberg4-35/+81
2012-01-11egl_dri2: Put the _eglError call in the case switch caseKristian Høgsberg1-2/+2
Log an error in case we get an unknown format, not in case for XRGB32. I botched the edit of Roberts patch.
2012-01-11egl_dri2/wayland: handle creating xrgb8888 imagesRobert Bragg3-56/+80
When creating an EGLImage from a struct wl_buffer * this ensures that we create an XRGB8888 image if the wayland buffer doesn't have an alpha channel. To determine if a wl_buffer has a valid alpha channel this patch adds an internal wayland_drm_buffer_has_alpha() function. It's important to get the internal format for an EGLImage right so that if a GL texture is later created from the image then the GL driver will know if it should sample the alpha from the texture or flatten it to a constant of 1.0. This avoids needing fragment program workarounds in wayland compositors to manually ignore the alpha component of textures created from wayland buffers. krh: Edited to use wl_buffer_get_format() instead of wl_buffer_has_alpha(). Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2011-12-21egl/x11: Merge the right version of Frederiks changeKristian Høgsberg1-21/+8
Argh, I merged an older broken version of the swapbuffer change instead of Frederiks fixed version. This diffs gets us back to the right version.
2011-12-20egl_dri2/x11: Add support for the DRI2 SwapBuffers requestFredrik Höglund2-21/+81
2011-12-20egl_dri2/x11: Add support for eglSwapIntervalFredrik Höglund3-1/+36
2011-12-20egl_dri2/x11: error check coordinates in eglPostSubBufferNVChia-I Wu1-5/+5
EGL_BAD_PARAMETER should be returned when any of the coordinates is negative.