-/* $Id: genkgi_mode.c,v 1.3 1999/08/22 08:56:50 jtaylor Exp $
+/* $Id: genkgi_mode.c,v 1.4 2000/01/07 08:34:44 jtaylor Exp $
******************************************************************************
display-fbdev-kgicon-generic-mesa
#include <sys/ioctl.h>
#include <sys/mman.h>
-//#include <linux/fb.h>
-
#include <ggi/internal/ggi-dl.h>
#include <ggi/mesa/ggimesa_int.h>
+#include <ggi/mesa/debug.h>
#include "genkgi.h"
int GGIMesa_genkgi_getapi(ggi_visual *vis, int num, char *apiname, char *arguments)
{
struct genkgi_priv_mesa *priv = GENKGI_PRIV_MESA(vis);
- gl_ggiDEBUG("Entered mesa_genkgi_getapi, num=%d\n", num);
+ GGIMESADPRINT_CORE("Entered mesa_genkgi_getapi, num=%d\n", num);
strcpy(arguments, "");
int GGIMesa_genkgi_flush(ggi_visual *vis, int x, int y, int w, int h, int tryflag)
{
struct genkgi_priv_mesa *priv = GENKGI_PRIV_MESA(vis);
- int junkval; // There must be a better way to do this
+ int junkval;
priv->oldpriv->kgicommand_ptr += getpagesize();
(kgiu32)(priv->oldpriv->kgicommand_ptr) &= 0xfffff000;
if ((priv->oldpriv->kgicommand_ptr - priv->oldpriv->mapped_kgicommand)
>= (priv->oldpriv->kgicommand_buffersize - getpagesize()))
{
- gl_ggiDEBUG("Hit end of FIFO, attempting remap");
munmap(priv->oldpriv->mapped_kgicommand, priv->oldpriv->kgicommand_buffersize);
- gl_ggiDEBUG("Passed munmap");
if ((priv->oldpriv->mapped_kgicommand =
mmap(NULL,
priv->oldpriv->kgicommand_buffersize,
{
ggiPanic("Failed to remap kgicommand!");
}
- gl_ggiDEBUG("Passed mmap");
priv->oldpriv->kgicommand_ptr = priv->oldpriv->mapped_kgicommand;
- gl_ggiDEBUG("Passed kgicommand_ptr reset");
}
return 0;
}
-/* $Id: genkgi_visual.c,v 1.5 1999/09/21 00:46:26 jtaylor Exp $
+/* $Id: genkgi_visual.c,v 1.6 2000/01/07 08:34:44 jtaylor Exp $
******************************************************************************
genkgi_visual.c: visual handling for the generic KGI helper
#include <ggi/internal/ggi-dl.h>
#include <ggi/mesa/ggimesa_int.h>
#include <ggi/mesa/display_fbdev.h>
+#include <ggi/mesa/debug.h>
#include "genkgi.h"
#include <stdio.h>
static int changed(ggi_visual_t vis, int whatchanged)
{
- gl_ggiDEBUG("Entered ggimesa_genkgi_changed\n");
+ GGIMESADPRINT_CORE("Entered ggimesa_genkgi_changed\n");
+
switch (whatchanged)
{
case GGI_CHG_APILIST:
for (i = 0; ggiGetAPI(vis, i, api, args) == 0; i++)
{
strcat(api, "-mesa");
- gl_ggiDEBUG("ggimesa_genkgi_changed: api=%s, i=%d\n", api, i);
+ GGIMESADPRINT_CORE("ggimesa_genkgi_changed: api=%s, i=%d\n", api, i);
fname = ggMatchConfig(_configHandle, api, NULL);
if (fname == NULL)
{
struct stat junk;
ggifunc_getapi *oldgetapi;
- gl_ggiDEBUG("display-fbdev-kgicon-mesa: GGIdlinit start\n");
+ GGIMESADPRINT_CORE("display-fbdev-kgicon-mesa: GGIdlinit start\n");
GENKGI_PRIV_MESA(vis) = priv = malloc(sizeof(struct genkgi_priv_mesa));
if (priv == NULL)
{
sprintf(priv->accel, "%s%s", accel_prefix, "d3dim");
priv->have_accel = 1;
- gl_ggiDEBUG("display-fbdev-kgicon-mesa: Using accel: \"%s\"\n", priv->accel);
+ GGIMESADPRINT_CORE("display-fbdev-kgicon-mesa: Using accel: \"%s\"\n", priv->accel);
}
/* Mode management */
LIBGGI_MESAEXT(vis)->update_state = genkgi_update_state;
LIBGGI_MESAEXT(vis)->setup_driver = genkgi_setup_driver;
#endif
- gl_ggiDEBUG("display-fbdev-kgicon-mesa: GGIdlinit finished\n");
+ GGIMESADPRINT_CORE("display-fbdev-kgicon-mesa: GGIdlinit finished\n");
return 0;
}
void GGItriangle_flat(GLcontext *ctx,GLuint v0,GLuint v1,GLuint v2,GLuint pv)
{
+#define INTERP_Z 1
+#define INTERP_RGB 1
+#define INTERP_ALPHA 1
+
#define SETUP_CODE \
GLubyte r = VB->ColorPtr->data[pv][0]; \
GLubyte g = VB->ColorPtr->data[pv][1]; \
#define INNER_LOOP(LEFT,RIGHT,Y) \
ggiDrawHLine(VIS,LEFT,FLIP(Y),RIGHT-LEFT);
-#include "tritemp.h"
+#include "tritemp.h"
}
-/* $Id: fbdev_mode.c,v 1.3 1999/08/22 08:56:50 jtaylor Exp $
+/* $Id: fbdev_mode.c,v 1.4 2000/01/07 08:34:44 jtaylor Exp $
******************************************************************************
display-fbdev-mesa
#include <ggi/internal/ggi-dl.h>
#include <ggi/mesa/ggimesa_int.h>
#include <ggi/mesa/display_fbdev.h>
+#include <ggi/mesa/debug.h>
#ifndef MAP_FAILED
#define MAP_FAILED ((void*)-1)
return GGI_EFATAL;
}
- gl_ggiDEBUG("Success in loading %s (%s)\n", libname, libargs);
+ GGIMESADPRINT_CORE("Success in loading %s (%s)\n", libname, libargs);
}
if (priv->oldpriv->accel &&
ggiIndicateChange(vis, GGI_CHG_APILIST);
- gl_ggiDEBUG("display-fbdev-mesa: do_setmode SUCCESS\n");
+ GGIMESADPRINT_CORE("display-fbdev-mesa: do_setmode SUCCESS\n");
return 0;
}
return err;
}
- gl_ggiDEBUG("display-fbdev-mesa: setmode %dx%d#%dx%dF%d[0x%02x]\n",
+ GGIMESADPRINT_CORE("display-fbdev-mesa: setmode %dx%d#%dx%dF%d[0x%02x]\n",
mode->visible.x, mode->visible.y,
mode->virt.x, mode->virt.y,
mode->frames, mode->graphtype);
return err;
}
- gl_ggiDEBUG("display-fbdev-mesa: setmode success.\n");
+ GGIMESADPRINT_CORE("display-fbdev-mesa: setmode success.\n");
return 0;
}
-/* $Id: fbdev_visual.c,v 1.4 1999/08/24 02:03:34 jtaylor Exp $
+/* $Id: fbdev_visual.c,v 1.5 2000/01/07 08:34:44 jtaylor Exp $
******************************************************************************
display-fbdev-mesa: visual handling
#include <ggi/internal/ggi-dl.h>
#include <ggi/mesa/ggimesa_int.h>
#include <ggi/mesa/display_fbdev.h>
+#include <ggi/mesa/debug.h>
#include <stdio.h>
#include <stdlib.h>
int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
{
struct fbdev_priv_mesa *priv;
- char libname[256], libargs[256];
- int id, err;
+ int err;
ggifunc_getapi *oldgetapi;
GGIMESA_PRIVATE(vis) = priv = malloc(sizeof(struct fbdev_priv_mesa));
return GGI_DL_ERROR;
}
- priv->oldpriv = LIBGGI_PRIVATE(vis); // Hook back
+ priv->oldpriv = LIBGGI_PRIVATE(vis); /* Hook back */
err = ggLoadConfig(conffile, &_configHandle);
if (err != GGI_OK)
{
- gl_ggiPrint("display-fbdev: Couldn't open %s\n", conffile);
+ GGIMESADPRINT_CORE("display-fbdev: Couldn't open %s\n", conffile);
return err;
}
#ifdef GGI
#include <ggi/mesa/ggimesa_int.h>
+#include <ggi/mesa/debug.h>
#undef VIS
#undef FLIP
static void gl_ggiUpdateState(GLcontext *ctx);
static int changed(ggi_visual_t vis, int whatchanged);
+#if 0
/* FIXME: Move this debugging stuff to include/ggi/mesa/internal/ */
void gl_ggiPrint(char *format,...)
{
va_end(args);
}
}
+#endif
static void gl_ggiGetSize(GLcontext *ctx, GLuint *width, GLuint *height)
{
return mask & (~GL_COLOR_BUFFER_BIT);
}
+#if 0
static GLboolean gl_ggiSetBuffer(GLcontext *ctx, GLenum mode)
{
if (mode == GL_FRONT)
return GL_TRUE;
}
+#endif
+
+/* Set the buffer used for drawing */
+static GLboolean gl_ggiSetDrawBuffer(GLcontext *ctx, GLenum mode)
+{
+ if (mode == GL_FRONT_LEFT)
+ {
+ GGICTX->active_buffer = 1;
+ return GL_TRUE;
+ }
+ else if (mode == GL_BACK_LEFT)
+ {
+ GGICTX->active_buffer = 0;
+ return GL_TRUE;
+ }
+ else
+ {
+ return GL_FALSE;
+ }
+}
+
+
+/* Set the buffer used for reading */
+/* XXX support for separate read/draw buffers hasn't been tested */
+static void gl_ggiSetReadBuffer(GLcontext *ctx, GLframebuffer *buffer, GLenum mode)
+{
+ if (mode == GL_FRONT_LEFT)
+ {
+ GGICTX->active_buffer = 1;
+ }
+ else if (mode == GL_BACK_LEFT)
+ {
+ GGICTX->active_buffer = 0;
+ }
+}
+
static const char * gl_ggiRendererString(void)
{
ctx->Driver.Clear = gl_ggiClear;
ctx->Driver.Index = gl_ggiSetIndex;
ctx->Driver.Color = gl_ggiSetColor;
- ctx->Driver.SetBuffer = gl_ggiSetBuffer;
+
+ ctx->Driver.SetDrawBuffer = gl_ggiSetDrawBuffer;
+ ctx->Driver.SetReadBuffer = gl_ggiSetReadBuffer;
+
ctx->Driver.GetBufferSize = gl_ggiGetSize;
ctx->Driver.Finish = gl_ggiFlush;
ctx->Driver.Flush = gl_ggiFlush;
static int gl_ggiInitInfo(GGIMesaContext ctx, struct ggi_mesa_info *info)
{
- int virty,visy,err;
ggi_mode mode;
ggiGetMode(ctx->ggi_vis, &mode);
return 0;
}
+int ggiMesaInit()
+{
+ int err;
+
+ _ggimesaLibIsUp++;
+ if (_ggimesaLibIsUp > 1)
+ return 0; /* Initialize only at first call */
+
+ err = ggLoadConfig(ggimesaconffile, &_ggimesaConfigHandle);
+ if (err != GGI_OK)
+ {
+ fprintf(stderr, "GGIMesa: Couldn't open %s\n", ggimesaconffile);
+ _ggimesaLibIsUp--;
+ return err;
+ }
+
+ ggiMesaID = ggiExtensionRegister("GGIMesa", sizeof(struct mesa_ext), changed);
+
+ if (ggiMesaID < 0)
+ {
+ fprintf(stderr, "GGIMesa: failed to register as extension\n");
+ _ggimesaLibIsUp--;
+ ggFreeConfig(_ggimesaConfigHandle);
+ return ggiMesaID;
+ }
+
+ return 0;
+}
+
+
GGIMesaContext GGIMesaCreateContext(void)
{
GGIMesaContext ctx;
if (!func)
{
- gl_ggiPrint("setup_driver==NULL !\n");
- gl_ggiPrint("Please check your config files!\n");
+ fprintf(stderr, "setup_driver==NULL!\n");
+ fprintf(stderr, "Please check your config files!\n");
return -1;
}
info.blue_bits, info.alpha_bits);
if (!ctx->gl_vis)
{
- gl_ggiPrint("Can't create gl_visual!\n");
+ fprintf(stderr, "Can't create gl_visual!\n");
return -1;
}
- ctx->gl_buffer = gl_create_framebuffer(ctx->gl_vis);
+ ctx->gl_buffer = gl_create_framebuffer(ctx->gl_vis,
+ ctx->gl_vis->DepthBits > 0,
+ ctx->gl_vis->StencilBits > 0,
+ ctx->gl_vis->AccumBits > 0,
+ ctx->gl_vis->AlphaBits > 0);
+
if (!ctx->gl_buffer)
{
- gl_ggiPrint("Can't create gl_buffer!\n");
+ fprintf(stderr, "Can't create gl_buffer!\n");
return -1;
}
if (ctx->lfb[0] == NULL)
{
- gl_ggiPrint("No linear frame buffer!\n");
+ fprintf(stderr, "No linear frame buffer!\n");
return -1;
}
*/
void GGIMesaSwapBuffers(void)
{
- gl_ggiDEBUG("GGIMesaSwapBuffers\n");
+ GGIMESADPRINT_CORE("GGIMesaSwapBuffers\n");
+
FLUSH_VB(GGIMesa->gl_ctx, "swap buffers");
gl_ggiFlush(GGIMesa->gl_ctx);
+
if (GGIMesa->gl_vis->DBflag)
{
memcpy(GGIMesa->lfb[0], GGIMesa->lfb[1], GGIMesa->bufsize);
func = (void *)CTX_OPMESA(ctx)->update_state;
if (!func) {
- gl_ggiPrint("update_state==NULL !\n");
- gl_ggiPrint("Please check your config files!\n");
+ fprintf(stderr, "update_state == NULL!\n");
+ fprintf(stderr, "Please check your config files!\n");
ggiPanic("");
}
return 0;
}
-int ggiMesaInit()
-{
- int err;
-
- _ggimesaLibIsUp++;
- if (_ggimesaLibIsUp > 1)
- return 0; /* Initialize only at first call */
-
- err = ggLoadConfig(ggimesaconffile, &_ggimesaConfigHandle);
- if (err != GGI_OK)
- {
- fprintf(stderr, "GGIMesa: Couldn't open %s\n", ggimesaconffile);
- _ggimesaLibIsUp--;
- return err;
- }
-
- ggiMesaID = ggiExtensionRegister("GGIMesa", sizeof(struct mesa_ext), changed);
-
- if (ggiMesaID < 0)
- {
- fprintf(stderr, "GGIMesa: failed to register as extension\n");
- _ggimesaLibIsUp--;
- ggFreeConfig(_ggimesaConfigHandle);
- return ggiMesaID;
- }
-
- return 0;
-}
int ggiMesaExit(void)
{
-/* Nothing here yet */
+/* $Id: debug.h,v 1.2 2000/01/07 08:34:44 jtaylor Exp $
+******************************************************************************
+
+ GGIMesa debugging macros
+
+ Copyright (C) 1998-1999 Marcus Sundberg [marcus@ggi-project.org]
+ Copyright (C) 1999-2000 Jon Taylor [taylorj@ggi-project.org]
+
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************************
+*/
+
+#ifndef _GGI_MESA_INTERNAL_DEBUG_H
+#define _GGI_MESA_INTERNAL_DEBUG_H
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <ggi/types.h>
+#include <ggi/gg.h>
+
+
+__BEGIN_DECLS
+
+/* Exported variables */
+#ifdef BUILDING_GGIMESA
+extern uint32 _ggimesaDebugState;
+extern int _ggimesaDebugSync;
+#else
+IMPORTVAR uint32 _ggimesaDebugState;
+IMPORTVAR int _ggimesaDebugSync;
+#endif
+
+__END_DECLS
+
+
+/* Debugging types
+ * bit 0 is reserved! */
+
+#define GGIMESADEBUG_CORE (1<<1) /* 2 */
+#define GGIMESADEBUG_MODE (1<<2) /* 4 */
+#define GGIMESADEBUG_COLOR (1<<3) /* 8 */
+#define GGIMESADEBUG_DRAW (1<<4) /* 16 */
+#define GGIMESADEBUG_MISC (1<<5) /* 32 */
+#define GGIMESADEBUG_LIBS (1<<6) /* 64 */
+#define GGIMESADEBUG_EVENTS (1<<7) /* 128 */
+
+#define GGIMESADEBUG_ALL 0xffffffff
+
+#ifdef __GNUC__
+
+#ifdef DEBUG
+#define GGIMESADPRINT(form,args...) if (_ggimesaDebugState) { ggDPrintf(_ggimesaDebugSync, "GGIMesa",form, ##args); }
+#define GGIMESADPRINT_CORE(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_CORE) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#define GGIMESADPRINT_MODE(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_MODE) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#define GGIMESADPRINT_COLOR(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_COLOR) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#define GGIMESADPRINT_DRAW(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_DRAW) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#define GGIMESADPRINT_MISC(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_MISC) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#define GGIMESADPRINT_LIBS(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_LIBS) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#define GGIMESADPRINT_EVENTS(form,args...) if (_ggimesaDebugState & GGIMESADEBUG_EVENTS) { ggDPrintf(_ggimesaDebugSync,"GGIMesa",form, ##args); }
+#else /* DEBUG */
+#define GGIMESADPRINT(form,args...) do{}while(0)
+#define GGIMESADPRINT_CORE(form,args...) do{}while(0)
+#define GGIMESADPRINT_MODE(form,args...) do{}while(0)
+#define GGIMESADPRINT_COLOR(form,args...) do{}while(0)
+#define GGIMESADPRINT_DRAW(form,args...) do{}while(0)
+#define GGIMESADPRINT_MISC(form,args...) do{}while(0)
+#define GGIMESADPRINT_LIBS(form,args...) do{}while(0)
+#define GGIMESADPRINT_EVENTS(form,args...) do{}while(0)
+#endif /* DEBUG */
+
+#else /* __GNUC__ */
+
+__BEGIN_DECLS
+
+static inline void GGIMESADPRINT(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_CORE(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_CORE) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_MODE(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_MODE) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_COLOR(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_COLOR) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_DRAW(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_DRAW) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_MISC(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_MISC) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_LIBS(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_LIBS) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+static inline void GGIMESADPRINT_EVENTS(const char *form,...)
+{
+#ifdef DEBUG
+ if (_ggiDebugState & GGIDEBUG_EVENTS) {
+ va_list args;
+
+ fprintf(stderr, "GGIMesa: ");
+ va_start(args, form);
+ vfprintf(stderr, form, args);
+ va_end(args);
+ if (_ggimesaDebugSync) fflush(stderr);
+ }
+#endif
+}
+
+__END_DECLS
+
+#endif /* __GNUC__ */
+
+#ifdef DEBUG
+#define GGIMESA_ASSERT(x,str) \
+{ if (!(x)) { \
+ fprintf(stderr,"GGIMESA:%s:%d: INTERNAL ERROR: %s\n",__FILE__,__LINE__,str); \
+ exit(1); \
+} }
+#define GGIMESA_APPASSERT(x,str) \
+{ if (!(x)) { \
+ fprintf(stderr,"GGIMESA:%s:%d: APPLICATION ERROR: %s\n",__FILE__,__LINE__,str); \
+ exit(1); \
+} }
+#else /* DEBUG */
+#define GGIMESA_ASSERT(x,str) do{}while(0)
+#define GGIMESA_APPASSERT(x,str) do{}while(0)
+#endif /* DEBUG */
+
+#ifdef DEBUG
+# define GGIMESAD0(x) x
+#else
+# define GGIMESAD0(x) /* empty */
+#endif
+
+#ifdef GGIMESADLEV
+# if GGIMESADLEV == 1
+# define GGIMESAD1(x) x
+# define GGIMESAD2(x) /* empty */
+# define GGIMESAD3(x) /* empty */
+# elif GGIMESADLEV == 2
+# define GGIMESAD1(x) x
+# define GGIMESAD2(x) x
+# define GGIMESAD3(x) /* empty */
+# elif GGIMESADLEV > 2
+# define GGIMESAD1(x) x
+# define GGIMESAD2(x) x
+# define GGIMESAD3(x) x
+# endif
+#else
+# define GGIMESAD1(x) /* empty */
+# define GGIMESAD2(x) /* empty */
+# define GGIMESAD3(x) /* empty */
+#endif
+
+#endif /* _GGI_MESA_INTERNAL_DEBUG_H */
char *accel;
int have_accel;
void *accelpriv;
- fbdev_hook *oldpriv; // Hooks back to the LibGGI fbdev target's private data
+ fbdev_hook *oldpriv; /* Hooks back to the LibGGI fbdev target's private data */
};
#endif /* _GGIMESA_DISPLAY_FBDEV_H */