github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xcb/include/X11/extensions/dri3proto.h (about)

     1  /*
     2   * Copyright © 2013 Keith Packard
     3   *
     4   * Permission to use, copy, modify, distribute, and sell this software and its
     5   * documentation for any purpose is hereby granted without fee, provided that
     6   * the above copyright notice appear in all copies and that both that copyright
     7   * notice and this permission notice appear in supporting documentation, and
     8   * that the name of the copyright holders not be used in advertising or
     9   * publicity pertaining to distribution of the software without specific,
    10   * written prior permission.  The copyright holders make no representations
    11   * about the suitability of this software for any purpose.  It is provided "as
    12   * is" without express or implied warranty.
    13   *
    14   * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
    15   * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
    16   * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
    17   * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
    18   * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
    19   * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
    20   * OF THIS SOFTWARE.
    21   */
    22  
    23  #ifndef _DRI3_PROTO_H_
    24  #define _DRI3_PROTO_H_
    25  
    26  #define DRI3_NAME			"DRI3"
    27  #define DRI3_MAJOR			1
    28  #define DRI3_MINOR			2
    29  
    30  #define DRI3NumberErrors		0
    31  #define DRI3NumberEvents		0
    32  
    33  #define X_DRI3QueryVersion		0
    34  #define X_DRI3Open			1
    35  #define X_DRI3PixmapFromBuffer          2
    36  #define X_DRI3BufferFromPixmap          3
    37  #define X_DRI3FenceFromFD               4
    38  #define X_DRI3FDFromFence               5
    39  
    40  /* v1.2 */
    41  #define xDRI3GetSupportedModifiers      6
    42  #define xDRI3PixmapFromBuffers          7
    43  #define xDRI3BuffersFromPixmap          8
    44  
    45  #define DRI3NumberRequests		9
    46  
    47  typedef struct {
    48      CARD8   reqType;
    49      CARD8   dri3ReqType;
    50      CARD16  length;
    51      CARD32  majorVersion;
    52      CARD32  minorVersion;
    53  } xDRI3QueryVersionReq;
    54  #define sz_xDRI3QueryVersionReq   12
    55  
    56  typedef struct {
    57      BYTE    type;   /* X_Reply */
    58      BYTE    pad1;
    59      CARD16  sequenceNumber;
    60      CARD32  length;
    61      CARD32  majorVersion;
    62      CARD32  minorVersion;
    63      CARD32  pad2;
    64      CARD32  pad3;
    65      CARD32  pad4;
    66      CARD32  pad5;
    67  } xDRI3QueryVersionReply;
    68  #define sz_xDRI3QueryVersionReply	32
    69  
    70  typedef struct {
    71      CARD8   reqType;
    72      CARD8   dri3ReqType;
    73      CARD16  length;
    74      CARD32  drawable;
    75      CARD32  provider;
    76  } xDRI3OpenReq;
    77  #define sz_xDRI3OpenReq	12
    78  
    79  typedef struct {
    80      BYTE    type;   /* X_Reply */
    81      CARD8   nfd;
    82      CARD16  sequenceNumber;
    83      CARD32  length;
    84      CARD32  pad2;
    85      CARD32  pad3;
    86      CARD32  pad4;
    87      CARD32  pad5;
    88      CARD32  pad6;
    89      CARD32  pad7;
    90  } xDRI3OpenReply;
    91  #define sz_xDRI3OpenReply	32
    92  
    93  typedef struct {
    94      CARD8   reqType;
    95      CARD8   dri3ReqType;
    96      CARD16  length;
    97      CARD32  pixmap;
    98      CARD32  drawable;
    99      CARD32  size;
   100      CARD16  width;
   101      CARD16  height;
   102      CARD16  stride;
   103      CARD8   depth;
   104      CARD8   bpp;
   105  } xDRI3PixmapFromBufferReq;
   106  
   107  #define sz_xDRI3PixmapFromBufferReq     24
   108  
   109  typedef struct {
   110      CARD8   reqType;
   111      CARD8   dri3ReqType;
   112      CARD16  length;
   113      CARD32  pixmap;
   114  } xDRI3BufferFromPixmapReq;
   115  #define sz_xDRI3BufferFromPixmapReq     8
   116  
   117  typedef struct {
   118      BYTE    type;   /* X_Reply */
   119      CARD8   nfd;    /* Number of file descriptors returned (1) */
   120      CARD16  sequenceNumber;
   121      CARD32  length;
   122      CARD32  size;
   123      CARD16  width;
   124      CARD16  height;
   125      CARD16  stride;
   126      CARD8   depth;
   127      CARD8   bpp;
   128      CARD32  pad20;
   129      CARD32  pad24;
   130      CARD32  pad28;
   131  } xDRI3BufferFromPixmapReply;
   132  #define sz_xDRI3BufferFromPixmapReply   32
   133  
   134  typedef struct {
   135      CARD8   reqType;
   136      CARD8   dri3ReqType;
   137      CARD16  length;
   138      CARD32  drawable;
   139      CARD32  fence;
   140      BOOL    initially_triggered;
   141      CARD8   pad13;
   142      CARD16  pad14;
   143  } xDRI3FenceFromFDReq;
   144  
   145  #define sz_xDRI3FenceFromFDReq  16
   146  
   147  typedef struct {
   148      CARD8   reqType;
   149      CARD8   dri3ReqType;
   150      CARD16  length;
   151      CARD32  drawable;
   152      CARD32  fence;
   153  } xDRI3FDFromFenceReq;
   154  
   155  #define sz_xDRI3FDFromFenceReq  12
   156  
   157  typedef struct {
   158      BYTE    type;   /* X_Reply */
   159      CARD8   nfd;    /* Number of file descriptors returned (1) */
   160      CARD16  sequenceNumber;
   161      CARD32  length;
   162      CARD32  pad08;
   163      CARD32  pad12;
   164      CARD32  pad16;
   165      CARD32  pad20;
   166      CARD32  pad24;
   167      CARD32  pad28;
   168  } xDRI3FDFromFenceReply;
   169  
   170  #define sz_xDRI3FDFromFenceReply   32
   171  
   172  /* v1.2 */
   173  
   174  typedef struct {
   175      CARD8   reqType;
   176      CARD8   dri3ReqType;
   177      CARD16  length;
   178      CARD32  window;
   179      CARD8   depth;
   180      CARD8   bpp;
   181      CARD16  pad10;
   182  } xDRI3GetSupportedModifiersReq;
   183  #define sz_xDRI3GetSupportedModifiersReq     12
   184  
   185  typedef struct {
   186      BYTE    type;   /* X_Reply */
   187      CARD8   pad1;
   188      CARD16  sequenceNumber;
   189      CARD32  length;
   190      CARD32  numWindowModifiers;
   191      CARD32  numScreenModifiers;
   192      CARD32  pad16;
   193      CARD32  pad20;
   194      CARD32  pad24;
   195      CARD32  pad28;
   196  } xDRI3GetSupportedModifiersReply;
   197  #define sz_xDRI3GetSupportedModifiersReply   32
   198  
   199  typedef struct {
   200      CARD8   reqType;
   201      CARD8   dri3ReqType;
   202      CARD16  length;
   203      CARD32  pixmap;
   204      CARD32  window;
   205      CARD8   num_buffers; /* Number of file descriptors passed */
   206      CARD8   pad13;
   207      CARD16  pad14;
   208      CARD16  width;
   209      CARD16  height;
   210      CARD32  stride0;
   211      CARD32  offset0;
   212      CARD32  stride1;
   213      CARD32  offset1;
   214      CARD32  stride2;
   215      CARD32  offset2;
   216      CARD32  stride3;
   217      CARD32  offset3;
   218      CARD8   depth;
   219      CARD8   bpp;
   220      CARD16  pad54;
   221      CARD64  modifier;
   222  } xDRI3PixmapFromBuffersReq;
   223  #define sz_xDRI3PixmapFromBuffersReq 64
   224  
   225  typedef struct {
   226      CARD8   reqType;
   227      CARD8   dri3ReqType;
   228      CARD16  length;
   229      CARD32  pixmap;
   230  } xDRI3BuffersFromPixmapReq;
   231  #define sz_xDRI3BuffersFromPixmapReq     8
   232  
   233  typedef struct {
   234      BYTE    type;   /* X_Reply */
   235      CARD8   nfd;    /* Number of file descriptors returned */
   236      CARD16  sequenceNumber;
   237      CARD32  length;
   238      CARD16  width;
   239      CARD16  height;
   240      CARD32  pad12;
   241      CARD64  modifier;
   242      CARD8   depth;
   243      CARD8   bpp;
   244      CARD16  pad26;
   245      CARD32  pad28;
   246  } xDRI3BuffersFromPixmapReply;
   247  #define sz_xDRI3BuffersFromPixmapReply   32
   248  
   249  #endif