dst->height = fb->height;
dst->nr_cbufs = fb->nr_cbufs;
- /* Check if we need to propagate any of the render targets which we may
- * be unbinding.
- */
- for (i = 0; i < dst->nr_cbufs; i++) {
- struct pipe_surface *s = i < fb->nr_cbufs ? fb->cbufs[i] : NULL;
- if (dst->cbufs[i] && dst->cbufs[i] != s) {
- if (svga_surface_needs_propagation(dst->cbufs[i])) {
- svga_propagate_surface(svga, dst->cbufs[i], FALSE);
- }
- }
- }
-
/* Check that all surfaces are the same size.
* Actually, the virtual hardware may support rendertargets with
* different size, depending on the host API and driver,
util_copy_framebuffer_state(dst, fb);
- /* Set the rendered-to flags */
- for (i = 0; i < dst->nr_cbufs; i++) {
- struct pipe_surface *s = dst->cbufs[i];
- if (s) {
- struct svga_texture *t = svga_texture(s->texture);
- svga_set_texture_rendered_to(t, s->u.tex.first_layer, s->u.tex.level);
- }
- }
-
if (svga->curr.framebuffer.zsbuf) {
switch (svga->curr.framebuffer.zsbuf->format) {
case PIPE_FORMAT_Z16_UNORM:
svga->curr.depthscale = 0.0f;
break;
}
-
- /* Set rendered-to flag */
- {
- struct pipe_surface *s = dst->zsbuf;
- struct svga_texture *t = svga_texture(s->texture);
- svga_set_texture_rendered_to(t, s->u.tex.first_layer, s->u.tex.level);
- }
}
else {
svga->curr.depthscale = 0.0f;