Merge branch 'master' into gallium-0.2
[mesa.git] / src / mesa / drivers / x11 / xmesaP.h
1 /*
2 * Mesa 3-D graphics library
3 * Version: 7.1
4 *
5 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 * and/or sell copies of the Software, and to permit persons to whom the
12 * Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included
15 * in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25
26 #ifndef XMESAP_H
27 #define XMESAP_H
28
29
30 #include "GL/xmesa.h"
31 #include "main/mtypes.h"
32 #if defined(FX)
33 #include "GL/fxmesa.h"
34 #include "xm_glide.h"
35 #endif
36 #ifdef XFree86Server
37 #include "xm_image.h"
38 #endif
39 #include "state_tracker/st_cb_fbo.h"
40 #include "softpipe/sp_context.h"
41 #include "softpipe/sp_surface.h"
42
43
44 extern _glthread_Mutex _xmesa_lock;
45
46 extern XMesaBuffer XMesaBufferList;
47
48 /* for PF_8R8G8B24 pixel format */
49 typedef struct {
50 GLubyte b;
51 GLubyte g;
52 GLubyte r;
53 } bgr_t;
54
55
56 struct xmesa_renderbuffer;
57
58
59 /* Function pointer for clearing color buffers */
60 typedef void (*ClearFunc)( GLcontext *ctx, struct xmesa_renderbuffer *xrb,
61 GLint x, GLint y, GLint width, GLint height );
62
63
64
65
66 /** Framebuffer pixel formats */
67 enum pixel_format {
68 PF_Index, /**< Color Index mode */
69 PF_Truecolor, /**< TrueColor or DirectColor, any depth */
70 PF_Dither_True, /**< TrueColor with dithering */
71 PF_8A8R8G8B, /**< 32-bit TrueColor: 8-A, 8-R, 8-G, 8-B bits */
72 PF_8A8B8G8R, /**< 32-bit TrueColor: 8-A, 8-B, 8-G, 8-R bits */
73 PF_8R8G8B, /**< 32-bit TrueColor: 8-R, 8-G, 8-B bits */
74 PF_8R8G8B24, /**< 24-bit TrueColor: 8-R, 8-G, 8-B bits */
75 PF_5R6G5B, /**< 16-bit TrueColor: 5-R, 6-G, 5-B bits */
76 PF_Dither, /**< Color-mapped RGB with dither */
77 PF_Lookup, /**< Color-mapped RGB without dither */
78 PF_HPCR, /**< HP Color Recovery (ad@lms.be 30/08/95) */
79 PF_1Bit, /**< monochrome dithering of RGB */
80 PF_Grayscale, /**< Grayscale or StaticGray */
81 PF_Dither_5R6G5B /**< 16-bit dithered TrueColor: 5-R, 6-G, 5-B */
82 };
83
84
85 /**
86 * Visual inforation, derived from GLvisual.
87 * Basically corresponds to an XVisualInfo.
88 */
89 struct xmesa_visual {
90 GLvisual mesa_visual; /* Device independent visual parameters */
91 XMesaDisplay *display; /* The X11 display */
92 #ifdef XFree86Server
93 GLint ColormapEntries;
94 GLint nplanes;
95 #else
96 XMesaVisualInfo visinfo; /* X's visual info (pointer to private copy) */
97 XVisualInfo *vishandle; /* Only used in fakeglx.c */
98 #endif
99 GLint BitsPerPixel; /* True bits per pixel for XImages */
100
101 GLboolean ximage_flag; /* Use XImage for back buffer (not pixmap)? */
102
103 enum pixel_format dithered_pf; /* Pixel format when dithering */
104 enum pixel_format undithered_pf;/* Pixel format when not dithering */
105
106 GLfloat RedGamma; /* Gamma values, 1.0 is default */
107 GLfloat GreenGamma;
108 GLfloat BlueGamma;
109
110 /* For PF_TRUECOLOR */
111 GLint rshift, gshift, bshift;/* Pixel color component shifts */
112 GLubyte Kernel[16]; /* Dither kernel */
113 unsigned long RtoPixel[512]; /* RGB to pixel conversion */
114 unsigned long GtoPixel[512];
115 unsigned long BtoPixel[512];
116 GLubyte PixelToR[256]; /* Pixel to RGB conversion */
117 GLubyte PixelToG[256];
118 GLubyte PixelToB[256];
119
120 /* For PF_HPCR */
121 short hpcr_rgbTbl[3][256];
122 GLboolean hpcr_clear_flag;
123 GLubyte hpcr_clear_ximage_pattern[2][16];
124 XMesaImage *hpcr_clear_ximage;
125 XMesaPixmap hpcr_clear_pixmap;
126
127 /* For PF_1BIT */
128 int bitFlip;
129 };
130
131
132 /**
133 * Context info, derived from GLcontext.
134 * Basically corresponds to a GLXContext.
135 */
136 struct xmesa_context {
137 GLcontext mesa; /* the core library context (containment) */
138 XMesaVisual xm_visual; /* Describes the buffers */
139 XMesaBuffer xm_buffer; /* current span/point/line/triangle buffer */
140
141 XMesaDisplay *display; /* == xm_visual->display */
142 GLboolean swapbytes; /* Host byte order != display byte order? */
143 GLboolean direct; /* Direct rendering context? */
144
145 enum pixel_format pixelformat;
146
147 GLubyte clearcolor[4]; /* current clearing color */
148 unsigned long clearpixel; /* current clearing pixel value */
149 };
150
151
152 /**
153 * Types of X/GLX drawables we might render into.
154 */
155 typedef enum {
156 WINDOW, /* An X window */
157 GLXWINDOW, /* GLX window */
158 PIXMAP, /* GLX pixmap */
159 PBUFFER /* GLX Pbuffer */
160 } BufferType;
161
162
163 /** Values for db_mode: */
164 /*@{*/
165 #define BACK_PIXMAP 1
166 #define BACK_XIMAGE 2
167 /*@}*/
168
169
170 /**
171 * An xmesa_renderbuffer represents the back or front color buffer.
172 * For the front color buffer:
173 * <drawable> is the X window
174 * For the back color buffer:
175 * Either <ximage> or <pixmap> will be used, never both.
176 * In any case, <drawable> always equals <pixmap>.
177 * For stand-alone Mesa, we could merge <drawable> and <pixmap> into one
178 * field. We don't do that for the server-side GLcore module because
179 * pixmaps and drawables are different and we'd need a bunch of casts.
180 */
181 struct xmesa_renderbuffer
182 {
183 #if 0
184 struct gl_renderbuffer Base; /* Base class */
185 #else
186 struct st_renderbuffer St; /**< Base class */
187 #endif
188
189 XMesaBuffer Parent; /**< The XMesaBuffer this renderbuffer belongs to */
190 XMesaDrawable drawable; /* Usually the X window ID */
191 XMesaPixmap pixmap; /* Back color buffer */
192 XMesaImage *ximage; /* The back buffer, if not using a Pixmap */
193
194 GLubyte *origin1; /* used for PIXEL_ADDR1 macro */
195 GLint width1;
196 GLushort *origin2; /* used for PIXEL_ADDR2 macro */
197 GLint width2;
198 GLubyte *origin3; /* used for PIXEL_ADDR3 macro */
199 GLint width3;
200 GLuint *origin4; /* used for PIXEL_ADDR4 macro */
201 GLint width4;
202
203 GLint bottom; /* used for FLIP macro, equals height - 1 */
204
205 ClearFunc clearFunc;
206
207 void *pSurface; /** pipe surface */
208 };
209
210
211 /**
212 * Framebuffer information, derived from.
213 * Basically corresponds to a GLXDrawable.
214 */
215 struct xmesa_buffer {
216 GLframebuffer mesa_buffer; /* depth, stencil, accum, etc buffers */
217 /* This MUST BE FIRST! */
218 GLboolean wasCurrent; /* was ever the current buffer? */
219 XMesaVisual xm_visual; /* the X/Mesa visual */
220
221 XMesaDisplay *display;
222 BufferType type; /* window, pixmap, pbuffer or glxwindow */
223
224 struct xmesa_renderbuffer *frontxrb; /* front color renderbuffer */
225 struct xmesa_renderbuffer *backxrb; /* back color renderbuffer */
226
227 XMesaColormap cmap; /* the X colormap */
228
229 unsigned long selectedEvents;/* for pbuffers only */
230
231 GLint db_mode; /* 0 = single buffered */
232 /* BACK_PIXMAP = use Pixmap for back buffer */
233 /* BACK_XIMAGE = use XImage for back buffer */
234 GLboolean swAlpha;
235
236 GLuint shm; /* X Shared Memory extension status: */
237 /* 0 = not available */
238 /* 1 = XImage support available */
239 /* 2 = Pixmap support available too */
240 #if defined(USE_XSHM) && !defined(XFree86Server)
241 XShmSegmentInfo shminfo;
242 #endif
243
244 XMesaImage *rowimage; /* Used for optimized span writing */
245 XMesaPixmap stipple_pixmap; /* For polygon stippling */
246 XMesaGC stipple_gc; /* For polygon stippling */
247
248 XMesaGC gc; /* scratch GC for span, line, tri drawing */
249 XMesaGC cleargc; /* GC for clearing the color buffer */
250 XMesaGC swapgc; /* GC for swapping the color buffers */
251
252 /* The following are here instead of in the XMesaVisual
253 * because they depend on the window's colormap.
254 */
255
256 /* For PF_DITHER, PF_LOOKUP, PF_GRAYSCALE */
257 unsigned long color_table[576]; /* RGB -> pixel value */
258
259 /* For PF_DITHER, PF_LOOKUP, PF_GRAYSCALE */
260 GLubyte pixel_to_r[65536]; /* pixel value -> red */
261 GLubyte pixel_to_g[65536]; /* pixel value -> green */
262 GLubyte pixel_to_b[65536]; /* pixel value -> blue */
263
264 /* Used to do XAllocColor/XFreeColors accounting: */
265 int num_alloced;
266 #if defined(XFree86Server)
267 Pixel alloced_colors[256];
268 #else
269 unsigned long alloced_colors[256];
270 #endif
271
272 #if defined( FX )
273 /* For 3Dfx Glide only */
274 GLboolean FXisHackUsable; /* Can we render into window? */
275 GLboolean FXwindowHack; /* Are we rendering into a window? */
276 fxMesaContext FXctx;
277 #endif
278
279 /* GLX_EXT_texture_from_pixmap */
280 GLint TextureTarget; /** GLX_TEXTURE_1D_EXT, for example */
281 GLint TextureFormat; /** GLX_TEXTURE_FORMAT_RGB_EXT, for example */
282 GLint TextureMipmap; /** 0 or 1 */
283
284 struct xmesa_buffer *Next; /* Linked list pointer: */
285 };
286
287
288 /**
289 * If pixelformat==PF_TRUECOLOR:
290 */
291 #define PACK_TRUECOLOR( PIXEL, R, G, B ) \
292 PIXEL = xmesa->xm_visual->RtoPixel[R] \
293 | xmesa->xm_visual->GtoPixel[G] \
294 | xmesa->xm_visual->BtoPixel[B]; \
295
296
297 /**
298 * If pixelformat==PF_TRUEDITHER:
299 */
300 #define PACK_TRUEDITHER( PIXEL, X, Y, R, G, B ) \
301 { \
302 int d = xmesa->xm_visual->Kernel[((X)&3) | (((Y)&3)<<2)]; \
303 PIXEL = xmesa->xm_visual->RtoPixel[(R)+d] \
304 | xmesa->xm_visual->GtoPixel[(G)+d] \
305 | xmesa->xm_visual->BtoPixel[(B)+d]; \
306 }
307
308
309
310 /**
311 * If pixelformat==PF_8A8B8G8R:
312 */
313 #define PACK_8A8B8G8R( R, G, B, A ) \
314 ( ((A) << 24) | ((B) << 16) | ((G) << 8) | (R) )
315
316
317 /**
318 * Like PACK_8A8B8G8R() but don't use alpha. This is usually an acceptable
319 * shortcut.
320 */
321 #define PACK_8B8G8R( R, G, B ) ( ((B) << 16) | ((G) << 8) | (R) )
322
323
324
325 /**
326 * If pixelformat==PF_8R8G8B:
327 */
328 #define PACK_8R8G8B( R, G, B) ( ((R) << 16) | ((G) << 8) | (B) )
329
330
331 /**
332 * If pixelformat==PF_5R6G5B:
333 */
334 #define PACK_5R6G5B( R, G, B) ( (((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | ((B) >> 3) )
335
336
337 /**
338 * If pixelformat==PF_8A8R8G8B:
339 */
340 #define PACK_8A8R8G8B( R, G, B, A ) \
341 ( ((A) << 24) | ((R) << 16) | ((G) << 8) | (B) )
342
343
344
345 /**
346 * If pixelformat==PF_DITHER:
347 *
348 * Improved 8-bit RGB dithering code contributed by Bob Mercier
349 * (mercier@hollywood.cinenet.net). Thanks Bob!
350 */
351 #ifdef DITHER666
352 # define DITH_R 6
353 # define DITH_G 6
354 # define DITH_B 6
355 # define DITH_MIX(r,g,b) (((r) * DITH_G + (g)) * DITH_B + (b))
356 #else
357 # define DITH_R 5
358 # define DITH_G 9
359 # define DITH_B 5
360 # define DITH_MIX(r,g,b) (((g) << 6) | ((b) << 3) | (r))
361 #endif
362 #define DITH_DX 4
363 #define DITH_DY 4
364 #define DITH_N (DITH_DX * DITH_DY)
365
366 #define _dither(C, c, d) (((unsigned)((DITH_N * (C - 1) + 1) * c + d)) >> 12)
367
368 #define MAXC 256
369 extern const int xmesa_kernel8[DITH_DY * DITH_DX];
370
371 /* Dither for random X,Y */
372 #define DITHER_SETUP \
373 int __d; \
374 unsigned long *ctable = XMESA_BUFFER(ctx->DrawBuffer)->color_table;
375
376 #define DITHER( X, Y, R, G, B ) \
377 (__d = xmesa_kernel8[(((Y)&3)<<2) | ((X)&3)], \
378 ctable[DITH_MIX(_dither(DITH_R, (R), __d), \
379 _dither(DITH_G, (G), __d), \
380 _dither(DITH_B, (B), __d))])
381
382 /* Dither for random X, fixed Y */
383 #define XDITHER_SETUP(Y) \
384 int __d; \
385 unsigned long *ctable = XMESA_BUFFER(ctx->DrawBuffer)->color_table; \
386 const int *kernel = &xmesa_kernel8[ ((Y)&3) << 2 ];
387
388 #define XDITHER( X, R, G, B ) \
389 (__d = kernel[(X)&3], \
390 ctable[DITH_MIX(_dither(DITH_R, (R), __d), \
391 _dither(DITH_G, (G), __d), \
392 _dither(DITH_B, (B), __d))])
393
394
395
396 /*
397 * Dithering for flat-shaded triangles. Precompute all 16 possible
398 * pixel values given the triangle's RGB color. Contributed by Martin Shenk.
399 */
400 #define FLAT_DITHER_SETUP( R, G, B ) \
401 GLushort ditherValues[16]; \
402 { \
403 unsigned long *ctable = XMESA_BUFFER(ctx->DrawBuffer)->color_table; \
404 int msdr = (DITH_N*((DITH_R)-1)+1) * (R); \
405 int msdg = (DITH_N*((DITH_G)-1)+1) * (G); \
406 int msdb = (DITH_N*((DITH_B)-1)+1) * (B); \
407 int i; \
408 for (i=0;i<16;i++) { \
409 int k = xmesa_kernel8[i]; \
410 int j = DITH_MIX( (msdr+k)>>12, (msdg+k)>>12, (msdb+k)>>12 );\
411 ditherValues[i] = (GLushort) ctable[j]; \
412 } \
413 }
414
415 #define FLAT_DITHER_ROW_SETUP(Y) \
416 GLushort *ditherRow = ditherValues + ( ((Y)&3) << 2);
417
418 #define FLAT_DITHER(X) ditherRow[(X)&3]
419
420
421
422 /**
423 * If pixelformat==PF_LOOKUP:
424 */
425 #define _dither_lookup(C, c) (((unsigned)((DITH_N * (C - 1) + 1) * c)) >> 12)
426
427 #define LOOKUP_SETUP \
428 unsigned long *ctable = XMESA_BUFFER(ctx->DrawBuffer)->color_table
429
430 #define LOOKUP( R, G, B ) \
431 ctable[DITH_MIX(_dither_lookup(DITH_R, (R)), \
432 _dither_lookup(DITH_G, (G)), \
433 _dither_lookup(DITH_B, (B)))]
434
435
436 /**
437 * If pixelformat==PF_HPCR:
438 *
439 * HP Color Recovery dithering (ad@lms.be 30/08/95)
440 * HP has on it's 8-bit 700-series computers, a feature called
441 * 'Color Recovery'. This allows near 24-bit output (so they say).
442 * It is enabled by selecting the 8-bit TrueColor visual AND
443 * corresponding colormap (see tkInitWindow) AND doing some special
444 * dither.
445 */
446 extern const short xmesa_HPCR_DRGB[3][2][16];
447
448 #define DITHER_HPCR( X, Y, R, G, B ) \
449 ( ((xmesa->xm_visual->hpcr_rgbTbl[0][R] + xmesa_HPCR_DRGB[0][(Y)&1][(X)&15]) & 0xE0) \
450 |(((xmesa->xm_visual->hpcr_rgbTbl[1][G] + xmesa_HPCR_DRGB[1][(Y)&1][(X)&15]) & 0xE0)>>3) \
451 | ((xmesa->xm_visual->hpcr_rgbTbl[2][B] + xmesa_HPCR_DRGB[2][(Y)&1][(X)&15])>>6) \
452 )
453
454
455
456 /**
457 * If pixelformat==PF_1BIT:
458 */
459 extern const int xmesa_kernel1[16];
460
461 #define SETUP_1BIT int bitFlip = xmesa->xm_visual->bitFlip
462 #define DITHER_1BIT( X, Y, R, G, B ) \
463 (( ((int)(R)+(int)(G)+(int)(B)) > xmesa_kernel1[(((Y)&3) << 2) | ((X)&3)] ) ^ bitFlip)
464
465
466
467 /**
468 * If pixelformat==PF_GRAYSCALE:
469 */
470 #define GRAY_RGB( R, G, B ) XMESA_BUFFER(ctx->DrawBuffer)->color_table[((R) + (G) + (B))/3]
471
472
473
474 /**
475 * Converts a GL window Y coord to an X window Y coord:
476 */
477 #define YFLIP(XRB, Y) ((XRB)->bottom - (Y))
478
479
480 /**
481 * Return the address of a 1, 2 or 4-byte pixel in the buffer's XImage:
482 * X==0 is left, Y==0 is bottom.
483 */
484 #define PIXEL_ADDR1(XRB, X, Y) \
485 ( (XRB)->origin1 - (Y) * (XRB)->width1 + (X) )
486
487 #define PIXEL_ADDR2(XRB, X, Y) \
488 ( (XRB)->origin2 - (Y) * (XRB)->width2 + (X) )
489
490 #define PIXEL_ADDR3(XRB, X, Y) \
491 ( (bgr_t *) ( (XRB)->origin3 - (Y) * (XRB)->width3 + 3 * (X) ))
492
493 #define PIXEL_ADDR4(XRB, X, Y) \
494 ( (XRB)->origin4 - (Y) * (XRB)->width4 + (X) )
495
496
497
498 /*
499 * External functions:
500 */
501
502 extern struct xmesa_renderbuffer *
503 xmesa_create_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
504 GLboolean backBuffer);
505
506 extern void
507 xmesa_delete_framebuffer(struct gl_framebuffer *fb);
508
509 extern XMesaBuffer
510 xmesa_find_buffer(XMesaDisplay *dpy, XMesaColormap cmap, XMesaBuffer notThis);
511
512 extern unsigned long
513 xmesa_color_to_pixel( GLcontext *ctx,
514 GLubyte r, GLubyte g, GLubyte b, GLubyte a,
515 GLuint pixelFormat );
516
517 extern void
518 xmesa_get_window_size(XMesaDisplay *dpy, XMesaBuffer b,
519 GLuint *width, GLuint *height);
520
521 extern void
522 xmesa_check_and_update_buffer_size(XMesaContext xmctx, XMesaBuffer drawBuffer);
523
524 extern void
525 xmesa_init_driver_functions( XMesaVisual xmvisual,
526 struct dd_function_table *driver );
527
528 extern void
529 xmesa_update_state( GLcontext *ctx, GLbitfield new_state );
530
531 extern void
532 xmesa_set_renderbuffer_funcs(struct xmesa_renderbuffer *xrb,
533 enum pixel_format pixelformat, GLint depth);
534
535 extern void
536 xmesa_destroy_buffers_on_display(XMesaDisplay *dpy);
537
538
539 /**
540 * Using a function instead of an ordinary cast is safer.
541 */
542 static INLINE struct xmesa_renderbuffer *
543 xmesa_renderbuffer(struct gl_renderbuffer *rb)
544 {
545 return (struct xmesa_renderbuffer *) rb;
546 }
547
548
549 /**
550 * Return pointer to XMesaContext corresponding to a Mesa GLcontext.
551 * Since we're using structure containment, it's just a cast!.
552 */
553 static INLINE XMesaContext
554 XMESA_CONTEXT(GLcontext *ctx)
555 {
556 return (XMesaContext) ctx;
557 }
558
559
560 /**
561 * Return pointer to XMesaBuffer corresponding to a Mesa GLframebuffer.
562 * Since we're using structure containment, it's just a cast!.
563 */
564 static INLINE XMesaBuffer
565 XMESA_BUFFER(GLframebuffer *b)
566 {
567 return (XMesaBuffer) b;
568 }
569
570
571 /* Plugged into the software rasterizer. Try to use internal
572 * swrast-style point, line and triangle functions.
573 */
574 extern void xmesa_choose_point( GLcontext *ctx );
575 extern void xmesa_choose_line( GLcontext *ctx );
576 extern void xmesa_choose_triangle( GLcontext *ctx );
577
578
579 extern void xmesa_register_swrast_functions( GLcontext *ctx );
580
581
582
583 #define ENABLE_EXT_texure_compression_s3tc 0 /* SW texture compression */
584
585 #ifdef XFree86Server
586 #define ENABLE_EXT_timer_query 0
587 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
588 #define ENABLE_EXT_timer_query 1 /* should have 64-bit GLuint64EXT */
589 #else
590 #define ENABLE_EXT_timer_query 0 /* may not have 64-bit GLuint64EXT */
591 #endif
592
593
594 struct pipe_surface;
595 struct pipe_context;
596
597 struct xmesa_surface
598 {
599 struct pipe_surface surface;
600 struct xmesa_renderbuffer *xrb;
601 };
602
603
604 extern void
605 xmesa_clear(struct pipe_context *pipe, struct pipe_surface *ps, GLuint value);
606
607 extern void
608 xmesa_clear_buffers(GLcontext *ctx, GLbitfield buffers);
609
610 extern struct pipe_context *
611 xmesa_create_softpipe(XMesaContext xm);
612
613 extern struct pipe_surface *
614 xmesa_surface_alloc(struct pipe_context *pipe, GLuint format);
615
616 extern struct pipe_surface *
617 xmesa_new_color_surface(struct pipe_context *pipe, GLuint format);
618
619 extern boolean
620 xmesa_is_format_supported(struct pipe_context *pipe, uint format);
621
622 extern void
623 xmesa_get_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
624 uint x, uint y, uint w, uint h, float *p);
625
626 extern void
627 xmesa_put_tile_rgba(struct pipe_context *pipe, struct pipe_surface *ps,
628 uint x, uint y, uint w, uint h, const float *p);
629
630 #endif