dri/nouveau: Add some RGB888 span functions.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 23 Feb 2010 15:30:48 +0000 (16:30 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 25 Feb 2010 17:37:37 +0000 (18:37 +0100)
src/mesa/drivers/dri/nouveau/nouveau_span.c

index dbbbf15b096ac2343fd2dd1bf559fdf3bb657c77..f1a56dd03af9a03aeaeeba6f0a1ad0e69f317ac4 100644 (file)
 
 #include "spantmp2.h"
 
+/* RGB888 span functions */
+#define SPANTMP_PIXEL_FMT GL_BGR
+#define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
+#define TAG(x) nouveau_##x##_rgb888
+#define TAG2(x, y) nouveau_##x##_rgb888##y
+#define GET_PTR(x, y) (s->bo->map + (y)*s->pitch + (x)*s->cpp)
+
+#include "spantmp2.h"
+
 /* ARGB8888 span functions */
 #define SPANTMP_PIXEL_FMT GL_BGRA
 #define SPANTMP_PIXEL_TYPE GL_UNSIGNED_INT_8_8_8_8_REV
@@ -101,6 +110,8 @@ renderbuffer_map_unmap(struct gl_renderbuffer *rb, GLboolean map)
                        nouveau_InitPointers_rgb565(rb);
                        break;
                case MESA_FORMAT_XRGB8888:
+                       nouveau_InitPointers_rgb888(rb);
+                       break;
                case MESA_FORMAT_ARGB8888:
                        nouveau_InitPointers_argb8888(rb);
                        break;