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: Fri, 14 Jun 2019 15:11:52 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0925737907==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id CC1A6892A6 for ; Fri, 14 Jun 2019 15:11:52 +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 --===============0925737907== Content-Type: multipart/alternative; boundary="15605251120.10830.6005" Content-Transfer-Encoding: 7bit --15605251120.10830.6005 Date: Fri, 14 Jun 2019 15:11:52 +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 #31 from Richard Thier --- Created attachment 144545 --> https://bugs.freedesktop.org/attachment.cgi?id=3D144545&action=3Dedit Really no cmask ram it seems I have faked to have hiz ram and cmask ram just to see what happens. When I am turning on MSAA now I get this glitches from the shared screensho= t so I guess it is right that my card is just not having CMASK_RAM. 122 case CHIP_RS480: 123 caps->zmask_ram =3D RV3xx_ZMASK_SIZE; 124 caps->has_cmask =3D TRUE; /* guessed because there is also Hi= Z */ 125 caps->hiz_ram =3D R300_HIZ_LIMIT; 126 break; hiz_ram faking seems to have no effect whatsoever. I have also tried this hack - but it did not help: diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 80c959b95d0..48fafecfdda 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -1224,6 +1224,10 @@ void r300_emit_hiz_clear(struct r300_context *r300, unsigned size, void *state) tex =3D r300_resource(fb->zsbuf->texture); BEGIN_CS(size); + // FIXME: Remove this hack! + OUT_CS_REG(R300_ZB_ZCACHE_CTLSTAT, + R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE | + R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE); OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_HIZ, 2); OUT_CS(0); OUT_CS(tex->tex.hiz_dwords[fb->zsbuf->u.tex.level]); @@ -1246,6 +1250,9 @@ void r300_emit_zmask_clear(struct r300_context *r300, unsigned size, void *state tex =3D r300_resource(fb->zsbuf->texture); BEGIN_CS(size); + OUT_CS_REG(R300_ZB_ZCACHE_CTLSTAT, + R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE | + R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE); OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_ZMASK, 2); OUT_CS(0); OUT_CS(tex->tex.zmask_dwords[fb->zsbuf->u.tex.level]); --=20 You are receiving this mail because: You are the assignee for the bug.= --15605251120.10830.6005 Date: Fri, 14 Jun 2019 15:11:52 +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

Comme= nt # 31 on bug 11089= 7 from = Richard Thier
Created attachment =
144545 [details]
Really no cmask ram it seems

I have faked to have hiz ram and cmask ram just to see what happens.
When I am turning on MSAA now I get this glitches from the shared screensho=
t so
I guess it is right that my card is just not having CMASK_RAM.

  122     case CHIP_RS480:
  123         caps->zmask_ram =3D RV3xx_ZMASK_SIZE;
  124         caps->has_cmask =3D TRUE; /* guessed because there is also=
 HiZ */
  125         caps->hiz_ram =3D R300_HIZ_LIMIT;
  126         break;

hiz_ram faking seems to have no effect whatsoever.

I have also tried this hack - but it did not help:

diff --git a/src/gallium/drivers/r300/r300_emit.c
b/src/gallium/drivers/r300/r300_emit.c
index 80c959b95d0..48fafecfdda 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -1224,6 +1224,10 @@ void r300_emit_hiz_clear(struct r300=
_context *r300,
unsigned size, void *state)
     tex =3D r300_resource(fb->zsbuf->texture);

     BEGIN_CS(size);
+    // FIXME: Remove this hack!
+    OUT_CS_REG(R300_ZB_ZCACHE_CTLSTAT,
+        R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE |
+        R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE);
     OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_HIZ, 2);
     OUT_CS(0);
     OUT_CS(tex->tex.hiz_dwords[fb->zsbuf->u.tex.level]);
@@ -1246,6 +1250,9 @@ void r300_emit_zmask_clear(struct r30=
0_context *r300,
unsigned size, void *state
     tex =3D r300_resource(fb->zsbuf->texture);

     BEGIN_CS(size);
+    OUT_CS_REG(R300_ZB_ZCACHE_CTLSTAT,
+        R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE |
+        R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE);
     OUT_CS_PKT3(R300_PACKET3_3D_CLEAR_ZMASK, 2);
     OUT_CS(0);
     OUT_CS(tex->tex.zmask_dwords[fb->zsbuf->u.tex.level]);


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