aboutsummaryrefslogtreecommitdiffstats
path: root/include/GL
Commit message (Collapse)AuthorAgeFilesLines
* dri: add another get shm variant.Dave Airlie2020-02-251-1/+14
| | | | | | | | | | | | | | | | | | | | | | | When Brian in 02c3dad0f3b4d26e0faa5cc51d06bc50d693dcdc restricted the shm permissions it means we hit the fallback paths in some scenarios we hadn't before. When you use Xephyr to xdmcp from one user to another the new perms stop the X server (running as user a) attaching to the SHM segments from gnome-shell (running as user b). In this case however only the GLX side of the code had insight into this, and the dri could was meant of fall back, and it worked for put image fine but the get image path was broken, since there was no indication in the broken case of the need to fallback. This adds a return type to a new interface member that lets the caller know it has to fallback. Fixes: 02c3dad0f3b4 ("Call shmget() with permission 0600 instead of 0777") Reviewed-by: Michel Dänzer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3823>
* dri: add __DRI_IMAGE_FORMAT_SXRGB8Tapani Pälli2019-12-171-0/+2
| | | | | | | | | Add format definition and required plumbing to create images. Cc: <[email protected]> Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3077>
* Revert "dri_interface: add interface for EGL_EXT_image_flush_external"Tapani Pälli2019-11-141-50/+1
| | | | | | | | | | | This reverts commit 7520478461d8ab1cda415ff689d6b9058213ff43. This series caused unexpected flickering artifacts with Iris driver on Chrome OS and EGL_EXT_image_flush_external spec has not been published yet. Acked-by: Eric Engestrom <[email protected]> Acked-by: Kristian H. Kristensen <[email protected]>
* dri_interface: add interface for EGL_EXT_image_flush_externalMarek Olšák2019-10-251-1/+50
| | | | | Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-By: Tapani Pälli <[email protected]>
* Revert "egl: Fixes transparency with EGL and X11."Hal Gentz2019-10-181-2/+1
| | | | This reverts commit 90a19074b4e1d4d8f8ababaade8170c05aeecffe.
* egl: Fixes transparency with EGL and X11.Hal Gentz2019-10-111-1/+2
| | | | | | | | | | | | | This commit does this by allowing both RGB and RGBA visuals to match with EGL configs. We also expose the `EGL_MESA_config_select_group` egl extension, which is similar to GLX's visual select group extension, to allow the RGBA visuals to get less priority. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67676 Fixes: 049f343e8ac "egl: Allow 24-bit visuals for 32-bit RGBA8888 configs" Cc: [email protected] Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Hal Gentz <[email protected]>
* GL: drop symbols mangling supportEric Engestrom2019-10-104-2908/+0
| | | | | | | | | | SCons and Meson have never supported that feature, and Autotools was deleted over 6 months ago and no-one complained yet, so it's pretty obvious nobody cares about it. Fixes: 95aefc94a941701616fd ("Delete autotools") Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* mesa/gl: Sync with Khronos registryHeinrich Fink2019-09-163-10/+31
| | | | | | | | | | | | | | | | | | Update GL headers and xml API from upstream Khronos registry (commit 3d0c3eb). Keep `BUILDING_MESA` quirk in glext.h. mesa/extensions: Expose EXT_EGL_sync instead of MESA_EGL_sync to reflect Khronos request of changing this extension's scope from MESA to EXT. EGL_EGL_sync is also the name of the extension that has been merged into the upstream Khronos GL registry. Remove MESA_EGL_sync spec txt from Mesa tree as it is now published as EXT by Khronos. v1: Remove MESA_EGL_sync spec and squash commits (Eric E) Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* dri: Use DRM_FORMAT_* instead of defining our own copy.Eric Anholt2019-09-111-46/+5
| | | | | | | | | | | | We have only two defines that aren't from DRM_FORMAT_*: SARGB and SABGR. Keep only those as __DRI_IMAGE_FOURCC and garbage collect the rest. While this header is also used from the X server, the X server doesn't use any __DRI_IMAGE enums. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* headers: Add GL_MESA_EGL_sync token to GLHeinrich Fink2019-09-082-0/+8
| | | | | Reviewed-by: Daniel Stone <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* include: sync GL headers with registryHeinrich Fink2019-09-053-14/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | Integrating headers from upstream registry [0] master branch. Effective GL registry commit integrated: 9d534f9312e56c72df763207e449c6719576fd54 Keeping the following quirks local to Mesa: - glext.h: BUILDING_MESA guard (see !1492) - glxext.h: glXQueryGLXPbufferSGIX: 'int' return type (Mesa) vs while 'void' (GL registry) - glxext.h: GLX_RENDERER_ID_MESA is still expected by some mesa tests, even though its token has been removed from the spec (see docs/specs/MESA_query_renderer.spec) - glxext.h: glXGetTransparentIndexSUN / PFNGLXGETTRANSPARENTINDEXSUNPROC argument pTransparentIndex has type 'unsigned long *' (Mesa) vs. 'long *' (GL registry) [0] https://github.com/KhronosGroup/OpenGL-Registry Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* glx: Sync <GL/glxext.h> with KhronosAdam Jackson2019-08-221-8/+15
| | | | | | | | Minor fixups required to keep the prototypes matching and to remove mention of retired enums. Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gbm: Add buffer handling and visuals for fp16 formatsKevin Strasser2019-08-211-0/+1
| | | | | | | | | | Define and set a new loader cap DRI_LOADER_CAP_FP16, indicating that gbm can handle fp16 formats. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add fp16 formatsKevin Strasser2019-08-211-0/+4
| | | | | | | | | | | Add dri formats for RGBA ordered 64 bpp IEEE 754 half precision floating point. Leverage existing offscreen render support for MESA_FORMAT_RGBA_FLOAT16 and MESA_FORMAT_RGBX_FLOAT16. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add config attributes for color channel shiftKevin Strasser2019-08-211-1/+5
| | | | | | | | | | | | | | | The existing mask attributes can only support up to 32 bpp. Introduce per-channel SHIFT attributes that indicate how many bits, from lsb towards msb, the bit field is offset. A shift of -1 will indicate that there is no bit field set for the channel. As old loaders will still be looking for masks, we set the masks to 0 for any formats wider than 32 bpp. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri_interface: add DRI2_BufferDamage interfaceDaniel Stone2019-08-131-0/+43
| | | | | | | | | | | | | | | | | | Add a new DRI2_BufferDamage interface to support the EGL_KHR_partial_update extension, informing the driver of an overriding scissor region for a particular drawable. Based on a commit originally authored by: Harish Krupo <[email protected]> renamed extension, retargeted at DRI drawable instead of context, rewritten description Signed-off-by: Daniel Stone <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Qiang Yu <[email protected]> Tested-by: Qiang Yu <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* include: update GL headers from the registryMarek Olšák2019-06-212-98/+432
| | | | Acked-by: Ilia Mirkin <[email protected]>
* st/dri: allow direct UYVY importChristian Gmeiner2019-03-111-0/+1
| | | | | | | Push this format to the pipe driver unchanged. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Add XYUV8888 formatKasireddy, Vivek2019-02-261-0/+2
| | | | | | | | | | In addition to adding this format to the dri_interface header, add an entry in the android and wayland backends as well. Signed-off-by: Vivek Kasireddy <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* dri_interface: add missing #includeEric Engestrom2019-02-261-0/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
* dri: add P010, P012, P016 for 10bit/12bit/16bit YUV420 formatsTapani Pälli2019-02-121-0/+4
| | | | | | Signed-off-by: Tapani Pälli <[email protected]> Signed-off-by: Lin Johnson <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
* dri_interface: add put shm image2 (v2)Dave Airlie2019-01-251-1/+18
| | | | | | | | | | | | | | | | | | | This adds a new interface to the swrast interface to fix an shm put image bug. The current code adds the x,y src offsets into the offset parameters, however if the x offset is > 0, and the put image copies up to the height of the image, this can trigger an X server validation check to fail and the renderering to get BadMatch. This patch fixes it to pass the x offset coord in as a src x. We cannot pass the Y coordinate due to the horrible code mangling the image w/h vs stride in swrastXPutImage. v2: drop srcx,y from api Cc: <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* dri: add AYUV formatLionel Landwerlin2018-11-121-0/+2
| | | | | | | | v2: Add a AYUV entry android in the android backend (Tapani) Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gl.h: define GLeglImageOES depending on GL_EXT_EGL_image_storageBrian Paul2018-08-081-1/+1
| | | | | | | | | | | To avoid duplicate typedef with the definition in glext.h V2: test for both GL_OES_EGL_image and GL_EXT_EGL_image_storage in case both the GL and GLES headers are included. Per Emil. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107488 Tested-by: Vinson Lee <[email protected]> Reviewed-by: Mathias Fröhlich <[email protected]>
* dri: Define DRI_MutableRenderBuffer extensionsChad Versace2018-08-071-3/+134
| | | | | | | | | | | | Define extensions DRI_MutableRenderBufferDriver and DRI_MutableRenderBufferLoader. These are the two halves for EGL_KHR_mutable_render_buffer. Outside the DRI code there is one additional change. Add gl_config::mutableRenderBuffer to match __DRI_ATTRIB_MUTABLE_RENDER_BUFFER. Neither are used yet. Reviewed-by: Tapani Pälli <[email protected]>
* include: update GL & GLES headers (v2)Marek Olšák2018-08-043-25/+158
| | | | | | v2: use correct files Acked-by: Ian Romanick <[email protected]>
* dri: add putImageShm and getImageShm to swrastLoaderMarc-André Lureau2018-05-301-1/+19
| | | | | | | | | | | Add new API to put and get an image using shared memory. Instead of only passing the data pointer, 3 arguments are given: the shmid, the data offset and the shmaddr. Bump interface version. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* dri: Add __DRI_IMAGE_FORMAT_SABGR8Tapani Pälli2018-04-241-0/+2
| | | | | | | | | | Add format definition and required plumbing to create images. Note that there is no match to drm_fourcc definition, just like with existing _DRI_IMAGE_FOURCC_SARGB8888. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gl.h: remove stale comment, trailing whitespaceBrian Paul2018-03-291-2/+2
| | | | Reviewed-by: Emil Velikov <[email protected]>
* mesa: add xbgr support adjacent to xrgbIlia Mirkin2018-02-191-0/+2
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Acked-by: Daniel Stone <[email protected]>
* dri: add interface for EGL_ANDROID_blob_cache extensionTapani Pälli2018-02-071-1/+25
| | | | | | | | v2: move from __DRIcontext to __DRIscreen (Emil Velikov) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add 10 bpc formats as available formats. (v2)Mario Kleiner2018-01-031-1/+9
| | | | | | | | | | | | | | | | | Used to support ARGB2101010 and XRGB2101010 winsys framebuffers / drawables, but added other 10 bpc fourcc's as well for consistency with definitions in wayland_drm.h, gbm.h, and drm_fourcc.h. v2: Align new defines with tabs instead of spaces, for consistency with remainder of that block of definitions, as suggested by Tapani. Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Tapani Pälli <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* st/dri: allow direct YUYV importLucas Stach2017-12-201-0/+1
| | | | | | | Push this format to the pipe driver unchanged. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]>
* include: Add GL_MESA_program_binary_formats to GL/GLES2 ext.h filesJordan Justen2017-12-081-0/+5
| | | | | | | | | Thus was merged into the OpenGL Registry in version 667c5a253781834b40a6ae9eb19d05af4542cfe1. Ref: https://github.com/KhronosGroup/OpenGL-Registry/pull/127 Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* dri: Add a flush control extensionNeil Roberts2017-11-061-0/+25
| | | | | | | | | | This advertises that the driver can accept a new context attribute __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR. Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Neil Roberts <[email protected]>
* egl,dri: Propagate context priority hint to driver->CreateContextChris Wilson2017-10-201-0/+6
| | | | | | | | | | | | | | | | | | | | Jump through the layers of abstraction between egl and dri in order to feed the context priority attribute through to the backend. This requires us to read the value from the base _egl_context, convert it to a DRI attribute, parse it again in the generic context creator before passing it to the driver as a function parameter. In order to not require us to pass back the actual value of the context priority after creation, we impose that drivers should report the available set of priorities during screen setup (and then they may chose to fail if given an invalid value as that should have been checked at the user boundary.) Signed-off-by: Chris Wilson <[email protected]> Acked-by: Ben Widawsky <[email protected]> # i915/i965 Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* egl: Support IMG_context_priorityChris Wilson2017-10-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMG_context_priority https://www.khronos.org/registry/egl/extensions/IMG/EGL_IMG_context_priority.txt "This extension allows an EGLContext to be created with a priority hint. It is possible that an implementation will not honour the hint, especially if there are constraints on the number of high priority contexts available in the system, or system policy limits access to high priority contexts to appropriate system privilege level. A query is provided to find the real priority level assigned to the context after creation." The extension adds a new eglCreateContext attribute for choosing a priority hint. This stub parses the attribute and copies into the base struct _egl_context, and hooks up the query similarly. Since the attribute is purely a hint, I have no qualms about the lack of implementation before reporting back the value the user gave! v2: Remember to set the default ContextPriority value to medium. v3: Use the driRendererQuery interface to probe the backend for supported priority values and use those to mask the EGL interface. v4: Treat the priority attrib as a hint and gracefully mask any requests not supported by the driver, the EGLContext will remain at medium priority. Signed-off-by: Chris Wilson <[email protected]> Cc: Rob Clark <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* include: Revert out the update of the Khronos GLX extension header.Eric Anholt2017-10-121-11/+1
| | | | | | | | They made a mistake in the MESA_swap_control XML, which I'm pursuing in their github. Until then, we can just back this piece out. Tested-by: Mark Janes <[email protected]> Reviewed-by: Mark Janes <[email protected]>
* include: Update GL headers from khronos opengl registry.Eric Anholt2017-10-124-23/+84
| | | | | | | | Taken from their c6a99aff31874697741a08cbc8a3488606ce59c7, keeping the BUILDING_MESA hunk in place. Reviewed-by: Daniel Stone <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa: Implement a new GL_MESA_tile_raster_order extension.Eric Anholt2017-10-101-0/+6
| | | | | | | | | | | | | | The intent is to use this extension on vc4 to allow X11 to do overlapping CopyArea() within a pixmap without first blitting the pixmap to a temporary. With associated glamor patches, improves x11perf -copywinwin100 performance on a Raspberry Pi 3 from ~4700/sec to ~5130/sec, and is an even larger boost to uncomposited window movement performance (most copywinwin100 copies don't overlap). v2: Fix glIsEnabled() on the new enums. v3: Drop the local spec since I'm upstreaming the spec. Reviewed-by: Nicolai Hähnle <[email protected]>
* dri_interface: add an error-returning version of createImageFromRenderbufferNicolai Hähnle2017-10-101-1/+18
| | | | | | | | | We ought to be able to distinguish between allocation errors and bad parameters (non-existent renderbuffer object). Bumps the version of the DRI Image extension to 17. Reviewed-by: Eric Engestrom <[email protected]>
* dri/image: Add a format modifier attributes queryJason Ekstrand2017-09-141-1/+26
| | | | | Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* dri_interface.h: add missing stdint.h includeEmil Velikov2017-08-261-0/+2
| | | | | | | | Required for uint32_t and friends. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* include: Sync Khronos headers for OpenGL 4.6Adam Jackson2017-08-244-11/+136
| | | | | | | | Taken from c21e602b9fda1d3bbaecb08194592f67e6a0649b from OpenGL-Registry. (This time without breaking glext.h.) Signed-off-by: Adam Jackson <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* Revert "include: Sync Khronos headers for OpenGL 4.6"Adam Jackson2017-08-244-136/+16
| | | | | | Broke the BUILDING_MESA bit, oops. This reverts commit ef1e87e6cdbd80e74a8bc6d48b0b174a0812fe69.
* include: Sync Khronos headers for OpenGL 4.6Adam Jackson2017-08-244-16/+136
| | | | | | | | Taken from c21e602b9fda1d3bbaecb08194592f67e6a0649b from OpenGL-Registry. Signed-off-by: Adam Jackson <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* dri: fix typoEric Engestrom2017-08-241-1/+1
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* egl: Fix inclusion of egl.h+mesa_glinterop.hMatt Turner2017-08-211-0/+4
| | | | | | | | Previously clang would warn about redefinition of typedef EGLDisplay. Avoid this by adding preprocessor guards to mesa_glinterop.h and including it after EGL.h is indirectly included. Reviewed-by: Jordan Justen <[email protected]>
* dri: fix typo in commentGwan-gyeong Mun2017-08-171-1/+1
| | | | | Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* dri: Introduce SWAP_METHOD tokensThomas Hellstrom2017-08-101-0/+12
| | | | | | | | | | | | We shouldn't be using GLX tokens in the dri subsystem, so define dri SWAP_METHOD tokens and translate when necessary. Unfortunately the X server uses the dri swap method value untranslated as the GLX fbconfig swapMethod, so we can't enumerate these tokens arbitrarily, but rather need to make them have the same values as the corresponding GLX tokens. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>