From 95dcb43951b5d3c99514d1f2a50ea797217d328d Mon Sep 17 00:00:00 2001 From: Jon Taylor Date: Sat, 21 Aug 1999 05:57:17 +0000 Subject: *** empty log message *** --- src/mesa/drivers/ggi/include/ggi/mesa/debug.h | 1 + .../drivers/ggi/include/ggi/mesa/display_fbdev.h | 20 +++++ src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h | 90 ++++++++++++++++++++++ .../drivers/ggi/include/ggi/mesa/ggimesa_int.h | 22 ++++++ 4 files changed, 133 insertions(+) create mode 100644 src/mesa/drivers/ggi/include/ggi/mesa/debug.h create mode 100644 src/mesa/drivers/ggi/include/ggi/mesa/display_fbdev.h create mode 100644 src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h create mode 100644 src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h (limited to 'src/mesa/drivers/ggi/include') diff --git a/src/mesa/drivers/ggi/include/ggi/mesa/debug.h b/src/mesa/drivers/ggi/include/ggi/mesa/debug.h new file mode 100644 index 0000000000..d14c6e4a1d --- /dev/null +++ b/src/mesa/drivers/ggi/include/ggi/mesa/debug.h @@ -0,0 +1 @@ +/* Nothing here yet */ diff --git a/src/mesa/drivers/ggi/include/ggi/mesa/display_fbdev.h b/src/mesa/drivers/ggi/include/ggi/mesa/display_fbdev.h new file mode 100644 index 0000000000..eee6533978 --- /dev/null +++ b/src/mesa/drivers/ggi/include/ggi/mesa/display_fbdev.h @@ -0,0 +1,20 @@ +#ifndef _GGIMESA_DISPLAY_FBDEV_H +#define _GGIMESA_DISPLAY_FBDEV_H + +#include +#include + +ggifunc_setmode GGIMesa_fbdev_setmode; +ggifunc_getapi GGIMesa_fbdev_getapi; + +#define FBDEV_PRIV_MESA(vis) ((fbdev_hook_mesa *)(FBDEV_PRIV(vis)->accelpriv)) + +typedef struct fbdev_hook_mesa +{ + char *accel; + int have_accel; + void *accelpriv; + fbdev_hook *oldpriv; // Hooks back to the LibGGI fbdev target's private data +} fbdev_hook_mesa; + +#endif /* _GGIMESA_DISPLAY_FBDEV_H */ diff --git a/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h b/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h new file mode 100644 index 0000000000..c4611fa01b --- /dev/null +++ b/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa.h @@ -0,0 +1,90 @@ +/* GGI-Driver for MESA + * + * Copyright (C) 1997 Uwe Maurer + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * --------------------------------------------------------------------- + * This code was derived from the following source of information: + * + * svgamesa.c and ddsample.c by Brian Paul + * + */ + +#ifndef _GGIMESA_H +#define _GGIMESA_H + +#include +#include +#include +#include "config.h" +#include "context.h" +#include "matrix.h" +#include "types.h" +#include "vb.h" +#include "macros.h" +#include "depth.h" + +#undef ASSERT /* ASSERT is redefined */ + +#include +#include +#include +#include "GL/ggimesa.h" + +struct ggi_mesa_info; + +struct ggi_mesa_context +{ + GLcontext *gl_ctx; + GLvisual *gl_vis; + GLframebuffer *gl_buffer; + + ggi_visual_t ggi_vis; + ggi_coord origin; + int flip_y; + int width, height, stride; /* Stride is in pixels */ + ggi_pixel color; /* Current color or index*/ + ggi_pixel clearcolor; + void *lfb; /* Linear frame buffer*/ + int viewport_init; +}; + +struct ggi_mesa_info +{ + GLboolean rgb_flag; + GLboolean db_flag; + GLboolean alpha_flag; + GLint index_bits; + GLint red_bits, green_bits, blue_bits, alpha_bits; + GLint depth_bits, stencil_bits, accum_bits; +}; + +extern GGIMesaContext GGIMesa; /* The current context */ + +#define SHIFT (GGI_COLOR_PRECISION - 8) + +#define GGICTX ((GGIMesaContext)ctx->DriverCtx) +#define VIS (GGICTX->ggi_vis) +#define FLIP(y) (GGICTX->flip_y-(y)) + +#define LFB(type,x,y) ((type *)GGICTX->lfb + (x) + (y) * GGICTX->stride) + +#define CTX_OPMESA(ctx) \ +((struct mesa_ext *)LIBGGI_EXT(((GGIMesaContext)ctx->DriverCtx)->ggi_vis, \ + ggiMesaID)) + + +#endif + diff --git a/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h b/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h new file mode 100644 index 0000000000..0589991ce9 --- /dev/null +++ b/src/mesa/drivers/ggi/include/ggi/mesa/ggimesa_int.h @@ -0,0 +1,22 @@ +#ifndef _GGI_MESA_INT_H +#define _GGI_MESA_INT_H + +#include +#include "ggimesa.h" + +extern ggi_extid ggiMesaID; + +ggifunc_setmode GGIMesa_setmode; +ggifunc_getapi GGIMesa_getapi; + +typedef struct mesa_ext +{ + void (*update_state)(GLcontext *ctx); + int (*setup_driver)(GGIMesaContext ctx, struct ggi_mesa_info *info); + void *private; +} mesaext; + +#define LIBGGI_MESAEXT(vis) ((mesaext *)LIBGGI_EXT(vis,ggiMesaID)) +#define GGIMESA_PRIVATE(vis) ((LIBGGI_MESAEXT(vis)->private)) + +#endif /* _GGI_MISC_INT_H */ -- cgit v1.2.3