summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_buffer.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_buffer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_buffer.c b/src/gallium/drivers/radeonsi/si_buffer.c
index 03c11cb7013..bac561de2cb 100644
--- a/src/gallium/drivers/radeonsi/si_buffer.c
+++ b/src/gallium/drivers/radeonsi/si_buffer.c
@@ -242,6 +242,10 @@ bool si_alloc_resource(struct si_screen *sscreen,
res->gpu_address, res->gpu_address + res->buf->size,
res->buf->size);
}
+
+ if (res->b.b.flags & SI_RESOURCE_FLAG_CLEAR)
+ si_screen_clear_buffer(sscreen, &res->b.b, 0, res->bo_size, 0);
+
return true;
}