summaryrefslogtreecommitdiffstats
path: root/include/GL
Commit message (Collapse)AuthorAgeFilesLines
* android: support swrastWuZhen2016-11-011-2/+8
| | | | | | | | | | System boots up with gles_mesa/softpipe/llvmpipe. NO_REF_TASK Tested: local run Change-Id: I629ed0ca9fad12e32270eb8e8bfa9f7681b68474 Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
* mesa_glinterop: allow building without X and related headersEmil Velikov2016-10-141-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit effectively reverts c10dcb2ce837922c6ee4e191e6d6202098a5ee10 and fixes the typedef redefinition which inspired it. In order to prevent requiring X packages at build time earlier commit forward declared the required X/GLX typedefs. Since that approach introduced typedef redefinition (a C11 feature) it was reverted. To avoid the redefinition while _not_ mandating X and related headers forward declare the structs and use those through the header. As anyone uses the mesa interop header they ensure that the X (or others in terms of EGL) headers are included, which ensures that everything is resolved within the compilation unit. Cc: Vinson Lee <vlee@freedesktop.org> Cc: "12.0" <mesa-stable@lists.freedesktop.org> Cc: Tapani Pälli <tapani.palli@intel.com> Cc: Chih-Wei Huang <cwhuang@android-x86.org> Fixes: c10dcb2ce837 ("Revert "mesa_glinterop: remove inclusion of GLX header"") Fixes: 8472045b16b3 ("mesa_glinterop: remove inclusion of GLX header") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770 Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Tested-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
* Revert "mesa_glinterop: remove inclusion of GLX header"Vinson Lee2016-10-101-4/+1
| | | | | | | | | | | | | | | | | | | This reverts commit 8472045b16b3e4621553fe451a20a9ba9f0d44b6. Conflicts: include/GL/mesa_glinterop.h This patch fixes this build error with GCC 4.4. Compiling src/glx/dri_common_interop.c ... In file included from src/glx/dri_common_interop.c:33: include/GL/mesa_glinterop.h:62: error: redefinition of typedef ‘GLXContext’ include/GL/glx.h:165: note: previous declaration of ‘GLXContext’ was here Fixes: 8472045b16b3 ("mesa_glinterop: remove inclusion of GLX header") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96770 Signed-off-by: Vinson Lee <vlee@freedesktop.org>
* dri: add offset attribute and bump version of EGLImage extensions.Chuanbo Weng2016-09-211-1/+3
| | | | | | | | | Offset is useful for buffer sharing with other components, so add it to queryImage attributes. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
* Update Khronos-supplied headers to r33100Ilia Mirkin2016-08-283-8/+43
| | | | | | | | As retrieved from opengl.org and khronos.org. Maintained the APPLE hack in GL/glext.h manually. Added gl32.h. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Dave Airlie <airlied@redhat.com>
* Remove wrongly repeated words in commentsGiuseppe Bilotta2016-06-231-3/+3
| | | | | | | | | | | | | | | | | Clean up misrepetitions ('if if', 'the the' etc) found throughout the comments. This has been done manually, after grepping case-insensitively for duplicate if, is, the, then, do, for, an, plus a few other typos corrected in fly-by v2: * proper commit message and non-joke title; * replace two 'as is' followed by 'is' to 'as-is'. v3: * 'a integer' => 'an integer' and similar (originally spotted by Jason Ekstrand, I fixed a few other similar ones while at it) Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
* GL: update glcorearb.h to svn 32433Ilia Mirkin2016-06-101-38/+70
| | | | | | | | This brings in the fixed glClearNamedFramebufferfi definition, as well as a lot of GLsizei -> GLsizeiptr changes. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
* GL: update glext to svn 32957Ilia Mirkin2016-06-101-5/+82
| | | | | | | | This brings in defines from GL_EXT_window_rectangles and fixes the glClearNamedFramebufferfi definition. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
* mesa_glinterop: remove mesa_glinterop typedefsEmil Velikov2016-05-302-24/+24
| | | | | | | | | | | | | | | | As is there are two places that do the typedefs - dri_interface.h and this header. As we cannot include the former in here, just drop the typedefs and use the struct directly (as needed). This is required because typedef redefinition is C11 feature which is not supported on all the versions of GCC used to build mesa. v2: Kill the typedef alltogether, as per Marek. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96236 Cc: Vinson Lee <vlee@freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* mesa_glinterop: make GL interop version field bidirectionalEmil Velikov2016-05-242-5/+20
| | | | | | | | | | | | | | This allows clear and easy communication between the two. Caller: Requesting information (struct vN) Callee: I know how to deal with older version (vN-1) only. Here is your data and the version I support. Caller: Older version ? Sure I'll cap all access to the fields provided by the older version (vN-1) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: drop mesa_glinterop_device_info::interop_versionEmil Velikov2016-05-241-9/+0
| | | | | | | | | | | | One cannot use a single version to control both export_in and export_out versions. Using this forces us to always extend/bump both structs at the same time. An alternative scheme is coming with next patch. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: rename MESA_GLINTEROP_INVALID_{VALUE,VERSION}Emil Velikov2016-05-241-1/+1
| | | | | | | | Be more explicit what it actually does. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: s/struct_version/version/Emil Velikov2016-05-241-3/+3
| | | | | | | | OCD polish for consistency with other mesa interfaces. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: fix GL interop *_VERSION commentsEmil Velikov2016-05-241-3/+6
| | | | | | | | | Using the macro to set the version is wrong and ill-advised. Please don't do it. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: remove inclusion of EGL headerEmil Velikov2016-05-241-1/+5
| | | | | | | | Analogous to previous commit, but for EGL. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: remove inclusion of GLX headerEmil Velikov2016-05-241-1/+4
| | | | | | | | | | | | | Since we only need partial information about the GLX symbols we can forward declare them and drop the include. Obviously each user of the said API will needs more than what's provides, so they'll include the GLX header. If they don't, the compiler will give us a nice warning ;-) Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: remove unneeded GLAPI/GLAPIENTRY/APIENTRYP symbolsEmil Velikov2016-05-241-14/+14
| | | | | | | | | | | | | | | | These come from windows.h, gl.h, glcorearb.h and/or glext.h. The interop interface is aimed at non-Windows platforms while the macros are used/derived due to Windows specifics. Thus we can safely remove them. Strictly speaking there should be GLXAPIENTRY/EGLAPIENTRY and alike macros, although a) there is no GLX ones and b) this brings us even further from decoupling the file from the GLX/EGL header dependency. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: replace GL types with their native counterpart.Emil Velikov2016-05-241-2/+3
| | | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: use generic variable types for the GL interopEmil Velikov2016-05-241-8/+8
| | | | | | | | | | | | | | | | | | | Thus we can preserve the ABI, while avoiding the inclusion of some/all of the following: EGL/egl.h GL/gl.h GL/glcorearb.h GLES/gl.h GLES2/gl2.h GLES3/gl3.h GLES3/gl31.h This will allow us to build/use it alongside any combination of APIs. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* mesa_glinterop: use consistent naming scheme for GL interopEmil Velikov2016-05-241-1/+1
| | | | | | Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* Revert "mesa: Build EGL without X11 headers after interop patchset"Emil Velikov2016-05-241-14/+1
| | | | | | | | | | This reverts commit 4e2c9a04354b6b133845b8b93c0c5d34261a91d0. The solution was incomplete and fragile. An alternative one is coming shortly. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
* dri: Add YVU formatsKristian Høgsberg Kristensen2016-05-241-0/+5
| | | | Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* DRI: Add DRIimage map and unmap functionsRob Herring2016-05-231-1/+33
| | | | | | | | | | | Add mapImage and unmapImage functions to DRIimage extension for mapping and unmapping DRIimages for CPU access. The caller provides the region of the image to map and is returned a pointer to the beginning of the region and the stride (which could be different from the original). Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: Build EGL without X11 headers after interop patchsetYoury Metlitsky2016-05-201-1/+14
| | | | Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* dri_interface: add interface for GL interop with other APIs (v2)Marek Olšák2016-04-201-0/+26
| | | | v2: - use const
* include/GL: add mesa_glinterop.h for OpenGL-OpenCL interop (v4.2)Marek Olšák2016-04-201-0/+287
| | | | | | | | | | | | | v2: - use "enum" to define stuff v3: - more comments, define MESA_GLINTEROP_UNSUPPORTED v4: - add mesa_glinterop_device_info::interop_version - more comments - remove #define MESA_GLINTEROP_VERSION - use const for "in" v4.1: - use version numbers for structures - add "out_driver_data_written" v4.2: - buf_offset & buf_size affect GL_ARRAY_BUFFER too, this is required for sharing suballocations within a larger buffer
* dri: add backbuffer use flagAxel Davy2016-03-091-0/+5
| | | | | | This will be used by the next commit. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* osmesa: add new OSMesaCreateContextAttribs functionBrian Paul2015-12-161-2/+43
| | | | | | | This allows specifying a GL profile and version so one can get a core- profile context. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* gallium/swrast: fix front buffer blitting. (v2)Dave Airlie2015-10-311-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So I've known this was broken before, cogl has a workaround for it from what I know, but with the gallium based swrast drivers BlitFramebuffer from back to front or vice-versa was pretty broken. The legacy swrast driver tracks when a front buffer is used and does the get/put images when it is mapped/unmapped, so this patch attempts to add the same functionality to the gallium drivers. It creates a new context interface to denote when a front buffer is being created, and passes a private pointer to it, this pointer is then used to decide on map/unmap if the contents should be updated from the real frontbuffer using get/put image. This is primarily to make gtk's gl code work, the only thing I've tested so far is the glarea test from https://github.com/ebassi/glarea-example.git v2: bump extension version, check extension version before calling get image. (Ian) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91930 Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* GL: update glext to svn 31811Dave Airlie2015-08-201-9/+285
| | | | | | | This brings in the new ARB extensions. Acked-by: Chris Forbes <chrisf@ijw.co.nz> Signed-off-by: Dave Airlie <airlied@redhat.com>
* egl/dri: Add error info needed for EGL_EXT_image_dma_buf_import extensionFrank Binns2015-08-041-2/+6
| | | | | | | | | | | | | Update the DRI image interface error codes to reflect the needs of the EGL_EXT_image_dma_buf_import extension. This means updating the existing error code documentation and adding a new __DRI_IMAGE_ERROR_BAD_ACCESS error code so that drivers can correctly reject unsupported pitches and offsets. Hook the new error code up in EGL to return EGL_BAD_ACCESS. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Frank Binns <frank.binns@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* includes/GL: remove duplicated extension declarations from glx.hEmil Velikov2015-08-011-92/+0
| | | | | | | | | | | | All three of GLX_NV_float_buffer, GLX_EXT_texture_from_pixmap and GLX_MESA_query_renderer have been in glxext.h for a while now. As such we can drop this workaround/hack from the header. v2: Remove the comment about GLX_NV_float_buffer. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
* i965: Support importing R8 and GR88 dma_bufsChad Versace2015-07-281-2/+7
| | | | | | | | | | | EGL_EXT_image_dma_buf_import now supports those formats. Tests: - Tested by Piglit ext_image_dma_buf_import-transcode-nv12-as-r8-gr88. - Tested by Peter in Kodi/XBMC to obtain 60fps NV12 transcode at 4K. Tested-by: Peter Frühberger <peter.fruehberger@gmail.com> Signed-off-by: Chad Versace <chad.versace@intel.com>
* egl,dri_interface: use DRI2rendererQueryExtension to enable 3D textures & sRGBMarek Olšák2015-07-221-0/+5
| | | | Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* dri_interface: drop __NOT_HAVE_DRM_H magicEmil Velikov2015-07-221-8/+1
| | | | | | | v2: use HAVE_LIBDRM macro. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* darwin: Suppress type conversion warnings for GLhandleARBJulien Isorce2015-07-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch and its description are inspired from Jose Fonseca explanations and suggestions. With this patch the following logic applies and only if __APPLE__: When building mesa, GLhandleARB is defined as unsigned long and at some point casted to GLuint in gl fuction implementations. These exact points are where these errors and warnings appear. When building an application GLhandleARB is defined as void*. Later when calling a gl function, for example glBindAttribLocationARB, it will be dispatched to _mesa_BindAttribLocation. So internally void* will be treated as unsigned long which has the same size. So the same truncation happens when casting it to GLuint. Same when GLhandleARB appears as return value. For mesa it will be GLuint -> unsigned long. For an application it will be GLuint -> unsigned long -> void*. Note that the value will be preserved when casting back to GLuint. When GLhandleARB appears as a pointer there are also separate entry-points, i.e. _mesa_FuncNameARB. So the same logic can be applied. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66346 Signed-off-by: Julien Isorce <julien.isorce@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* dri_interface: add an interface for fencesMarek Olšák2015-04-301-0/+60
|
* configure: nuke --with-max-{width,height}Emil Velikov2015-04-011-4/+2
| | | | | | | | | | Unused as of commit 630ab0d27ba(mesa: remove last of MAX_WIDTH, MAX_HEIGHT). Update all the remaining references to the defines. v2: Use the correct variable name in the comments Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie2015-04-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* windows/gdi: Remove.Jose Fonseca2015-03-041-140/+0
| | | | | | | | | | | | This classic driver is so far behind Gallium softpipe/llvmpipe based one, that's hard to imagine ever being useful. v2: Drop drivers/windows from src/mesa/Makefile.am:EXTRA_DIST per Emil Velikov. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> v3: Update release notes.
* GL: Update glext.h to Revision 29735 (20150202).Laura Ekstrand2015-02-051-7/+6
| | | | | | | | Khronos modified glext.h to get rid of GL_TEXTURE_BINDING, a special enum added for ARB_direct_state_access. This enum was ruled unimplementable. Reviewed-by: Brian Paul <brianp@vmware.com> Tested-by: Laura Ekstrand <laura@jlekstrand.net>
* GL: Update glext.h to Khronos Revision 29537.Laura Ekstrand2015-02-021-22/+26
| | | | | | | | | | Khronos Revision 29537 fixes ARB_direct_state_access function prototypes that had GLsizei where they should have had GLsizeiptr. The mainly affects functions related to buffer objects. Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* egl: Inform the client API when ancillary buffers may become undefined.Eric Anholt2015-01-061-0/+1
| | | | | | | 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>
* mesa: update glext.h to version 20141118Brian Paul2014-12-011-32/+181
|
* include: move sarea.h next to it's only userEmil Velikov2014-08-211-92/+0
| | | | | | | | | The header is used by DRI1 drivers, which we've removed a while back. Now only the dri1 loader in libGL is using it, so let's move it in src/glx, and prefix it accordingly. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* mesa: pull Khronos glcorearb.h header into include/GL/Brian Paul2014-08-121-0/+3589
| | | | | | | Apps that only want to use core functionality should #include this header. This version covers everything up to OpenGL 4.5. Reviewed-by: Matt Turner <mattst88@gmail.com>
* mesa: regenerate gl_mangle.hBrian Paul2014-08-121-0/+139
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: update wglext.h to version 20140810Brian Paul2014-08-121-2/+9
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: update glxext.h to version 20140810Brian Paul2014-08-121-2/+9
| | | | Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* mesa: update glext.h to version 20140810Brian Paul2014-08-121-2/+378
| | | | | | This brings in the new OpenGL 4.5 features. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>