summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/ggi/default
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/ggi/default')
-rw-r--r--src/mesa/drivers/ggi/default/genkgi_mode.c13
-rw-r--r--src/mesa/drivers/ggi/default/genkgi_visual.c14
-rw-r--r--src/mesa/drivers/ggi/default/stubs.c6
3 files changed, 17 insertions, 16 deletions
diff --git a/src/mesa/drivers/ggi/default/genkgi_mode.c b/src/mesa/drivers/ggi/default/genkgi_mode.c
index b11b6414996..938024789f9 100644
--- a/src/mesa/drivers/ggi/default/genkgi_mode.c
+++ b/src/mesa/drivers/ggi/default/genkgi_mode.c
@@ -1,4 +1,4 @@
-/* $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
@@ -33,17 +33,16 @@
#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, "");
@@ -63,7 +62,7 @@ int GGIMesa_genkgi_getapi(ggi_visual *vis, int num, char *apiname, char *argumen
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;
@@ -81,9 +80,7 @@ int GGIMesa_genkgi_flush(ggi_visual *vis, int x, int y, int w, int h, int tryfla
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,
@@ -94,9 +91,7 @@ int GGIMesa_genkgi_flush(ggi_visual *vis, int x, int y, int w, int h, int tryfla
{
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;
}
diff --git a/src/mesa/drivers/ggi/default/genkgi_visual.c b/src/mesa/drivers/ggi/default/genkgi_visual.c
index 43d79e4a64e..c30f15fdb09 100644
--- a/src/mesa/drivers/ggi/default/genkgi_visual.c
+++ b/src/mesa/drivers/ggi/default/genkgi_visual.c
@@ -1,4 +1,4 @@
-/* $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
@@ -28,6 +28,7 @@
#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>
@@ -74,7 +75,8 @@ char *conffile = confstub;
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:
@@ -88,7 +90,7 @@ static int changed(ggi_visual_t vis, int whatchanged)
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)
{
@@ -112,7 +114,7 @@ int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
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)
@@ -139,7 +141,7 @@ int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
{
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 */
@@ -162,7 +164,7 @@ int GGIdlinit(ggi_visual *vis, const char *args, void *argptr)
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;
}
diff --git a/src/mesa/drivers/ggi/default/stubs.c b/src/mesa/drivers/ggi/default/stubs.c
index aa3e6c98b8e..5c7a0ff5920 100644
--- a/src/mesa/drivers/ggi/default/stubs.c
+++ b/src/mesa/drivers/ggi/default/stubs.c
@@ -325,6 +325,10 @@ void GGIupdate_state(GLcontext *ctx)
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]; \
@@ -335,7 +339,7 @@ void GGItriangle_flat(GLcontext *ctx,GLuint v0,GLuint v1,GLuint v2,GLuint pv)
#define INNER_LOOP(LEFT,RIGHT,Y) \
ggiDrawHLine(VIS,LEFT,FLIP(Y),RIGHT-LEFT);
-#include "tritemp.h"
+#include "tritemp.h"
}