aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick2009-04-20 23:16:24 -0500
committerIan Romanick2009-04-24 14:52:01 -0500
commit66c56ab10d917e3f47f93178d7eac6430970d3c4 (patch)
treedd6135e27ffd2b4f592cb3911c8f4b69cfa2b6af
parenta223ab5e6a215d86e4bf072369b331506f689f83 (diff)
downloaddri2proto-66c56ab10d917e3f47f93178d7eac6430970d3c4.tar.gz
dri2proto-66c56ab10d917e3f47f93178d7eac6430970d3c4.tar.xz
dri2proto-66c56ab10d917e3f47f93178d7eac6430970d3c4.zip
Add protocol for DRI2GetBuffersWithFormat
This function replaces DRI2GetBuffers. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@redhat.com>
-rw-r--r--configure.ac2
-rw-r--r--dri2proto.h5
-rw-r--r--dri2proto.txt67
-rw-r--r--dri2tokens.h1
4 files changed, 70 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 234426c..2d8fdc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
1AC_PREREQ([2.57]) 1AC_PREREQ([2.57])
2AC_INIT([DRI2Proto], [2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) 2AC_INIT([DRI2Proto], [2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
3AM_INIT_AUTOMAKE([foreign dist-bzip2]) 3AM_INIT_AUTOMAKE([foreign dist-bzip2])
4 4
5# Require xorg-macros: XORG_CHANGELOG 5# Require xorg-macros: XORG_CHANGELOG
diff --git a/dri2proto.h b/dri2proto.h
index dc3f2d1..8d76079 100644
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -35,11 +35,11 @@
35 35
36#define DRI2_NAME "DRI2" 36#define DRI2_NAME "DRI2"
37#define DRI2_MAJOR 1 37#define DRI2_MAJOR 1
38#define DRI2_MINOR 0 38#define DRI2_MINOR 1
39 39
40#define DRI2NumberErrors 0 40#define DRI2NumberErrors 0
41#define DRI2NumberEvents 0 41#define DRI2NumberEvents 0
42#define DRI2NumberRequests 7 42#define DRI2NumberRequests 8
43 43
44#define X_DRI2QueryVersion 0 44#define X_DRI2QueryVersion 0
45#define X_DRI2Connect 1 45#define X_DRI2Connect 1
@@ -48,6 +48,7 @@
48#define X_DRI2DestroyDrawable 4 48#define X_DRI2DestroyDrawable 4
49#define X_DRI2GetBuffers 5 49#define X_DRI2GetBuffers 5
50#define X_DRI2CopyRegion 6 50#define X_DRI2CopyRegion 6
51#define X_DRI2GetBuffersWithFormat 7
51 52
52typedef struct { 53typedef struct {
53 CARD32 attachment B32; 54 CARD32 attachment B32;
diff --git a/dri2proto.txt b/dri2proto.txt
index 106f8d8..e931bfb 100644
--- a/dri2proto.txt
+++ b/dri2proto.txt
@@ -142,7 +142,8 @@ DRI2ATTACHMENT { DRI2BufferFrontLeft
142 DRI2BufferStencil 142 DRI2BufferStencil
143 DRI2BufferAccum 143 DRI2BufferAccum
144 DRI2BufferFakeFrontLeft 144 DRI2BufferFakeFrontLeft
145 DRI2BufferFakeFrontRight } 145 DRI2BufferFakeFrontRight
146 DRI2BufferDepthStencil }
146 147
147 These values describe various attachment points for DRI2 148 These values describe various attachment points for DRI2
148 buffers. 149 buffers.
@@ -159,6 +160,13 @@ DRI2BUFFER { attachment: CARD32
159 underlying kernel buffer, 160 underlying kernel buffer,
160 161
161 162
163DRI2ATTACH_FORMAT { attachment: CARD32
164 format: CARD32 }
165
166 The DRI2ATTACH_FORMAT describes an attachment and the associated
167 format. 'attachment' describes the attachment point for the buffer,
168 'format' describes an opaque, device-dependent format for the buffer.
169
162 ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ 170 ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
163 171
164 172
@@ -281,6 +289,31 @@ The name of this extension is "DRI2".
281 rendering the next frame. 289 rendering the next frame.
282 290
283 291
292┌───
293 DRI2GetBuffersWithFormat
294 drawable: DRAWABLE
295 attachments: LISTofDRI2ATTACH_FORMAT
296
297 width, height: CARD32
298 buffers: LISTofDRI2BUFFER
299└───
300 Errors: Window
301
302 Get buffers for the provided attachment points with the specified
303 formats for the given drawable.
304
305 If the DDX driver does not support one or more of the
306 specified attachment points or formats, a Value error is generated,
307 with the first unsupported attachment point as the error value.
308
309 'width' and 'height' describes the dimensions of the drawable.
310
311 'buffers' is a list of DRI2BUFFER for the given DRI2
312 attachment points.
313
314 This request is only available with protocol version 1.1 or
315 later.
316
284 ⚙ ⚙ ⚙ ⚙ ⚙ ⚙ 317 ⚙ ⚙ ⚙ ⚙ ⚙ ⚙
285 318
286 319
@@ -366,8 +399,11 @@ A.1 Common Types
366 0x6 DRI2BufferAccum 399 0x6 DRI2BufferAccum
367 0x7 DRI2BufferFakeFrontLeft 400 0x7 DRI2BufferFakeFrontLeft
368 0x8 DRI2BufferFakeFrontRight 401 0x8 DRI2BufferFakeFrontRight
402 0x9 DRI2BufferDepthStencil
369└─── 403└───
370 Used to encode the possible attachment points. 404 Used to encode the possible attachment points. The attachment
405 DRI2BufferDepthStencil is only available with protocol version 1.1 or
406 later.
371 407
372┌─── 408┌───
373 DRI2BUFFER 409 DRI2BUFFER
@@ -381,6 +417,14 @@ A.1 Common Types
381 manager name, the pitch and chars per pixel for a buffer 417 manager name, the pitch and chars per pixel for a buffer
382 attached to a given drawable. 418 attached to a given drawable.
383 419
420┌───
421 DRI2ATTACH_FORMAT
422 4 CARD32 attachment
423 4 CARD32 format
424└───
425 Used to describe the attachment and format requested from the server.
426 This data type is only available with protocol version 1.1 or
427 later.
384 428
385A.2 Protocol Requests 429A.2 Protocol Requests
386 430
@@ -474,6 +518,25 @@ A.2 Protocol Requests
474 24 unused 518 24 unused
475└─── 519└───
476 520
521┌───
522 DRI2GetBuffersWithFormat
523 1 CARD8 major opcode
524 1 3 DRI2 opcode
525 2 3 length
526 4 DRAWABLE drawable
527 4 n number of attachments
528 8n LISTofDRI2ATTACH_FORMAT attachments and formats
529
530 1 1 Reply
531 1 unused
532 2 CARD16 sequence number
533 4 0 reply length
534 4 CARD32 width of drawable
535 4 CARD32 height of drawable
536 4 CARD32 buffer count
537 12 unused
538 5n LISTofDRI2BUFFER buffers
539└───
477 540
478A.3 Protocol Events 541A.3 Protocol Events
479 542
diff --git a/dri2tokens.h b/dri2tokens.h
index 087159f..d56e4fb 100644
--- a/dri2tokens.h
+++ b/dri2tokens.h
@@ -42,6 +42,7 @@
42#define DRI2BufferAccum 6 42#define DRI2BufferAccum 6
43#define DRI2BufferFakeFrontLeft 7 43#define DRI2BufferFakeFrontLeft 7
44#define DRI2BufferFakeFrontRight 8 44#define DRI2BufferFakeFrontRight 8
45#define DRI2BufferDepthStencil 9
45 46
46#define DRI2DriverDRI 0 47#define DRI2DriverDRI 0
47 48