summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-08-25 18:08:07 -0600
committerBrian Paul <[email protected]>2016-08-26 14:20:19 -0600
commit1a10b37ac3ff7adaf8e876a893cbd6fa0486426f (patch)
treed68e8c2c23c3ded2d5b69ef38bedebd22e1e3464 /src/gallium/drivers/svga
parentbb7f094b3711614953ee699950c7b728efc48c54 (diff)
svga: simplify surface propagation code in svga_set_framebuffer_state()
Rewrite the comment too. Reviewed-by: Neha Bhende <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_misc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_misc.c b/src/gallium/drivers/svga/svga_pipe_misc.c
index a26e577d8f7..71601543a9c 100644
--- a/src/gallium/drivers/svga/svga_pipe_misc.c
+++ b/src/gallium/drivers/svga/svga_pipe_misc.c
@@ -108,7 +108,6 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
{
struct svga_context *svga = svga_context(pipe);
struct pipe_framebuffer_state *dst = &svga->curr.framebuffer;
- boolean propagate = FALSE;
unsigned i;
/* make sure any pending drawing calls are flushed before changing
@@ -120,22 +119,15 @@ static void svga_set_framebuffer_state(struct pipe_context *pipe,
dst->height = fb->height;
dst->nr_cbufs = fb->nr_cbufs;
- /* check if we need to propagate any of the target surfaces */
+ /* 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])) {
- propagate = TRUE;
- break;
- }
- }
- }
-
- if (propagate) {
- 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)
svga_propagate_surface(svga, dst->cbufs[i]);
+ }
}
}