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;
#include "svga_debug.h"
#include "svga_screen.h"
#include "svga_surface.h"
+#include "svga_resource_texture.h"
/*
pipe_surface_reference(&hw->cbufs[i], curr->cbufs[i]);
}
+
+ /* Set the rendered-to flag */
+ struct pipe_surface *s = curr->cbufs[i];
+ if (s) {
+ svga_set_texture_rendered_to(svga_texture(s->texture),
+ s->u.tex.first_layer, s->u.tex.level);
+ }
}
if ((curr->zsbuf != hw->zsbuf) || (reemit && hw->zsbuf)) {
}
pipe_surface_reference(&hw->zsbuf, curr->zsbuf);
+
+ /* Set the rendered-to flag */
+ struct pipe_surface *s = curr->zsbuf;
+ if (s) {
+ svga_set_texture_rendered_to(svga_texture(s->texture),
+ s->u.tex.first_layer, s->u.tex.level);
+ }
}
return PIPE_OK;
*/
for (i = 0; i < num_color; i++) {
if (curr->cbufs[i]) {
- rtv[i] = svga_validate_surface_view(svga,
- svga_surface(curr->cbufs[i]));
+ struct pipe_surface *s = curr->cbufs[i];
+
+ rtv[i] = svga_validate_surface_view(svga, svga_surface(s));
if (rtv[i] == NULL) {
return PIPE_ERROR_OUT_OF_MEMORY;
}
assert(svga_surface(rtv[i])->view_id != SVGA3D_INVALID_ID);
last_rtv = i;
+
+ /* Set the rendered-to flag */
+ svga_set_texture_rendered_to(svga_texture(s->texture),
+ s->u.tex.first_layer, s->u.tex.level);
}
else {
rtv[i] = NULL;
/* Setup depth stencil view */
if (curr->zsbuf) {
+ struct pipe_surface *s = curr->zsbuf;
+
dsv = svga_validate_surface_view(svga, svga_surface(curr->zsbuf));
if (!dsv) {
return PIPE_ERROR_OUT_OF_MEMORY;
}
+
+ /* Set the rendered-to flag */
+ svga_set_texture_rendered_to(svga_texture(s->texture),
+ s->u.tex.first_layer, s->u.tex.level);
}
else {
dsv = NULL;