mesa: remove gl_renderbuffer::Wrapped
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_driver.c
index 6452fe218e570d64d806a4b699a121d533eb3e40..ba818f0030e318bac16e9a23e01e99680b0f0889 100644 (file)
@@ -24,6 +24,8 @@
  *
  */
 
+#include "main/mfeatures.h"
+
 #include "nouveau_driver.h"
 #include "nouveau_context.h"
 #include "nouveau_fbo.h"
@@ -32,7 +34,7 @@
 #include "drivers/common/meta.h"
 
 static const GLubyte *
-nouveau_get_string(GLcontext *ctx, GLenum name)
+nouveau_get_string(struct gl_context *ctx, GLenum name)
 {
        static char buffer[128];
        char hardware_name[32];
@@ -43,7 +45,7 @@ nouveau_get_string(GLcontext *ctx, GLenum name)
 
                case GL_RENDERER:
                        sprintf(hardware_name, "nv%02X", context_chipset(ctx));
-                       driGetRendererString(buffer, hardware_name, DRIVER_DATE, 0);
+                       driGetRendererString(buffer, hardware_name, 0);
 
                        return (GLubyte *)buffer;
                default:
@@ -52,7 +54,7 @@ nouveau_get_string(GLcontext *ctx, GLenum name)
 }
 
 static void
-nouveau_flush(GLcontext *ctx)
+nouveau_flush(struct gl_context *ctx)
 {
        struct nouveau_context *nctx = to_nouveau_context(ctx);
        struct nouveau_channel *chan = context_chan(ctx);
@@ -70,13 +72,13 @@ nouveau_flush(GLcontext *ctx)
 }
 
 static void
-nouveau_finish(GLcontext *ctx)
+nouveau_finish(struct gl_context *ctx)
 {
        nouveau_flush(ctx);
 }
 
 void
-nouveau_clear(GLcontext *ctx, GLbitfield buffers)
+nouveau_clear(struct gl_context *ctx, GLbitfield buffers)
 {
        struct gl_framebuffer *fb = ctx->DrawBuffer;
        int x, y, w, h;
@@ -94,11 +96,11 @@ nouveau_clear(GLcontext *ctx, GLbitfield buffers)
                        continue;
 
                s = &to_nouveau_renderbuffer(
-                       fb->Attachment[i].Renderbuffer->Wrapped)->surface;
+                       fb->Attachment[i].Renderbuffer)->surface;
 
                if (buf & BUFFER_BITS_COLOR) {
                        mask = pack_rgba_i(s->format, ctx->Color.ColorMask[0]);
-                       value = pack_rgba_f(s->format, ctx->Color.ClearColor);
+                       value = pack_rgba_clamp_f(s->format, ctx->Color.ClearColor.f);
 
                        if (mask)
                                context_drv(ctx)->surface_fill(