[Bug 101739] An issue with alpha-to-coverage handling is causing Arma 3 64-bit Linux port to render trees incorrectly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Nov 26 00:59:50 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=101739

--- Comment #3 from Roland Scheidegger <sroland at vmware.com> ---
(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 when
> I'll find the time for that though.

You can't override that, you'd need a mesa patch looking something like this:
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 |= S_02880C_Z_ORDER(V_02880C_LATE_Z);
        }

+       if (sctx->queued.named.blend->alpha_to_coverage) {
+               db_shader_control &= C_02880C_Z_ORDER;
+               db_shader_control |= 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 != blend->dual_src_blend)
                si_mark_atom_dirty(sctx, &sctx->cb_render_state);

+       if (!old_blend ||
+            old_blend->alpha_to_coverage != 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171126/20213ead/attachment.html>


More information about the dri-devel mailing list