v3d: Fix depth resource invalidation with separate_stencil
If there is a separate stencil in use, the resource invalidation
flag was not being removed for the depth buffer as rsc was assigned
to the separate stencil.
Fixes: 6ff509593c ("v3d: Only apply TLB load invalidation on first job after FB state update")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36030>
This commit is contained in:
committed by
Marge Bot
parent
b59895140d
commit
7d51a10cda
@@ -443,7 +443,7 @@ v3d_get_job_for_fbo(struct v3d_context *v3d)
|
||||
struct v3d_resource *rsc = v3d_resource(cbufs[i].texture);
|
||||
if (!rsc->writes)
|
||||
job->clear_tlb |= PIPE_CLEAR_COLOR0 << i;
|
||||
/* Loads invalidations only applies to the first job
|
||||
/* Load invalidation only applies to the first job
|
||||
* submitted after a framebuffer state update
|
||||
*/
|
||||
if (rsc->invalidated &&
|
||||
@@ -456,13 +456,12 @@ v3d_get_job_for_fbo(struct v3d_context *v3d)
|
||||
|
||||
if (zsbuf->texture) {
|
||||
struct v3d_resource *rsc = v3d_resource(zsbuf->texture);
|
||||
if (!rsc->writes)
|
||||
if (!rsc->writes) {
|
||||
job->clear_tlb |= PIPE_CLEAR_DEPTH;
|
||||
|
||||
if (rsc->separate_stencil)
|
||||
rsc = rsc->separate_stencil;
|
||||
|
||||
if (!rsc->writes)
|
||||
if (!rsc->separate_stencil)
|
||||
job->clear_tlb |= PIPE_CLEAR_STENCIL;
|
||||
}
|
||||
if (rsc->separate_stencil && !rsc->separate_stencil->writes)
|
||||
job->clear_tlb |= PIPE_CLEAR_STENCIL;
|
||||
/* Loads invalidations only applies to the first job submitted
|
||||
* after a framebuffer state update
|
||||
|
||||
Reference in New Issue
Block a user