mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
pull some more fixes for pbo access from trunk
This commit is contained in:
parent
61972077cd
commit
86234e55a6
2 changed files with 9 additions and 10 deletions
|
|
@ -860,7 +860,7 @@ _swrast_DrawPixels( GLcontext *ctx,
|
|||
format, type, pixels)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glDrawPixels(invalid PBO access)");
|
||||
RENDER_FINISH(swrast,ctx);
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT,
|
||||
|
|
@ -869,7 +869,8 @@ _swrast_DrawPixels( GLcontext *ctx,
|
|||
if (!buf) {
|
||||
/* buffer is already mapped - that's an error */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(PBO is mapped)");
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
pixels = ADD_POINTERS(buf, pixels);
|
||||
}
|
||||
|
|
@ -909,8 +910,6 @@ _swrast_DrawPixels( GLcontext *ctx,
|
|||
/* don't return yet, clean-up */
|
||||
}
|
||||
|
||||
end:
|
||||
|
||||
RENDER_FINISH(swrast,ctx);
|
||||
|
||||
if (unpack->BufferObj->Name) {
|
||||
|
|
|
|||
|
|
@ -570,7 +570,8 @@ _swrast_ReadPixels( GLcontext *ctx,
|
|||
/* Do all needed clipping here, so that we can forget about it later */
|
||||
if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) {
|
||||
/* The ReadPixels region is totally outside the window bounds */
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
if (clippedPacking.BufferObj->Name) {
|
||||
|
|
@ -580,8 +581,8 @@ _swrast_ReadPixels( GLcontext *ctx,
|
|||
format, type, pixels)) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glReadPixels(invalid PBO access)");
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT,
|
||||
GL_WRITE_ONLY_ARB,
|
||||
|
|
@ -589,7 +590,8 @@ _swrast_ReadPixels( GLcontext *ctx,
|
|||
if (!buf) {
|
||||
/* buffer is already mapped - that's an error */
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)");
|
||||
goto end;
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
return;
|
||||
}
|
||||
pixels = ADD_POINTERS(buf, pixels);
|
||||
}
|
||||
|
|
@ -630,8 +632,6 @@ _swrast_ReadPixels( GLcontext *ctx,
|
|||
/* don't return yet, clean-up */
|
||||
}
|
||||
|
||||
|
||||
end:
|
||||
RENDER_FINISH(swrast, ctx);
|
||||
|
||||
if (clippedPacking.BufferObj->Name) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue