lima: fix surface reload flags assignment

These flags are set at the end of the job based on its buffer usage and
then checked by following jobs.
If an application toggles stencil and depth tests alternatigly in
a sequence of jobs while also relying on previous contents to render,
with the current assignment the reload flags for depth or stencil may
be cleared incorrectly and a depth/stencil buffer may not be properly
reloaded.

Cc: mesa-stable
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30065>
This commit is contained in:
Erico Nunes 2024-07-03 16:24:42 +02:00 committed by Marge Bot
parent f0c54e02cf
commit aa4d0836fe
2 changed files with 2 additions and 8 deletions

View file

@ -47,18 +47,12 @@ dEQP-GLES2.functional.texture.mipmap.cube.projected.linear_nearest,Fail
wayland-dEQP-EGL.functional.create_context.no_config,Fail
wayland-dEQP-EGL.functional.image.modify.renderbuffer_depth16_renderbuffer_clear_depth,Fail
wayland-dEQP-EGL.functional.render.multi_context.gles2.rgb888_window,Fail
wayland-dEQP-EGL.functional.render.multi_thread.gles2.rgb888_window,Fail
wayland-dEQP-EGL.functional.wide_color.window_fp16_default_colorspace,Fail
wayland-dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb,Fail
wayland-dEQP-EGL.functional.wide_color.window_888_colorspace_srgb,Fail
x11-dEQP-EGL.functional.create_context.no_config,Fail
x11-dEQP-EGL.functional.image.modify.renderbuffer_depth16_renderbuffer_clear_depth,Fail
x11-dEQP-EGL.functional.render.multi_context.gles2.rgb888_window,Fail
x11-dEQP-EGL.functional.render.multi_context.gles2.rgba8888_pbuffer,Fail
x11-dEQP-EGL.functional.render.multi_thread.gles2.rgb888_window,Fail
x11-dEQP-EGL.functional.render.multi_thread.gles2.rgba8888_pbuffer,Fail
x11-dEQP-EGL.functional.wide_color.pbuffer_8888_colorspace_srgb,Fail
x11-dEQP-EGL.functional.wide_color.window_8888_colorspace_srgb,Fail

View file

@ -1004,12 +1004,12 @@ lima_do_job(struct lima_job *job)
/* Set reload flags for next draw. It'll be unset if buffer is cleared */
if (job->key.cbuf && (job->resolve & PIPE_CLEAR_COLOR0)) {
struct lima_surface *surf = lima_surface(job->key.cbuf);
surf->reload = PIPE_CLEAR_COLOR0;
surf->reload |= PIPE_CLEAR_COLOR0;
}
if (job->key.zsbuf && (job->resolve & (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL))) {
struct lima_surface *surf = lima_surface(job->key.zsbuf);
surf->reload = (job->resolve & (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL));
surf->reload |= (job->resolve & (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL));
}
if (ctx->job == job)