summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/v3d/v3d_job.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c
index 9b24f12e7e9..9892e0ecff2 100644
--- a/src/gallium/drivers/v3d/v3d_job.c
+++ b/src/gallium/drivers/v3d/v3d_job.c
@@ -384,7 +384,13 @@ v3d_get_job_for_fbo(struct v3d_context *v3d)
if (zsbuf) {
struct v3d_resource *rsc = v3d_resource(zsbuf->texture);
if (!rsc->writes)
- job->clear |= PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL;
+ job->clear |= PIPE_CLEAR_DEPTH;
+
+ if (rsc->separate_stencil)
+ rsc = rsc->separate_stencil;
+
+ if (!rsc->writes)
+ job->clear |= PIPE_CLEAR_STENCIL;
}
job->draw_tiles_x = DIV_ROUND_UP(v3d->framebuffer.width,