mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 15:30:14 +01:00
dri: Redeclare __DRI_IMAGE_FORMAT_* as PIPE_FORMAT_*
These aren't used by any external DRI callers, so unexport them and redeclare them in terms of PIPE_FORMAT_*, so we can flatten them down later. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27709>
This commit is contained in:
parent
e9891f9cf1
commit
7e10601786
9 changed files with 54 additions and 46 deletions
|
|
@ -1240,51 +1240,7 @@ struct __DRIdri2ExtensionRec {
|
||||||
#define __DRI_IMAGE "DRI_IMAGE"
|
#define __DRI_IMAGE "DRI_IMAGE"
|
||||||
#define __DRI_IMAGE_VERSION 20
|
#define __DRI_IMAGE_VERSION 20
|
||||||
|
|
||||||
/**
|
/* __DRI_IMAGE_FORMAT_* tokens are no longer exported */
|
||||||
* These formats correspond to the similarly named MESA_FORMAT_*
|
|
||||||
* tokens, except in the native endian of the CPU. For example, on
|
|
||||||
* little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to
|
|
||||||
* MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian.
|
|
||||||
*
|
|
||||||
* __DRI_IMAGE_FORMAT_NONE is for images that aren't directly usable
|
|
||||||
* by the driver (YUV planar formats) but serve as a base image for
|
|
||||||
* creating sub-images for the different planes within the image.
|
|
||||||
*
|
|
||||||
* R8, GR88 and NONE should not be used with createImageFromName or
|
|
||||||
* createImage, and are returned by query from sub images created with
|
|
||||||
* createImageFromNames (NONE, see above) and fromPlane (R8 & GR88).
|
|
||||||
*/
|
|
||||||
#define __DRI_IMAGE_FORMAT_RGB565 0x1001
|
|
||||||
#define __DRI_IMAGE_FORMAT_XRGB8888 0x1002
|
|
||||||
#define __DRI_IMAGE_FORMAT_ARGB8888 0x1003
|
|
||||||
#define __DRI_IMAGE_FORMAT_ABGR8888 0x1004
|
|
||||||
#define __DRI_IMAGE_FORMAT_XBGR8888 0x1005
|
|
||||||
#define __DRI_IMAGE_FORMAT_R8 0x1006 /* Since version 5 */
|
|
||||||
#define __DRI_IMAGE_FORMAT_GR88 0x1007
|
|
||||||
#define __DRI_IMAGE_FORMAT_NONE 0x1008
|
|
||||||
#define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009
|
|
||||||
#define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
|
|
||||||
#define __DRI_IMAGE_FORMAT_SARGB8 0x100b
|
|
||||||
#define __DRI_IMAGE_FORMAT_ARGB1555 0x100c
|
|
||||||
#define __DRI_IMAGE_FORMAT_R16 0x100d
|
|
||||||
#define __DRI_IMAGE_FORMAT_GR1616 0x100e
|
|
||||||
#define __DRI_IMAGE_FORMAT_YUYV 0x100f
|
|
||||||
#define __DRI_IMAGE_FORMAT_XBGR2101010 0x1010
|
|
||||||
#define __DRI_IMAGE_FORMAT_ABGR2101010 0x1011
|
|
||||||
#define __DRI_IMAGE_FORMAT_SABGR8 0x1012
|
|
||||||
#define __DRI_IMAGE_FORMAT_UYVY 0x1013
|
|
||||||
#define __DRI_IMAGE_FORMAT_XBGR16161616F 0x1014
|
|
||||||
#define __DRI_IMAGE_FORMAT_ABGR16161616F 0x1015
|
|
||||||
#define __DRI_IMAGE_FORMAT_SXRGB8 0x1016
|
|
||||||
#define __DRI_IMAGE_FORMAT_ABGR16161616 0x1017
|
|
||||||
#define __DRI_IMAGE_FORMAT_XBGR16161616 0x1018
|
|
||||||
#define __DRI_IMAGE_FORMAT_ARGB4444 0x1019
|
|
||||||
#define __DRI_IMAGE_FORMAT_XRGB4444 0x101a
|
|
||||||
#define __DRI_IMAGE_FORMAT_ABGR4444 0x101b
|
|
||||||
#define __DRI_IMAGE_FORMAT_XBGR4444 0x101c
|
|
||||||
#define __DRI_IMAGE_FORMAT_XRGB1555 0x101d
|
|
||||||
#define __DRI_IMAGE_FORMAT_ABGR1555 0x101e
|
|
||||||
#define __DRI_IMAGE_FORMAT_XBGR1555 0x101f
|
|
||||||
|
|
||||||
#define __DRI_IMAGE_USE_SHARE 0x0001
|
#define __DRI_IMAGE_USE_SHARE 0x0001
|
||||||
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
#define __DRI_IMAGE_USE_SCANOUT 0x0002
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@
|
||||||
#include "egl_dri2.h"
|
#include "egl_dri2.h"
|
||||||
#include "eglglobals.h"
|
#include "eglglobals.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
|
#include "loader_dri_helper.h"
|
||||||
#include "platform_android.h"
|
#include "platform_android.h"
|
||||||
|
|
||||||
static __DRIimage *
|
static __DRIimage *
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
#include "eglglobals.h"
|
#include "eglglobals.h"
|
||||||
#include "kopper_interface.h"
|
#include "kopper_interface.h"
|
||||||
#include "loader.h"
|
#include "loader.h"
|
||||||
|
#include "loader_dri_helper.h"
|
||||||
|
|
||||||
static __DRIimage *
|
static __DRIimage *
|
||||||
surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
|
surfaceless_alloc_image(struct dri2_egl_display *dri2_dpy,
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
#include "dri_helpers.h"
|
#include "dri_helpers.h"
|
||||||
#include "dri_drawable.h"
|
#include "dri_drawable.h"
|
||||||
#include "dri_query_renderer.h"
|
#include "dri_query_renderer.h"
|
||||||
|
#include "loader_dri_helper.h"
|
||||||
|
|
||||||
#include "drm-uapi/drm_fourcc.h"
|
#include "drm-uapi/drm_fourcc.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
#include "main/texobj.h"
|
#include "main/texobj.h"
|
||||||
|
|
||||||
#include "dri_helpers.h"
|
#include "dri_helpers.h"
|
||||||
|
#include "loader_dri_helper.h"
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
dri2_is_opencl_interop_loaded_locked(struct dri_screen *screen)
|
dri2_is_opencl_interop_loaded_locked(struct dri_screen *screen)
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
#include "main/errors.h"
|
#include "main/errors.h"
|
||||||
#include "loader/loader.h"
|
#include "loader/loader.h"
|
||||||
#include "GL/internal/mesa_interface.h"
|
#include "GL/internal/mesa_interface.h"
|
||||||
|
#include "loader_dri_helper.h"
|
||||||
|
|
||||||
driOptionDescription __dri2ConfigOptions[] = {
|
driOptionDescription __dri2ConfigOptions[] = {
|
||||||
DRI_CONF_SECTION_DEBUG
|
DRI_CONF_SECTION_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
#include "dri_drawable.h"
|
#include "dri_drawable.h"
|
||||||
#include "dri_helpers.h"
|
#include "dri_helpers.h"
|
||||||
#include "dri_query_renderer.h"
|
#include "dri_query_renderer.h"
|
||||||
|
#include "loader_dri_helper.h"
|
||||||
|
|
||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ libdri = static_library(
|
||||||
[ files_libdri, sha1_h ],
|
[ files_libdri, sha1_h ],
|
||||||
include_directories : [
|
include_directories : [
|
||||||
inc_include, inc_util, inc_mesa, inc_mapi, inc_src, inc_gallium,
|
inc_include, inc_util, inc_mesa, inc_mapi, inc_src, inc_gallium,
|
||||||
inc_gallium_aux, inc_util, inc_gallium_drivers,
|
inc_gallium_aux, inc_util, inc_gallium_drivers, inc_loader,
|
||||||
],
|
],
|
||||||
c_args : [libdri_c_args],
|
c_args : [libdri_c_args],
|
||||||
gnu_symbol_visibility : 'hidden',
|
gnu_symbol_visibility : 'hidden',
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <GL/gl.h> /* dri_interface needs GL types */
|
#include <GL/gl.h> /* dri_interface needs GL types */
|
||||||
#include <GL/internal/dri_interface.h>
|
#include <GL/internal/dri_interface.h>
|
||||||
#include <c11/threads.h>
|
#include <c11/threads.h>
|
||||||
|
#include "util/format/u_formats.h"
|
||||||
|
|
||||||
#ifdef HAVE_X11_PLATFORM
|
#ifdef HAVE_X11_PLATFORM
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
|
|
@ -58,6 +59,51 @@ struct loader_screen_resources {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* These formats correspond to the similarly named MESA_FORMAT_*
|
||||||
|
* tokens, except in the native endian of the CPU. For example, on
|
||||||
|
* little endian __DRI_IMAGE_FORMAT_XRGB8888 corresponds to
|
||||||
|
* MESA_FORMAT_XRGB8888, but MESA_FORMAT_XRGB8888_REV on big endian.
|
||||||
|
*
|
||||||
|
* __DRI_IMAGE_FORMAT_NONE is for images that aren't directly usable
|
||||||
|
* by the driver (YUV planar formats) but serve as a base image for
|
||||||
|
* creating sub-images for the different planes within the image.
|
||||||
|
*
|
||||||
|
* R8, GR88 and NONE should not be used with createImageFromName or
|
||||||
|
* createImage, and are returned by query from sub images created with
|
||||||
|
* createImageFromNames (NONE, see above) and fromPlane (R8 & GR88).
|
||||||
|
*/
|
||||||
|
#define __DRI_IMAGE_FORMAT_RGB565 PIPE_FORMAT_B5G6R5_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XRGB8888 PIPE_FORMAT_BGRX8888_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ARGB8888 PIPE_FORMAT_BGRA8888_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ABGR8888 PIPE_FORMAT_RGBA8888_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XBGR8888 PIPE_FORMAT_RGBX8888_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_R8 PIPE_FORMAT_R8_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_GR88 PIPE_FORMAT_RG88_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_NONE PIPE_FORMAT_NONE
|
||||||
|
#define __DRI_IMAGE_FORMAT_XRGB2101010 PIPE_FORMAT_B10G10R10X2_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ARGB2101010 PIPE_FORMAT_B10G10R10A2_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_SARGB8 PIPE_FORMAT_BGRA8888_SRGB
|
||||||
|
#define __DRI_IMAGE_FORMAT_ARGB1555 PIPE_FORMAT_B5G5R5A1_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_R16 PIPE_FORMAT_R16_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_GR1616 PIPE_FORMAT_RG1616_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XBGR2101010 PIPE_FORMAT_R10G10B10X2_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ABGR2101010 PIPE_FORMAT_R10G10B10A2_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_SABGR8 PIPE_FORMAT_RGBA8888_SRGB
|
||||||
|
#define __DRI_IMAGE_FORMAT_XBGR16161616F PIPE_FORMAT_R16G16B16X16_FLOAT
|
||||||
|
#define __DRI_IMAGE_FORMAT_ABGR16161616F PIPE_FORMAT_R16G16B16A16_FLOAT
|
||||||
|
#define __DRI_IMAGE_FORMAT_SXRGB8 PIPE_FORMAT_BGRX8888_SRGB
|
||||||
|
#define __DRI_IMAGE_FORMAT_ABGR16161616 PIPE_FORMAT_R16G16B16X16_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XBGR16161616 PIPE_FORMAT_R16G16B16A16_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ARGB4444 PIPE_FORMAT_B4G4R4A4_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XRGB4444 PIPE_FORMAT_B4G4R4X4_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ABGR4444 PIPE_FORMAT_R4G4B4A4_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XBGR4444 PIPE_FORMAT_R4G4B4X4_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XRGB1555 PIPE_FORMAT_B5G5R5X1_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_ABGR1555 PIPE_FORMAT_R5G5B5A1_UNORM
|
||||||
|
#define __DRI_IMAGE_FORMAT_XBGR1555 PIPE_FORMAT_R5G5B5X1_UNORM
|
||||||
|
|
||||||
__DRIimage *loader_dri_create_image(__DRIscreen *screen,
|
__DRIimage *loader_dri_create_image(__DRIscreen *screen,
|
||||||
const __DRIimageExtension *image,
|
const __DRIimageExtension *image,
|
||||||
uint32_t width, uint32_t height,
|
uint32_t width, uint32_t height,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue