From f3cce7087a562f77be7306e70d4e62bc214bb5fa Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 21 Mar 2020 22:49:03 -0400 Subject: mesa: don't ever bind NullBufferObj for glBindBuffer targets Since VAOs don't use NullBufferObj for vertex attribs anymore, let's remove more uses of NullBufferObj. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/pixelstore.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/pixelstore.c') diff --git a/src/mesa/main/pixelstore.c b/src/mesa/main/pixelstore.c index 6123da92278..a7c3492b604 100644 --- a/src/mesa/main/pixelstore.c +++ b/src/mesa/main/pixelstore.c @@ -272,8 +272,7 @@ _mesa_init_pixelstore(struct gl_context *ctx) ctx->Pack.CompressedBlockHeight = 0; ctx->Pack.CompressedBlockDepth = 0; ctx->Pack.CompressedBlockSize = 0; - _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, - ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->Pack.BufferObj, NULL); ctx->Unpack.Alignment = 4; ctx->Unpack.RowLength = 0; ctx->Unpack.ImageHeight = 0; @@ -287,8 +286,7 @@ _mesa_init_pixelstore(struct gl_context *ctx) ctx->Unpack.CompressedBlockHeight = 0; ctx->Unpack.CompressedBlockDepth = 0; ctx->Unpack.CompressedBlockSize = 0; - _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, - ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->Unpack.BufferObj, NULL); /* * _mesa_unpack_image() returns image data in this format. When we @@ -305,8 +303,7 @@ _mesa_init_pixelstore(struct gl_context *ctx) ctx->DefaultPacking.SwapBytes = GL_FALSE; ctx->DefaultPacking.LsbFirst = GL_FALSE; ctx->DefaultPacking.Invert = GL_FALSE; - _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, - ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->DefaultPacking.BufferObj, NULL); } -- cgit v1.2.3