mesa: use _mesa_is_bufferobj()
This commit is contained in:
@@ -649,7 +649,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Pack.BufferObj->Name) {
|
||||
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
|
||||
/* pack min/max values into a PBO */
|
||||
GLubyte *buf;
|
||||
if (!_mesa_validate_pbo_access(1, &ctx->Pack, 2, 1, 1,
|
||||
@@ -687,7 +687,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo
|
||||
format, type, values, &ctx->Pack, 0x0);
|
||||
}
|
||||
|
||||
if (ctx->Pack.BufferObj->Name) {
|
||||
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
|
||||
ctx->Pack.BufferObj);
|
||||
}
|
||||
@@ -733,7 +733,7 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Pack.BufferObj->Name) {
|
||||
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
|
||||
/* pack min/max values into a PBO */
|
||||
GLubyte *buf;
|
||||
if (!_mesa_validate_pbo_access(1, &ctx->Pack, ctx->Histogram.Width, 1, 1,
|
||||
@@ -761,7 +761,7 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G
|
||||
(CONST GLuint (*)[4]) ctx->Histogram.Count,
|
||||
format, type, values, &ctx->Pack);
|
||||
|
||||
if (ctx->Pack.BufferObj->Name) {
|
||||
if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) {
|
||||
ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
|
||||
ctx->Pack.BufferObj);
|
||||
}
|
||||
|
Reference in New Issue
Block a user