summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/lima_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/lima/lima_resource.c')
-rw-r--r--src/gallium/drivers/lima/lima_resource.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c
index 9f429f8c32a..e60a46b7ae8 100644
--- a/src/gallium/drivers/lima/lima_resource.c
+++ b/src/gallium/drivers/lima/lima_resource.c
@@ -508,7 +508,13 @@ lima_surface_create(struct pipe_context *pctx,
surf->tiled_w = align(psurf->width, 16) >> 4;
surf->tiled_h = align(psurf->height, 16) >> 4;
- surf->reload = true;
+ surf->reload = 0;
+ if (util_format_has_stencil(util_format_description(psurf->format)))
+ surf->reload |= PIPE_CLEAR_STENCIL;
+ if (util_format_has_depth(util_format_description(psurf->format)))
+ surf->reload |= PIPE_CLEAR_DEPTH;
+ if (!util_format_is_depth_or_stencil(psurf->format))
+ surf->reload |= PIPE_CLEAR_COLOR0;
return &surf->base;
}