GLuint i;
for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
- struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.cbufs[i]); pipe->region_map(pipe, sps->surface.region);
+ struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.cbufs[i]);
+ if (sps->surface.region)
+ pipe->region_map(pipe, sps->surface.region);
}
if (sp->framebuffer.zbuf) {
struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.zbuf);
- pipe->region_map(pipe, sps->surface.region);
+ if (sps->surface.region)
+ pipe->region_map(pipe, sps->surface.region);
}
/* textures */
for (i = 0; i < sp->framebuffer.num_cbufs; i++) {
struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.cbufs[i]);
- pipe->region_unmap(pipe, sps->surface.region);
+ if (sps->surface.region)
+ pipe->region_unmap(pipe, sps->surface.region);
}
if (sp->framebuffer.zbuf) {
struct softpipe_surface *sps = softpipe_surface(sp->framebuffer.zbuf);
- pipe->region_unmap(pipe, sps->surface.region);
+ if (sps->surface.region)
+ pipe->region_unmap(pipe, sps->surface.region);
}
/* textures */