From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 110897] HyperZ is broken for r300 (bad z for some micro and macrotiles?) Date: Wed, 12 Jun 2019 01:22:39 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0805987366==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id B789E891E1 for ; Wed, 12 Jun 2019 01:22:39 +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 --===============0805987366== Content-Type: multipart/alternative; boundary="15603025591.CADc.9906" Content-Transfer-Encoding: 7bit --15603025591.CADc.9906 Date: Wed, 12 Jun 2019 01:22:39 +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=3D110897 --- Comment #9 from Richard Thier --- So these does not seem to happen at any time: /* Emit clear packets. */ r300_emit_gpu_flush(r300, r300->gpu_flush.size, r300->gpu_flush.sta= te); r300->gpu_flush.dirty =3D FALSE; if (r300->zmask_clear.dirty) { fprintf(stderr, "KUL-AKVA\n"); r300_emit_zmask_clear(r300, r300->zmask_clear.size, r300->zmask_clear.state); r300->zmask_clear.dirty =3D FALSE; }=20=20=20 if (r300->hiz_clear.dirty) { fprintf(stderr, "KUL-AKVA2\n"); r300_emit_hiz_clear(r300, r300->hiz_clear.size, r300->hiz_clear.state); r300->hiz_clear.dirty =3D FALSE; }=20=20=20 if (r300->cmask_clear.dirty) { r300_emit_cmask_clear(r300, r300->cmask_clear.size, r300->cmask_clear.state); r300->cmask_clear.dirty =3D FALSE; } At least not with glxgears. But I kind of get the impression that the inten= tion of the code is to end up here as earlier we set things as dirty: /* Setup Hyper-Z clears. */ if (r300->hyperz_enabled) { if (zmask_clear) { hyperz_dcv =3D hyperz->zb_depthclearvalue =3D r300_depth_clear_value(fb->zsbuf->format, depth, stencil); r300_mark_atom_dirty(r300, &r300->zmask_clear); r300_mark_atom_dirty(r300, &r300->gpu_flush); buffers &=3D ~PIPE_CLEAR_DEPTHSTENCIL; /* FIXME: REMOVE KUL* LOGS: */ fprintf(stderr, "KUL-A\n"); } if (hiz_clear) { r300->hiz_clear_value =3D r300_hiz_clear_value(depth); r300_mark_atom_dirty(r300, &r300->hiz_clear); r300_mark_atom_dirty(r300, &r300->gpu_flush); } r300->num_z_clears++; } Looking at mark_atom_dirty it seems to set the flag. I do not know who dele= tes it but it got deleted. Also I have printed what is the value of "buffers" w= here we enter the "KUL-C" code path (according to my log scheme) and the value is buffers=3D4 which is the first (0th) color buffer. It is not some new kind,= but above this check I see only one place where this could get zeroed and maybe that is not happening for this card but for others it does. What bugs me is that the dirtyness of zmask_clear and hiz_clear also go away somewhere, but I am too tired to see where. Just wanted to write down all t= he stuff so far and at least provide the logs and insights. --=20 You are receiving this mail because: You are the assignee for the bug.= --15603025591.CADc.9906 Date: Wed, 12 Jun 2019 01:22:39 +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 # 9 on bug 11089= 7 from = Richard Thier
So these does not seem to happen at any time:

        /* Emit clear packets. */
        r300_emit_gpu_flush(r300, r300->gpu_flush.size, r300->gpu_flu=
sh.state);
        r300->gpu_flush.dirty =3D FALSE;

        if (r300->zmask_clear.dirty) {
            fprintf(stderr, "KUL-AKVA\n");
            r300_emit_zmask_clear(r300, r300->zmask_clear.size,
                                  r300->zmask_clear.state);
            r300->zmask_clear.dirty =3D FALSE;
        }=20=20=20
        if (r300->hiz_clear.dirty) {
            fprintf(stderr, "KUL-AKVA2\n");
            r300_emit_hiz_clear(r300, r300->hiz_clear.size,
                                r300->hiz_clear.state);
            r300->hiz_clear.dirty =3D FALSE;
        }=20=20=20
        if (r300->cmask_clear.dirty) {
            r300_emit_cmask_clear(r300, r300->cmask_clear.size,
                                  r300->cmask_clear.state);
            r300->cmask_clear.dirty =3D FALSE;
        }

At least not with glxgears. But I kind of get the impression that the inten=
tion
of the code is to end up here as earlier we set things as dirty:

            /* Setup Hyper-Z clears. */
            if (r300->hyperz_enabled) {
                if (zmask_clear) {
                    hyperz_dcv =3D hyperz->zb_depthclearvalue =3D
                        r300_depth_clear_value(fb->zsbuf->format, dep=
th,
stencil);
                    r300_mark_atom_dirty(r300, &r300->zmask_clear);
                    r300_mark_atom_dirty(r300, &r300->gpu_flush);
                    buffers &=3D ~PIPE_CLEAR_DEPTHSTENCIL;
/* FIXME: REMOVE KUL* LOGS: */
                    fprintf(stderr, "KUL-A\n");
                }

                if (hiz_clear) {
                    r300->hiz_clear_value =3D r300_hiz_clear_value(depth=
);
                    r300_mark_atom_dirty(r300, &r300->hiz_clear);
                    r300_mark_atom_dirty(r300, &r300->gpu_flush);
                }
                r300->num_z_clears++;
            }

Looking at mark_atom_dirty it seems to set the flag. I do not know who dele=
tes
it but it got deleted. Also I have printed what is the value of "buffe=
rs" where
we enter the "KUL-C" code path (according to my log scheme) and t=
he value is
buffers=3D4 which is the first (0th) color buffer. It is not some new kind,=
 but
above this check I see only one place where this could get zeroed and maybe
that is not happening for this card but for others it does.

What bugs me is that the dirtyness of zmask_clear and hiz_clear also go away
somewhere, but I am too tired to see where. Just wanted to write down all t=
he
stuff so far and at least provide the logs and insights.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15603025591.CADc.9906-- --===============0805987366== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============0805987366==--