summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/ffb/ffb_span.c
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2005-07-18 13:52:34 +0000
committerAlan Hourihane <[email protected]>2005-07-18 13:52:34 +0000
commitdf88dfe1dfff12c755270b86ab10236486b89a59 (patch)
tree4cae665c1e4581ff13c7302e90bf82f4fcb042ce /src/mesa/drivers/dri/ffb/ffb_span.c
parentc235a96a7198f5975baec3870e48ee83bf32e23a (diff)
Fix the FFB driver for the renderbuffer changes
Support NEW INTERFACE as well
Diffstat (limited to 'src/mesa/drivers/dri/ffb/ffb_span.c')
-rw-r--r--src/mesa/drivers/dri/ffb/ffb_span.c37
1 files changed, 15 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/ffb/ffb_span.c b/src/mesa/drivers/dri/ffb/ffb_span.c
index 6927945226b..f4698c64e4a 100644
--- a/src/mesa/drivers/dri/ffb/ffb_span.c
+++ b/src/mesa/drivers/dri/ffb/ffb_span.c
@@ -116,27 +116,20 @@ do { GLuint p = *(GLuint *)(buf + ((__x)<<2) + ((__y)<<13)); \
#include <spantmp.h>
-void ffbDDInitSpanFuncs(GLcontext *ctx)
+/**
+ * Plug in the Get/Put routines for the given driRenderbuffer.
+ */
+void
+ffbSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis)
{
- struct swrast_device_driver *swdd =
- _swrast_GetDeviceDriverReference(ctx);
-
- swdd->WriteRGBASpan = ffbWriteRGBASpan_888;
- swdd->WriteRGBSpan = ffbWriteRGBSpan_888;
- swdd->WriteRGBAPixels = ffbWriteRGBAPixels_888;
- swdd->WriteMonoRGBASpan = ffbWriteMonoRGBASpan_888;
- swdd->WriteMonoRGBAPixels = ffbWriteMonoRGBAPixels_888;
- swdd->ReadRGBASpan = ffbReadRGBASpan_888;
- swdd->ReadRGBAPixels = ffbReadRGBAPixels_888;
-
- /* We don't support color index mode yet, but it will be
- * very easy to do. -DaveM
- */
- swdd->WriteCI8Span = NULL;
- swdd->WriteCI32Span = NULL;
- swdd->WriteMonoCISpan = NULL;
- swdd->WriteCI32Pixels = NULL;
- swdd->WriteMonoCIPixels = NULL;
- swdd->ReadCI32Span = NULL;
- swdd->ReadCI32Pixels = NULL;
+ assert(vis->redBits == 8);
+ assert(vis->greenBits == 8);
+ assert(vis->blueBits == 8);
+ drb->Base.GetRow = ffbReadRGBASpan_888;
+ drb->Base.GetValues = ffbReadRGBAPixels_888;
+ drb->Base.PutRow = ffbWriteRGBASpan_888;
+ drb->Base.PutRowRGB = ffbWriteRGBSpan_888;
+ drb->Base.PutMonoRow = ffbWriteMonoRGBASpan_888;
+ drb->Base.PutValues = ffbWriteRGBAPixels_888;
+ drb->Base.PutMonoValues = ffbWriteMonoRGBAPixels_888;
}