From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 101739] An issue with alpha-to-coverage handling is causing Arma 3 64-bit Linux port to render trees incorrectly Date: Sun, 26 Nov 2017 00:59:50 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1599638847==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 0898F6E19A for ; Sun, 26 Nov 2017 00:59:50 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1599638847== Content-Type: multipart/alternative; boundary="15116579891.9Ae44.5434"; charset="UTF-8" --15116579891.9Ae44.5434 Date: Sun, 26 Nov 2017 00:59:49 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D101739 --- Comment #3 from Roland Scheidegger --- (In reply to Jan from comment #2) > I also have this problem. Is there a way to force/override Z_ORDER to > LATE_Z, at best per application, so that I can try whether this has any > effect? > If not: what other way is there to test it? I am willing to e.g. patch, > compile and test some code if somebody tells me what to do, no promise wh= en > I'll find the time for that though. You can't override that, you'd need a mesa patch looking something like thi= s: diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index fcf4928e65..13e44dac16 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1417,6 +1417,11 @@ static void si_emit_db_render_state(struct si_context *sctx, struct r600_atom *s db_shader_control |=3D S_02880C_Z_ORDER(V_02880C_LATE_Z); } + if (sctx->queued.named.blend->alpha_to_coverage) { + db_shader_control &=3D C_02880C_Z_ORDER; + db_shader_control |=3D S_02880C_Z_ORDER(V_02880C_LATE_Z); + } + Albeit probably would need to add a blend dependency like this too: @@ -658,6 +658,10 @@ static void si_bind_blend_state(struct pipe_context *c= tx, void *state) old_blend->dual_src_blend !=3D blend->dual_src_blend) si_mark_atom_dirty(sctx, &sctx->cb_render_state); + if (!old_blend || + old_blend->alpha_to_coverage !=3D blend->alpha_to_coverage) + si_mark_atom_dirty(sctx, &sctx->db_render_state); + si_pm4_bind_state(sctx, blend, state); if (!old_blend || But as said, I really don't have much knowledge of the driver. --=20 You are receiving this mail because: You are the assignee for the bug.= --15116579891.9Ae44.5434 Date: Sun, 26 Nov 2017 00:59:49 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Commen= t # 3 on bug 10173= 9 from Roland Scheidegger
(In reply to Jan from =
comment #2)
> I also have this problem. Is there a way to forc=
e/override Z_ORDER to
> LATE_Z, at best per application, so that I can try whether this has any
> effect?
> If not: what other way is there to test it? I am willing to e.g. patch,
> compile and test some code if somebody tells me what to do, no promise=
 when
> I'll find the time for that though.

You can't override that, you'd need a mesa patch looking something like thi=
s:
diff --git a/src/gallium/drivers/radeonsi/si_state.c
b/src/gallium/drivers/radeonsi/si_state.c
index fcf4928e65..13e44dac16 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -1417,6 +1417,11 @@ static void si_emit_db_render_state(=
struct si_context
*sctx, struct r600_atom *s
                db_shader_control |=3D S_02880C_Z_ORDER(V_02880C_LATE_Z);
        }

+       if (sctx->queued.named.blend->alpha_to_coverage) {
+               db_shader_control &=3D C_02880C_Z_ORDER;
+               db_shader_control |=3D S_02880C_Z_ORDER(V_02880C_LATE_Z);
+       }
+

Albeit probably would need to add a blend dependency like this too:
@@ -658,6 +658,10 @@ static void si_bind_blend_state(struct=
 pipe_context *ctx,
void *state)
             old_blend->dual_src_blend !=3D blend->dual_src_blend)
                si_mark_atom_dirty(sctx, &sctx->cb_render_state);

+       if (!old_blend ||
+            old_blend->alpha_to_coverage !=3D blend->alpha_to_covera=
ge)
+               si_mark_atom_dirty(sctx, &sctx->db_render_state);
+
        si_pm4_bind_state(sctx, blend, state);

        if (!old_blend ||

But as said, I really don't have much knowledge of the driver.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15116579891.9Ae44.5434-- --===============1599638847== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1599638847==--