From 73d9703a9310b8c8ab0defe31598308c9d8b7103 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 14 Nov 2012 16:06:52 +0100 Subject: [PATCH] radeonsi: Set STENCILOPVAL fields to 1. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is necessary for backwards compatibility with pre-SI for stencil. Fixes a number of stencil related piglit tests, and real apps using stencil. Signed-off-by: Michel Dänzer --- src/gallium/drivers/radeonsi/si_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 3e34fa360bf..e7a4005ee06 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -510,11 +510,13 @@ static void si_update_dsa_stencil_ref(struct r600_context *rctx) si_pm4_set_reg(pm4, R_028430_DB_STENCILREFMASK, S_028430_STENCILTESTVAL(ref->ref_value[0]) | S_028430_STENCILMASK(dsa->valuemask[0]) | - S_028430_STENCILWRITEMASK(dsa->writemask[0])); + S_028430_STENCILWRITEMASK(dsa->writemask[0]) | + S_028430_STENCILOPVAL(1)); si_pm4_set_reg(pm4, R_028434_DB_STENCILREFMASK_BF, S_028434_STENCILTESTVAL_BF(ref->ref_value[1]) | S_028434_STENCILMASK_BF(dsa->valuemask[1]) | - S_028434_STENCILWRITEMASK_BF(dsa->writemask[1])); + S_028434_STENCILWRITEMASK_BF(dsa->writemask[1]) | + S_028434_STENCILOPVAL_BF(1)); si_pm4_set_state(rctx, dsa_stencil_ref, pm4); } -- 2.30.2