From 7cb21eb5956d3e60f86b0d1728d3861743b1b265 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 3 Sep 2022 17:06:09 -0400 Subject: [PATCH] asahi: Handle out-of-bounds clear_stencil Just use the bottom 8-bits (we have only 8-bit stencil formats), otherwise we fail an assertion in GenXML. In this case the wrapping behaviour is ok. Fixes: dEQP-GLES2.functional.depth_stencil_clear.depth_stencil dEQP-GLES2.functional.depth_stencil_clear.stencil Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/magic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/magic.c b/src/gallium/drivers/asahi/magic.c index ca58af20c2e..5b8db485a4c 100644 --- a/src/gallium/drivers/asahi/magic.c +++ b/src/gallium/drivers/asahi/magic.c @@ -239,7 +239,7 @@ demo_cmdbuf(uint64_t *buf, size_t size, cfg.set_when_reloading_z_1 = clear_pipeline_textures; cfg.depth_clear_value = fui(clear_depth); - cfg.stencil_clear_value = clear_stencil; + cfg.stencil_clear_value = clear_stencil & 0xff; cfg.partial_reload_pipeline_bind = 0xffff8212; cfg.partial_reload_pipeline = pipeline_load;