+ int i, j;
+
+ /* Unmap color buffers */
+ for (i = 0; i < scene->fb.nr_cbufs; i++) {
+ if (scene->cbufs[i].map) {
+ struct pipe_surface *cbuf = scene->fb.cbufs[i];
+ llvmpipe_resource_unmap(cbuf->texture,
+ cbuf->u.tex.level,
+ cbuf->u.tex.first_layer);
+ scene->cbufs[i].map = NULL;
+ }
+ }
+
+ /* Unmap z/stencil buffer */
+ if (scene->zsbuf.map) {
+ struct pipe_surface *zsbuf = scene->fb.zsbuf;
+ llvmpipe_resource_unmap(zsbuf->texture,
+ zsbuf->u.tex.level,
+ zsbuf->u.tex.first_layer);
+ scene->zsbuf.map = NULL;
+ }