fbdev: some hacking to get the driver to compile (untested)
authorBrian Paul <brianp@vmware.com>
Thu, 27 May 2010 15:45:29 +0000 (09:45 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 27 May 2010 15:46:32 +0000 (09:46 -0600)
include/GL/glfbdev.h
src/mesa/drivers/fbdev/glfbdev.c

index 4e25e7b0566c70e1ddef0830f2c6d2a49c5f5013..452a643a443b3793d05fa5814a91f4d4204c7dc1 100644 (file)
@@ -27,6 +27,9 @@
 #define GLFBDEV_H
 
 
+/* for size_t */
+#include <stdlib.h>
+
 /* avoid including linux/fb.h */
 struct fb_fix_screeninfo;
 struct fb_var_screeninfo;
index 0ea2796eaabaa2a6bd51373fa6794d6624a7b0e6..2ad52d89fc0359eb6a3319d6c2151407d5ca0327 100644 (file)
@@ -41,8 +41,8 @@
 
 #ifdef USE_GLFBDEV_DRIVER
 
-#include <linux/fb.h>
 #include "GL/glfbdev.h"
+#include <linux/fb.h>
 #include "main/glheader.h"
 #include "main/buffers.h"
 #include "main/context.h"
@@ -216,6 +216,10 @@ viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
    DST[1] = VALUE[GCOMP];  \
    DST[2] = VALUE[RCOMP];  \
    DST[3] = VALUE[ACOMP]
+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
+   DST[0] = VALUE[BCOMP];  \
+   DST[1] = VALUE[GCOMP];  \
+   DST[2] = VALUE[RCOMP];
 #define FETCH_PIXEL(DST, SRC) \
    DST[RCOMP] = SRC[2];  \
    DST[GCOMP] = SRC[1];  \
@@ -531,10 +535,12 @@ new_glfbdev_renderbuffer(void *bufferStart, const GLFBDevVisualPtr visual)
       rb->Base.Width = visual->var.xres;
       rb->Base.Height = visual->var.yres;
 
+      /*
       rb->Base.RedBits = visual->var.red.length;
       rb->Base.GreenBits = visual->var.green.length;
       rb->Base.BlueBits = visual->var.blue.length;
       rb->Base.AlphaBits = visual->var.transp.length;
+      */
 
       rb->Base.InternalFormat = pixelFormat;
    }