summaryrefslogtreecommitdiff
path: root/include/GL
AgeCommit message (Collapse)AuthorFilesLines
2016-06-23Remove wrongly repeated words in commentsGiuseppe Bilotta1-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>
2016-06-10GL: update glcorearb.h to svn 32433Ilia Mirkin1-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>
2016-06-10GL: update glext to svn 32957Ilia Mirkin1-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>
2016-05-30mesa_glinterop: remove mesa_glinterop typedefsEmil Velikov2-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>
2016-05-24mesa_glinterop: make GL interop version field bidirectionalEmil Velikov2-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>
2016-05-24mesa_glinterop: drop mesa_glinterop_device_info::interop_versionEmil Velikov1-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>
2016-05-24mesa_glinterop: rename MESA_GLINTEROP_INVALID_{VALUE,VERSION}Emil Velikov1-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>
2016-05-24mesa_glinterop: s/struct_version/version/Emil Velikov1-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>
2016-05-24mesa_glinterop: fix GL interop *_VERSION commentsEmil Velikov1-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>
2016-05-24mesa_glinterop: remove inclusion of EGL headerEmil Velikov1-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>
2016-05-24mesa_glinterop: remove inclusion of GLX headerEmil Velikov1-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>
2016-05-24mesa_glinterop: remove unneeded GLAPI/GLAPIENTRY/APIENTRYP symbolsEmil Velikov1-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>
2016-05-24mesa_glinterop: replace GL types with their native counterpart.Emil Velikov1-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>
2016-05-24mesa_glinterop: use generic variable types for the GL interopEmil Velikov1-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>
2016-05-24mesa_glinterop: use consistent naming scheme for GL interopEmil Velikov1-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>
2016-05-24Revert "mesa: Build EGL without X11 headers after interop patchset"Emil Velikov1-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>
2016-05-24dri: Add YVU formatsKristian Høgsberg Kristensen1-0/+5
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-23DRI: Add DRIimage map and unmap functionsRob Herring1-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>
2016-05-20mesa: Build EGL without X11 headers after interop patchsetYoury Metlitsky1-1/+14
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2016-04-20dri_interface: add interface for GL interop with other APIs (v2)Marek Olšák1-0/+26
v2: - use const
2016-04-20include/GL: add mesa_glinterop.h for OpenGL-OpenCL interop (v4.2)Marek Olšák1-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
2016-03-09dri: add backbuffer use flagAxel Davy1-0/+5
This will be used by the next commit. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-12-16osmesa: add new OSMesaCreateContextAttribs functionBrian Paul1-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>
2015-10-31gallium/swrast: fix front buffer blitting. (v2)Dave Airlie1-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>
2015-08-20GL: update glext to svn 31811Dave Airlie1-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>
2015-08-04egl/dri: Add error info needed for EGL_EXT_image_dma_buf_import extensionFrank Binns1-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>
2015-08-01includes/GL: remove duplicated extension declarations from glx.hEmil Velikov1-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)
2015-07-28i965: Support importing R8 and GR88 dma_bufsChad Versace1-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>
2015-07-22egl,dri_interface: use DRI2rendererQueryExtension to enable 3D textures & sRGBMarek Olšák1-0/+5
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-07-22dri_interface: drop __NOT_HAVE_DRM_H magicEmil Velikov1-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>
2015-07-08darwin: Suppress type conversion warnings for GLhandleARBJulien Isorce1-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>
2015-04-30dri_interface: add an interface for fencesMarek Olšák1-0/+60
2015-04-01configure: nuke --with-max-{width,height}Emil Velikov1-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>
2015-04-01egl: add initial EGL_MESA_image_dma_buf_export v2.4Dave Airlie1-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>
2015-03-04windows/gdi: Remove.Jose Fonseca1-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.
2015-02-05GL: Update glext.h to Revision 29735 (20150202).Laura Ekstrand1-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>
2015-02-02GL: Update glext.h to Khronos Revision 29537.Laura Ekstrand1-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>
2015-01-06egl: Inform the client API when ancillary buffers may become undefined.Eric Anholt1-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>
2014-12-01mesa: update glext.h to version 20141118Brian Paul1-32/+181
2014-08-21include: move sarea.h next to it's only userEmil Velikov1-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>
2014-08-12mesa: pull Khronos glcorearb.h header into include/GL/Brian Paul1-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>
2014-08-12mesa: regenerate gl_mangle.hBrian Paul1-0/+139
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-08-12mesa: update wglext.h to version 20140810Brian Paul1-2/+9
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-08-12mesa: update glxext.h to version 20140810Brian Paul1-2/+9
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-08-12mesa: update glext.h to version 20140810Brian Paul1-2/+378
This brings in the new OpenGL 4.5 features. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-08-05mesa: update wglext.h to version 20140630Brian Paul1-675/+607
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-08-05mesa: update glxext.h to version 20140725Brian Paul1-5/+32
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-08-05mesa: update glext.h to version 20140725Brian Paul1-115/+209
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-07-30dri: Add a new capabilities for drivers that can't share buffersGiovanni Campagna1-1/+16
The kms-dri swrast driver cannot share buffers using the GEM, so it must tell the loader to disable extensions relying on that, without disabling the image DRI extension altogether (which would prevent the loader from working at all). This requires a new gallium capability (which is queried on the pipe_screen and for swrast drivers it's forwarded to the winsys), and requires a new version of the DRI image extension. [Emil Velikov] - Rebased on top of gallium-dri megadrivers. - Drop PIPE_CAP_BUFFER_SHARE and sw_winsys::get_param hook. The can_share_buffer cap is set at InitScreen. We use a different InitScreen (and thus value for the cap) function for kms_dri, due to deeper differences originating from dri megadrivers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-07-02xmlconfig/dri: bool -> unsigned charDave Airlie1-2/+1
Drop stdbool, due to the X server being a pain and having struct members called bool, although I've sent a patch to fix that we should retain stupidity here. Use unsigned char which is what GLboolean is anyways. Signed-off-by: Dave Airlie <airlied@redhat.com>