lima: set clear depth value to 0x00ffffff as default

According to the specs, the initial depth value for a
depth buffer clear is 1. Use 0x00ffffff like the blob does.

We can remove setting this value in lima_clear, because it's
set during job creation now.

Fixes the following dEQP tests:

dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb565_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb5_a1_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.rbo_rgb4_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgba_depth_component16
dEQP-GLES2.functional.fbo.render.shared_depthbuffer.tex2d_rgb_depth_component16

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6842>
This commit is contained in:
Andreas Baierl 2020-09-23 16:59:19 +02:00 committed by Marge Bot
parent 9a221095d2
commit 92831412d9
2 changed files with 3 additions and 2 deletions

View File

@ -175,8 +175,7 @@ lima_clear(struct pipe_context *pctx, unsigned buffers, const struct pipe_scisso
clear->depth = util_pack_z(PIPE_FORMAT_Z24X8_UNORM, depth);
if (zsbuf)
zsbuf->reload &= ~PIPE_CLEAR_DEPTH;
} else
clear->depth = 0x00ffffff;
}
if (buffers & PIPE_CLEAR_STENCIL) {
clear->stencil = stencil;

View File

@ -100,6 +100,8 @@ lima_job_create(struct lima_context *ctx)
s->damage_rect.minx = s->damage_rect.miny = 0xffff;
s->damage_rect.maxx = s->damage_rect.maxy = 0;
s->clear.depth = 0x00ffffff;
for (int i = 0; i < 2; i++) {
util_dynarray_init(s->gem_bos + i, s);
util_dynarray_init(s->bos + i, s);