/*
* Ready to draw!
*/
+ swrast_render_start(ctx);
if (format == GL_RGBA && type == rbType) {
const GLubyte *src
}
span.array->ChanType = CHAN_TYPE;
}
- return GL_TRUE;
+ goto end;
}
if (format == GL_RGB && type == rbType) {
}
span.array->ChanType = CHAN_TYPE;
}
- return GL_TRUE;
+ goto end;
}
/* Remaining cases haven't been tested with alignment != 1 */
- if (userUnpack->Alignment != 1)
+ if (userUnpack->Alignment != 1) {
+ swrast_render_finish(ctx);
return GL_FALSE;
+ }
if (format == GL_LUMINANCE && type == CHAN_TYPE && rbType == CHAN_TYPE) {
const GLchan *src = (const GLchan *) pixels
destY++;
}
}
- return GL_TRUE;
+ goto end;
}
if (format == GL_LUMINANCE_ALPHA && type == CHAN_TYPE && rbType == CHAN_TYPE) {
destY++;
}
}
- return GL_TRUE;
+ goto end;
}
if (format == GL_COLOR_INDEX && type == GL_UNSIGNED_BYTE) {
destY++;
}
}
- return GL_TRUE;
+ goto end;
}
}
/* can't handle this pixel format and/or data type */
return GL_FALSE;
+
+end:
+ /* success, unmap render buffers */
+ swrast_render_finish(ctx);
+ return GL_TRUE;
}
return;
}
+ swrast_render_start(ctx);
+
INIT_SPAN(span, GL_BITMAP);
_swrast_span_default_attribs(ctx, &span);
span.arrayMask = SPAN_RGBA;
if (convImage) {
free(convImage);
}
+
+ swrast_render_finish(ctx);
}
*/
_mesa_set_vp_override(ctx, GL_TRUE);
- swrast_render_start(ctx);
-
if (ctx->NewState)
_mesa_update_state(ctx);
pixels = _mesa_map_pbo_source(ctx, unpack, pixels);
if (!pixels) {
- swrast_render_finish(ctx);
_mesa_set_vp_override(ctx, save_vp_override);
return;
}
*/
switch (format) {
case GL_STENCIL_INDEX:
+ swrast_render_start(ctx);
draw_stencil_pixels( ctx, x, y, width, height, type, unpack, pixels );
+ swrast_render_finish(ctx);
break;
case GL_DEPTH_COMPONENT:
+ swrast_render_start(ctx);
draw_depth_pixels( ctx, x, y, width, height, type, unpack, pixels );
+ swrast_render_finish(ctx);
break;
case GL_DEPTH_STENCIL_EXT:
+ swrast_render_start(ctx);
draw_depth_stencil_pixels(ctx, x, y, width, height, type, unpack, pixels);
+ swrast_render_finish(ctx);
break;
default:
/* all other formats should be color formats */
draw_rgba_pixels(ctx, x, y, width, height, format, type, unpack, pixels);
}
- swrast_render_finish(ctx);
_mesa_set_vp_override(ctx, save_vp_override);
_mesa_unmap_pbo_source(ctx, unpack);