intel: Remove unused stored values reported by clang.
[mesa.git] / src / mesa / drivers / dri / intel / intel_blit.c
index ec4a5b492aecb621921b50d45e9600bc29abbbd2..da9beba030d5597374821991cea18fd96da4b2eb 100644 (file)
  **************************************************************************/
 
 
-#include <stdio.h>
-#include <errno.h>
-
 #include "main/mtypes.h"
 #include "main/context.h"
 #include "main/enums.h"
-#include "main/texformat.h"
 #include "main/colormac.h"
 
 #include "intel_blit.h"
@@ -56,7 +52,6 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
 {
 
    struct intel_context *intel;
-   const intelScreenPrivate *intelScreen;
 
    DBG("%s\n", __FUNCTION__);
 
@@ -66,8 +61,6 @@ intelCopyBuffer(const __DRIdrawablePrivate * dPriv,
    if (!intel)
       return;
 
-   intelScreen = intel->intelScreen;
-
    /* The LOCK_HARDWARE is required for the cliprects.  Buffer offsets
     * should work regardless.
     */
@@ -374,8 +367,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
       skipBuffers = BUFFER_BIT_STENCIL;
    }
 
-   /* XXX Move this flush/lock into the following conditional? */
-   intelFlush(&intel->ctx);
    LOCK_HARDWARE(intel);
 
    intel_get_cliprects(intel, &cliprects, &num_cliprects, &x_off, &y_off);
@@ -502,12 +493,14 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
                  CLAMPED_FLOAT_TO_UBYTE(clear[2], color[2]);
                  CLAMPED_FLOAT_TO_UBYTE(clear[3], color[3]);
 
-                 switch (irb->texformat->MesaFormat) {
+                 switch (irb->Base.Format) {
                  case MESA_FORMAT_ARGB8888:
-                    clearVal = intel->ClearColor8888;
+                 case MESA_FORMAT_XRGB8888:
+                    clearVal = PACK_COLOR_8888(clear[3], clear[0],
+                                               clear[1], clear[2]);
                     break;
                  case MESA_FORMAT_RGB565:
-                    clearVal = intel->ClearColor565;
+                    clearVal = PACK_COLOR_565(clear[0], clear[1], clear[2]);
                     break;
                  case MESA_FORMAT_ARGB4444:
                     clearVal = PACK_COLOR_4444(clear[3], clear[0],
@@ -519,7 +512,7 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask)
                     break;
                  default:
                     _mesa_problem(ctx, "Unexpected renderbuffer format: %d\n",
-                                  irb->texformat->MesaFormat);
+                                  irb->Base.Format);
                     clearVal = 0;
                  }
               }