radeon: Don't crash generating mipmaps when pixels=NULL
[mesa.git] / src / mesa / swrast / s_bitmap.c
index f3dda12e252dcf21a183e3cd1a4522e54d509b3d..5e7822cf3231576c662aa617048cc79654e1ae43 100644 (file)
  * \author Brian Paul
  */
 
-#include "glheader.h"
-#include "bufferobj.h"
-#include "image.h"
-#include "macros.h"
-#include "pixel.h"
+#include "main/glheader.h"
+#include "main/bufferobj.h"
+#include "main/image.h"
+#include "main/macros.h"
+#include "main/pixel.h"
 
 #include "s_context.h"
 #include "s_span.h"
@@ -50,7 +50,6 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
                const struct gl_pixelstore_attrib *unpack,
                const GLubyte *bitmap )
 {
-   SWcontext *swrast = SWRAST_CONTEXT(ctx);
    GLint row, col;
    GLuint count = 0;
    SWspan span;
@@ -61,7 +60,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
    if (!bitmap)
       return;
 
-   RENDER_START(swrast,ctx);
+   swrast_render_start(ctx);
 
    if (SWRAST_CONTEXT(ctx)->NewState)
       _swrast_validate_derived( ctx );
@@ -132,7 +131,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
       }
    }
 
-   RENDER_FINISH(swrast,ctx);
+   swrast_render_finish(ctx);
 
    _mesa_unmap_bitmap_pbo(ctx, unpack);
 }
@@ -157,7 +156,7 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
    ASSERT(ctx->RenderMode == GL_RENDER);
    ASSERT(bitmap);
 
-   RENDER_START(swrast,ctx);
+   swrast_render_start(ctx);
 
    if (SWRAST_CONTEXT(ctx)->NewState)
       _swrast_validate_derived( ctx );
@@ -224,6 +223,6 @@ _swrast_Bitmap( GLcontext *ctx, GLint px, GLint py,
       }
    }
 
-   RENDER_FINISH(swrast,ctx);
+   swrast_render_finish(ctx);
 }
 #endif