summaryrefslogtreecommitdiff
path: root/include/GL
AgeCommit message (Collapse)AuthorFilesLines
2016-05-08glext.h: Add missing include of stddef.h for ptrdiff_tHEADmaster-darwin-build-fixesmasterJeremy Huddleston Sequoia1-0/+1
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.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>
2014-07-01dri: remove GL types from config queriesDave Airlie1-3/+4
This in theory changes ABI for the boolean->bool I think, but nothing in the tree uses configQueryb AFAICS. Reviewed-by: Axel Davy <axel.davy@ens.fr> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-06-27dri/image: add blitImage to the specificationAxel Davy1-1/+23
It allows to blit two __DRIimages. Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-06-27glxext: Send the Drawable's ID in the GLX_BufferSwapComplete eventJasper St. Pierre1-1/+1
While the official INTEL_swap_event specification says that the drawable field should contain the GLXDrawable, not the Drawable, the existing DRI2 code in dri2.c that translates from DRI2_BufferSwapComplete sends out GLX_BufferSwapComplete with the Drawable's ID, so existing codebases like Clutter/Cogl rely on getting the Drawable. Match DRI2's error here and stuff the event with the X Drawable, not the GLX drawable. This fixes apps seeing wrong drawables through an indirect GLX context or with DRI3, which uses the GLX_BufferSwapComplete event directly on the wire instead of translates Present in mesa. At the same time, also modify the structure for the event to make sure that clients don't make the same mistake. This is not an API or ABI break, as GLXDrawable and Drawable are both typedefs for XID. Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Reviewed-by: Axel Davy <axel.davy@ens.fr> Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-05-02Regenerate gl_mangle.h.Petri Latvala1-6/+365
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-28mesa: remove unused #pragma export on/off linesBrian Paul1-17/+0
PRAGMA_EXPORT_SUPPORTED is never defined. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77749 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-04-28dri_interface: Update __DRItexBufferExtensionRec to version 3Emil Velikov1-1/+1
With commit e59fa4c46c8("dri2: release texture image.") we updated the extension without bumping the version number. The patch itself added an interface required to enable texture_from_pixmap on certain platforms. The new code was effectively never build, as it depended on __DRI_TEX_BUFFER_VERSION >= 3, which never came to be in upstream mesa. This commit bumps the version number, drops the __DRI_TEX_BUFFER_VERSION checks and resolves all the build conflicts. Additionally it add a version check as egl and dri3, as require version 2 of the extension which does not have the releaseTexBuffer hook. Cc: Juan Zhao <juan.j.zhao@intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-04-18mesa: update glext.h to version 20140313Petri Latvala1-6/+76
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-07glx: Update glxext.h to revision 25407Adel Gadllah1-3/+29
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-03-03NV_vdpau_interop: fix IsSurfaceNV return typeGrigori Goronzy1-1/+1
The spec incorrectly used void as return type, when it should have been GLboolean. This has now been fixed. According to Nvidia, their implementation always used GLboolean. Reviewed-by: Christian König <christian.koenig@amd.com>
2014-02-23dri_interface: note introduction of __DRIdri2LoaderExtension membersEmil Velikov1-0/+4
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-23dri_interface: note introduction of various __DRItexBufferExtension membersEmil Velikov1-0/+4
Note the member function releaseTexBuffer was added without bumping spec version, and currently no drivers implement it. v2: releaseTexBuffer was introduced by version 3 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-23dri_interface: Note the version introducing ↵Emil Velikov1-0/+2
__DRIswrastLoaderExtensionRec::putImage2 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-02-03mesa: change GL_ALL_ATTRIB_BITS to 0xFFFFFFFFBrian Paul1-1/+1
This has been wrong for many years. It was originally 0x000FFFFF and long ago there was discussion about whether GL_ALL_ATTRIB_BITS should include the then-new GL_MULTISAMPLE_BIT bit. Eventually the ARB decided that glPushAttrib(GL_ALL_ATTRIB_BITS) should save all current and future attribute groups (hence ~0). Unfortunately, Mesa's gl.h was never updated. This was just recently spotted by Eric Anholt and reported as a bug to the ARB. Ian, Jon Leech and I discussed it at the ARB meeting and decided to change Mesa's value to reflect the ARB's decision. Acked-by: Eric Anholt <eric@anholt.net>
2014-01-30dri3, i915, i965: Add __DRI_IMAGE_FOURCC_SARGB8888Keith Packard1-0/+1
The __DRIimage createImageFromFds function takes a fourcc code, but there was no fourcc code that match __DRI_IMAGE_FORMAT_SARGB8. This adds a define for that format, adds a translation in DRI3 from __DRI_IMAGE_FORMAT_SARGB8 to __DRI_IMAGE_FOURCC_SARGB8888 and then adds translations *back* to __IMAGE_FORMAT_SARGB8 in both the i915 and i965 drivers. I'll refrain from comments on whether I think having two separate sets of format defines in dri_interface.h is a good idea or not... Fixes piglit glx-tfp and glx-visuals-depth Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-27glx: Update glxext.h to revision 24777.Matt Turner1-2/+11
It readds the GLXContextID typedef, but under #ifndef GLX_VERSION_1_3 and glx.h already defines GLX_VERSION_1_3. Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=11454 Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-01-17s/Tungsten Graphics/VMware/José Fonseca1-1/+1
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-06mesa: Remove GLXContextID typedef from glxext.h.Vinson Lee1-1/+0
This patch fixes this build error with gcc <= 4.5 and clang <= 3.1. CC clientattrib.lo In file included from ../../include/GL/glx.h:333:0, from glxclient.h:45, from clientattrib.c:32: ../../include/GL/glxext.h:275:13: error: redefinition of typedef 'GLXContextID' ../../include/GL/glx.h:171:13: note: previous declaration of 'GLXContextID' was here Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70591 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-12-29Revert "mesa: Remove GLXContextID typedef from glx.h."Kenneth Graunke1-0/+1
This reverts commit 136a12ac98868d82c2ae9fcc80d11044a7ec56d1. According to belak51 on IRC, this commit broke Allegro, which would no longer compile. Applications apparently expect the GLXContextID typedef to exist in glx.h; removing it breaks them. A bit of searching around the internet revealed other complaints since upgrading to Mesa 10. Cc: "10.0" <mesa-stable@lists.freedesktop.org>