gallium/draw: initial code to properly support llvm in the draw module
[mesa.git] / src / mesa / main / pixelstore.c
index ff1a6344cc946f5540630c81373754a7a0c67dcb..ec585ef0ccefb560d4fac4e3f09afbcccb70a2f9 100644 (file)
 
 #include "glheader.h"
 #include "bufferobj.h"
-#include "colormac.h"
 #include "context.h"
-#include "image.h"
-#include "macros.h"
 #include "pixelstore.h"
 #include "mtypes.h"
 
@@ -245,7 +242,8 @@ _mesa_init_pixelstore( GLcontext *ctx )
    ctx->Pack.ClientStorage = GL_FALSE;
    ctx->Pack.Invert = GL_FALSE;
 #if FEATURE_EXT_pixel_buffer_object
-   ctx->Pack.BufferObj = ctx->Array.NullBufferObj;
+   _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj,
+                                 ctx->Shared->NullBufferObj);
 #endif
    ctx->Unpack.Alignment = 4;
    ctx->Unpack.RowLength = 0;
@@ -258,7 +256,8 @@ _mesa_init_pixelstore( GLcontext *ctx )
    ctx->Unpack.ClientStorage = GL_FALSE;
    ctx->Unpack.Invert = GL_FALSE;
 #if FEATURE_EXT_pixel_buffer_object
-   ctx->Unpack.BufferObj = ctx->Array.NullBufferObj;
+   _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj,
+                                 ctx->Shared->NullBufferObj);
 #endif
 
    /*
@@ -278,6 +277,7 @@ _mesa_init_pixelstore( GLcontext *ctx )
    ctx->DefaultPacking.ClientStorage = GL_FALSE;
    ctx->DefaultPacking.Invert = GL_FALSE;
 #if FEATURE_EXT_pixel_buffer_object
-   ctx->DefaultPacking.BufferObj = ctx->Array.NullBufferObj;
+   _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj,
+                                 ctx->Shared->NullBufferObj);
 #endif
 }