llvmpipe: check for texture usage in all scenes
[mesa.git] / src / mesa / drivers / ggi / default / genkgi.h
1 /*
2 ******************************************************************************
3
4 GGIMesa - KGIcon specific overrides for fbcon-mesa
5 API header
6
7 Copyright (C) 1999 Jon Taylor [taylorj@ggi-project.org]
8
9 Permission is hereby granted, free of charge, to any person obtaining a
10 copy of this software and associated documentation files (the "Software"),
11 to deal in the Software without restriction, including without limitation
12 the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 and/or sell copies of the Software, and to permit persons to whom the
14 Software is furnished to do so, subject to the following conditions:
15
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
23 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
26 ******************************************************************************
27 */
28
29 #ifndef _GENKGI_MESA_H
30 #define _GENKGI_MESA_H
31
32 #undef KGI_USE_PPBUFS
33
34 #include <unistd.h>
35 #include <sys/mman.h>
36
37 #include <ggi/internal/ggi-dl.h>
38 #include <ggi/mesa/display_fbdev.h>
39 #include <kgi/kgi.h>
40
41 #ifndef MAP_FAILED
42 #define MAP_FAILED ((void *)-1)
43 #endif
44
45 /* FIXME: LibGGI needs to export its genkgi.h */
46 struct genkgi_priv
47 {
48 ggi_gc *mapped_gc;
49 unsigned int gc_size;
50 ggifunc_drawline *drawline;
51 ggifunc_drawbox *drawbox;
52 ggifunc_fillscreen *fillscreen;
53 int fd_gc;
54 int close_gc;
55 int fd_kgicommand;
56 uint8 *mapped_kgicommand;
57 uint8 *kgicommand_ptr;
58 unsigned int kgicommand_buffersize;
59 };
60
61 #define GENKGI_PRIV(vis) ((struct genkgi_priv *)FBDEV_PRIV(vis)->accelpriv)
62
63 extern ggifunc_getapi GGIMesa_genkgi_getapi;
64 extern ggifunc_flush GGIMesa_genkgi_flush;
65
66 struct genkgi_priv_mesa
67 {
68 char accel[100];
69 int have_accel;
70 void *accelpriv; /* Private data of subdrivers */
71 struct genkgi_priv *oldpriv; /* LibGGI's private data */
72 };
73
74 #define GENKGI_PRIV_MESA(vis) ((struct genkgi_priv_mesa *)FBDEV_PRIV_MESA(vis)->accelpriv)
75
76 #endif /* _GENKHI_MESA_H */