aboutsummaryrefslogtreecommitdiffstats
path: root/include/GL/internal
Commit message (Collapse)AuthorAgeFilesLines
* swrast* (gallium, classic): add MESA_copy_sub_buffer support (v3)Dave Airlie2013-12-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | This patches add MESA_copy_sub_buffer support to the dri sw loader and then to gallium state tracker, llvmpipe, softpipe and other bits. It reuses the dri1 driver extension interface, and it updates the swrast loader interface for a new putimage which can take a stride. I've tested this with gnome-shell with a cogl hacked to reenable sub copies for llvmpipe and the one piglit test. I could probably split this patch up as well. v2: pass a pipe_box, to reduce the entrypoints, as per Jose's review, add to p_screen doc comments. v3: finish off winsys interfaces, add swrast classic support as well. Reviewed-by: Jose Fonseca <[email protected]> Signed-off-by: Dave Airlie <[email protected]> swrast: add support for copy_sub_buffer
* dri: Remove redundant createNewContext function from __DRIimageDriverExtensionKristian Høgsberg2013-11-121-8/+4
| | | | | | | | | | createContextAttribs is a superset of what createNewContext provides. Also remove the function typedef, since createNewContext is deprecated and no longer used in multiple interfaces. Signed-off-by: Kristian Høgsberg <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.0" <[email protected]>
* dri: add __DRIimageLoaderExtension and __DRIimageDriverExtensionKeith Packard2013-11-071-0/+76
| | | | | | | | | | | | | | | | | | | | | These provide an interface between the driver and the loader to allocate color buffers through the DRIimage extension interface rather than through a loader-specific extension (as is used by DRI2, for instance). The driver uses the loader 'getBuffers' interface to allocate color buffers. The loader uses the createNewScreen2, createNewDrawable, createNewContext, getAPIMask and createContextAttribs APIS (mostly shared with DRI2). This interface will work with the DRI3 loader, and should also work with GBM and other loaders so that drivers need not be customized for each new loader interface, as long as they provide this image interface. v2: Fix build of i915 and i965 together (by anholt) Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* Define __DRI_IMAGE_FORMAT_SARGB8Keith Packard2013-11-071-0/+1
| | | | | | | This format will be used by the i965 driver Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* drivers/dri/common: A few dri2 functions are not actually DRI2 specificKeith Packard2013-11-071-22/+39
| | | | | | | | | This just renames them so that they can be used with the DRI3 extension without causing too much confusion. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
* dri: Add interface definition for DRI_RENDERER_QUERY extensionIan Romanick2013-11-071-0/+29
| | | | | | | | This will be used to let apps query hardware and driver limits before creating a GL context. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* dri: Implement a DRI vtable extension to replace the global driDriverAPI.Eric Anholt2013-10-241-0/+17
| | | | | | | | | | | | | | | | | As we move to megadrivers, we are unable to build multiple drivers with the same public global symbol per driver (Think an X Server with an intel and a nouveau driver, and the X Server implementing indirect for both -- we have to actually talk to the right driver). By slipping the driDriverAPI vtable into the driver's extension list, we can replace the usage of the global symbol with usage of the loader-dlsym()ed driver information. v2: Pull in the hunk to avoid crashing on null driver_extensions. Thanks, Emil! Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Pass in the dlsym()ed driver extension to screen creation.Eric Anholt2013-10-241-2/+25
| | | | | | | | | | | This will allow a megadrivers build to reference the actual driver being loaded from the shared dri_util screen creation code. v2: Fix indentation, fallback case in EGL (review by Emil). Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Chad Versace <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* glx: Add an optional function call for getting the DRI driver interface.Eric Anholt2013-10-241-0/+13
| | | | | | | | | | | | | | The previous interface relied on a static struct, which meant that the driver didn't get a chance to edit the struct before the struct got used. For megadrivers, I want struct specific to the driver being loaded. v2: Fix the prototype in the docs (caught by Marek). Since the driver name was in the function, we didn't need to also pass it in. v3: Fix asprintf error checking (caught by Matt's gcc). Reviewed-by: Matt Turner <[email protected]> (v1) Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Allow config options to be passed to the loader through extensions.Eric Anholt2013-10-241-6/+14
| | | | | | | | | | | | | | | Turns out already we have this nice mechanism for providing optional things from the driver to the loader, and I was going to have to rename the public global symbol to avoid conflicts when doing megadrivers. While the former __driConfigOptions is technically loader interface, this is the only loader that made use of that symbol. Continue paying attention to it if we can't find the new option, to retain compatibility with old drivers. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* dri: Add __DRIimage support for the ARGB2101010 formatKristian Høgsberg2013-10-151-0/+2
| | | | | | | We add support for the ARGB2101010 color format to the DRI image extension, which allows DRI loaders to create a __DRIimage with this color format. Signed-off-by: Kristian Høgsberg <[email protected]>
* gallium, intel: Implements new __DRI_IMAGE_USE_LINEAR and PIPE_BIND_LINEAR ↵Axel Davy2013-09-061-0/+1
| | | | | | flags to enforce no tiling. Signed-off-by: Axel Davy <[email protected]>
* dri: propagate extra dma_buf import attributes to the driversTopi Pohjolainen2013-08-021-1/+38
| | | | | | | | | | | | | | | | | | | | | v2: do not break ABI, but instead introduce new entry point for dma buffers and bump up the dri-interface version to eight v3 (Chad): allow the hook to specify an error originating from the driver. For now only unsupported format is considered. I thought about rejecting the hints also as they are addressing only YUV sampling which is not supported at the moment but then thought against it as the spec is not saying one way or the other. v4 (Eric, Chad): restrict to rgb formatted only v5: rebased on top of i915/i965 split v6 (Chad): document using full extension name Signed-off-by: Topi Pohjolainen <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* dri: Introduce new flags in __DRI_ATTRIB_RENDER_TYPETomasz Lis2013-07-181-0/+2
| | | | | | | | | | | | | | Mark __DRI_ATTRIB_FLOAT_MODE as deprecated, and introduce new flags to __DRI_ATTRIB_RENDER_TYPE for float modes. Both signed float (fbconfig_float) and unsigned (packed_float) are introduced. The old attribute should be set for both float modes. v2 (idr): Require that the render mode from the DRI attributes matches the render mode of the config exactly. This is the behavior of the old code. Signed-off-by: Tomasz Lis <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* Add dri image entry point for creating image from fdKristian Høgsberg2013-03-181-1/+14
| | | | Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
* dri2: Create image from textureAbdiel Janulgue2013-02-011-1/+31
| | | | | | | | | | | Add create image from texture extension and bump version. v8: - Add appropriate image errors codes in DRI interface so we don't have to use internal EGL functions in driver. Suggested by Chad Versace. Reviewed-by: Eric Anholt <[email protected]> (v6) Reviewed-by: Chad Versace <[email protected]> (v8) Signed-off-by: Abdiel Janulgue <[email protected]>
* dri: Define enum __DRI_API_GLES3Chad Versace2013-01-151-1/+2
| | | | | | | | | | | | | | This enum corresponds to EGL_OPENGL_ES3_BIT_KHR. Neither the GLX nor EGL layer use the enum yet. I don't like the GLES bits. I'd prefer that all GLES APIs be exposed through a single API bit, as is done in GLX_EXT_create_context_es_profile. But, we need this GLES3 enum in order to do the plumbing necessary to correctly support EGL_OPENGL_ES3_BIT_KHR as required by the EGL_KHR_create_context spec. Signed-off-by: Chad Versace <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* dri: Fix i965 buildChad Versace2012-12-011-7/+5
| | | | | | | | | | | | | | | | | The following commit broke the i965 build: commit 4a486f8bf2ca3d88228f8313282289abe78bc2f8 Author: Marek Olšák <[email protected]> Date: Fri Nov 23 18:31:42 2012 +0100 glx/dri2: add and use new driver hook flush_with_flags That commit added a forward declaration of enum __DRI2throttleReason to dri_interface.h. C++ 98 does not allow forward declarations of enums. The fix: Move the enum's definition to earlier in the file. Signed-off-by: Chad Versace <[email protected]>
* glx/dri2: add and use new driver hook flush_with_flagsMarek Olšák2012-12-021-1/+28
|
* dri: Rework planar image interfaceJakob Bornecrantz2012-08-311-4/+63
| | | | | | | | | | | | | | | | | | | | | | As discussed with Kristian on #wayland. Pushes the decision of components into the dri driver giving it greater freedom to allow t to implement YUV samplers in hardware, and which mode to use. This interface will also allow drivers like SVGA to implement YUV surfaces without the need to sub-allocate and instead send 3 seperate buffers for each channel, currently not implemented. I have tested these changes on Gallium Svga. Scott tested them on both intel and Gallium Radeon. Kristan and Pekka tested them on intel. v2: Fix typo in dri2_from_planar. v3: Merge in intel changes. Tested-by: Scott Moreau <[email protected]> Tested-by: Pekka Paalanen <[email protected]> Tested-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* dri: Make query image WIDTH and HEIGHT be version 4Jakob Bornecrantz2012-08-261-1/+1
| | | | | Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* dri: Remove image write functionJakob Bornecrantz2012-08-261-9/+1
| | | | | | | | Since its not used by anything anymore and no release has gone out where it was being used. Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* dri2: Note that __DRI_API_GLES2 is also used for OpenGL ES 3.0Ian Romanick2012-08-141-2/+2
| | | | | | | | | Unlike 1.x to 2.0, OpenGL ES 3.0 is backwards compatible with 2.0. Use the same API flag for both. Applications that specifically want 3.0 will specify this using the major / minor version attributes. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* gbm: Add new gbm_bo_import entry pointKristian Høgsberg2012-07-161-1/+3
| | | | | 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.
* __DRIimage: version 5, add new formats and createSubImageKristian Høgsberg2012-07-111-0/+27
| | | | | | | | | | | | | The additions in version 5 enables creating EGLImages for different planes of a YUV buffer. createImageFromName is still used to create the containing __DRIimage, and createSubImage can then be used no that __DRIimage to create __DRIimages that correspond to the y, u, and v planes (__DRI_IMAGE_FORMAT_R8) or the uv planes (__DRI_IMAGE_FORMAT_RG88) for formats such as NV12 where the u and v components are interleaved. Packed formats such as YUYV etc doesn't require any special treatment, we just sample those as a regular ARGB texture. Signed-off-by: Kristian Høgsberg <[email protected]>
* glx/dri2: Add support for GLX_ARB_create_context_robustnessIan Romanick2012-07-111-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the infrastructure required for this extension. There is no xserver support and no driver support yet. Drivers can enable this be advertising DRI2 version 4 and accepting the __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS flag and the __DRI_CTX_ATTRIB_RESET_STRATEGY attribute in create context. Some additional Mesa infrastructure is needed before drivers can do this. The GL_ARB_robustness spec, which all Mesa drivers already advertise, requires: "If the behavior is LOSE_CONTEXT_ON_RESET_ARB, a graphics reset will result in the loss of all context state, requiring the recreation of all associated objects." It is necessary to land this infrastructure now so that the related infrastructure can land in the xserver. The xserver has very long release schedules, and the remaining Mesa parts should land long, long before the next xserver merge window opens. v2: Expose robustness as a DRI2 extension rather than bumping __DRI_DRI2_VERSION. v3: Add a comment explaining why dri2->base.version >= 3 is also required for GLX_ARB_create_context_robustness. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gbm: Add gbm_bo_write entry pointKristian Høgsberg2012-05-031-1/+9
| | | | | | | | | | | | | | | | This new gbm entry point allows writing data into a gbm bo. The bo has to be created with the GBM_BO_USE_WRITE flag, and it's only required to work for GBM_BO_USE_CURSOR_64X64 bos. The gbm API is designed to be the glue layer between EGL and KMS, but there was never a mechanism initialize a buffer suitable for use with KMS hw cursors. The hw cursor bo is typically not compatible with anything EGL can render to, and thus there's no way to get data into such a bo. gbm_bo_write() fills that gap while staying out of the efficient cpu->gpu pixel transfer business. Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
* egl/android: Add support for RGBX_8888 used in Android native buffersSean V Kelley2012-04-301-0/+1
| | | | | | | | 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 <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* gbm: track buffer format through DRI driversJesse Barnes2012-02-221-1/+2
| | | | | | | | | | | | GBM needs the buffer format in order to communicate with DRM and clients for things like scanout. So track the DRI format requested in the various back ends and use it to return the DRI format back to GBM when requested. GBM will then map this into the GBM surface type (which is in turn based on the DRM fb format list). Signed-off-by: Jesse Barnes <[email protected]>
* gbm: Validate usage flags in gbm_bo_create_from_egl_image()Kristian Høgsberg2012-01-181-1/+8
| | | | | The entry point is supposed to validate that the EGLImage is suitable for the passed in usage flags, but that was never implemented.
* dri2: Add createContextAttribs entry point for DRISW version 3Ian Romanick2011-12-231-1/+19
| | | | Signed-off-by: Ian Romanick <[email protected]>
* dri2: Add createContextAttribs entry point for DRI2 version 3Ian Romanick2011-12-231-2/+50
| | | | Signed-off-by: Ian Romanick <[email protected]>
* dri2: Implement a throttle dri extension.Thomas Hellstrom2011-10-141-0/+22
| | | | | | | | | | | | | | | | | | | | The X server has limited throttle support on the server side, but doing this in the client has some benefits: 1) X server throttling is per client. Client side throttling can be done per drawable. 2) It's easier to control the throttling based on what client is run, for example using "driconf". 3) X server throttling requires drm swap complete events. So implement a dri2 throttling extension intended to be used by direct rendering clients. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* dri2: add __DRI_IMAGE_FORMAT_ABGR8888 to __DRI_IMAGEChia-I Wu2011-09-091-0/+1
| | | | | | | Add a new format token, __DRI_IMAGE_FORMAT_ABGR8888, to __DRI_IMAGE. It maps to MESA_FORMAT_RGBA8888_REV in core mesa or PIPE_FORMAT_R8G8B8A8_UNORM in gallium. The format is used by translucent surfaces on Android.
* dri2: Add __DRI_BUFFER_COUNT tokenBenjamin Franzke2011-08-161-0/+3
| | | | | | | Remove definition from egl_dri2. Defining this is egl_dri2.h breaks as soon as a new dri2 buffer token is added like with commit 4501a5d6e8d00fd0d87625352ed5ba1a8861f72e.
* dri: Add dupImage to DRIimageExtensionBenjamin Franzke2011-06-231-0/+5
|
* dri2: Add token for DRI2BufferHizChad Versace2011-06-081-0/+1
| | | | | | | | CC: Ian Romanick <[email protected]> CC: Kristian Høgsberg <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* egl: Add a cursor use bit to MESA_drm_imageKristian Høgsberg2011-05-061-0/+1
|
* Add dri2::{Allocate,Release}Buffer extensionBenjamin Franzke2011-02-071-0/+8
|
* swrast: add an interface createNewContextForAPIHaitao Feng2011-02-031-1/+8
| | | | | | | | This new interface could set up context for OpenGL, OpenGL ES1 and OpenGL ES2. It will be used by egl_dri2 driver. Signed-off-by: Haitao Feng <[email protected]>
* dri: add a placeholder for the framebuffer sRGB capable bit.Dave Airlie2011-01-281-0/+1
| | | | | | This is needed to build the X server GLX_EXT_framebuffer_sRGB bits. Signed-off-by: Dave Airlie <[email protected]>
* dri2: release texture image.Juan Zhao2011-01-091-0/+9
| | | | | | Add release function for texture_from_pixmap extension. Some platform need to release texture image for texture_from_pixmap extension, add this interface for those platforms.
* Get rid of GL/internal/glcore.hKristian Høgsberg2010-10-131-181/+0
| | | | | | | __GLcontextModes is always only used as an implementation internal struct at this point and we shouldn't install glcore.h anymore. Anything that needs __GLcontextModes should just include the struct in its headers files directly.
* dri: Pass the __DRIscreen and the __DRIscreen private back to image lookupKristian Høgsberg2010-09-221-1/+1
| | | | | We will typically have a current context when we need to lookup the image, but the lookup implementation don't need it so drop it.
* dri2: Make createImageFromName() take a __DRIscreen instead of __DRIcontextKristian Høgsberg2010-09-221-1/+1
| | | | | | | We can't expect to have a context when this is called, and we don't need one so just require a __DRIscreen instead. Reported by Yu Dai <[email protected]>
* egl_dri2: Add support for MESA_image_drmKristian Høgsberg2010-08-251-0/+19
|
* glx: Drop support for GLX_MESA_allocate_memoryKristian Høgsberg2010-07-191-18/+0
| | | | Only r200 implemented it.
* dri_interface.h: Add new __DRI_USE_INVALIDATE extensionKristian Høgsberg2010-05-111-0/+20
| | | | | | | The presence of this extension indicates to the DRI driver that the loader will call invalidate in the __DRI2_FLUSH extension, whenever the needs to query for new buffers. This means that the DRI driver can drop the polling in glViewport().
* Merge branch 'gles2-2'Kristian Høgsberg2010-05-021-1/+13
|\ | | | | | | | | Conflicts: src/mesa/drivers/dri/common/dri_util.h
| * dri: Add DRI entrypoints to create a context for a given APIKristian Høgsberg2010-04-281-1/+13
| |