From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Thu, 30 Jul 2015 13:13:58 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0896046245==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 10F877A15B for ; Thu, 30 Jul 2015 06:13:58 -0700 (PDT) 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 --===============0896046245== Content-Type: multipart/alternative; boundary="1438262037.d3aA7ac1.22261"; charset="UTF-8" --1438262037.d3aA7ac1.22261 Date: Thu, 30 Jul 2015 13:13:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D91509 --- Comment #1 from Stefan D=C3=B6singer --- Created attachment 117463 --> https://bugs.freedesktop.org/attachment.cgi?id=3D117463&action=3Dedit Screenshot without FBOs --=20 You are receiving this mail because: You are the assignee for the bug. --1438262037.d3aA7ac1.22261 Date: Thu, 30 Jul 2015 13:13:57 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1438262037.d3aA7ac1.22261-- --===============0896046245== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0896046245==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Thu, 30 Jul 2015 13:13:39 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0092636779==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C3F37A158 for ; Thu, 30 Jul 2015 06:13:39 -0700 (PDT) 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 --===============0092636779== Content-Type: multipart/alternative; boundary="1438262019.4CC64D00.22261"; charset="UTF-8" --1438262019.4CC64D00.22261 Date: Thu, 30 Jul 2015 13:13:39 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=91509 Bug ID: 91509 Summary: Depth render buffer corruption Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/r200 Assignee: dri-devel@lists.freedesktop.org Reporter: stefandoesinger@gmx.at QA Contact: dri-devel@lists.freedesktop.org Created attachment 117462 --> https://bugs.freedesktop.org/attachment.cgi?id=117462&action=edit Screenshot Since my patches from a few months ago Wine can now use depth renderbuffers instead of textures for FBOs if GL_ARB_depth_texture is not supported. This makes FBOs work on r200, but it appears that there is some render corruption. The best way to describe it is that some parts of the depth buffer seem to be read or written to the wrong place inside the buffer. The attached screenshots show the issue. The application I've run here is the StencilMirror.exe sample from the DirectX 8 SDK. in fbo.png you see incorrect draws at the edges of the window. nofbo.png uses the GLX drawable (GL_BACK) instead of rendering to an FBO, which doesn't show the corruption. The corruption seems to be resolution dependent. I don't see it when I am running the application at 1400x1050 for example. -- You are receiving this mail because: You are the assignee for the bug. --1438262019.4CC64D00.22261 Date: Thu, 30 Jul 2015 13:13:39 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
Bug ID 91509
Summary Depth render buffer corruption
Product Mesa
Version git
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component Drivers/DRI/r200
Assignee dri-devel@lists.freedesktop.org
Reporter stefandoesinger@gmx.at
QA Contact dri-devel@lists.freedesktop.org

Created attachment 117462 [details]
Screenshot

Since my patches from a few months ago Wine can now use depth renderbuffers
instead of textures for FBOs if GL_ARB_depth_texture is not supported. This
makes FBOs work on r200, but it appears that there is some render corruption.
The best way to describe it is that some parts of the depth buffer seem to be
read or written to the wrong place inside the buffer.

The attached screenshots show the issue. The application I've run here is the
StencilMirror.exe sample from the DirectX 8 SDK. in fbo.png you see incorrect
draws at the edges of the window. nofbo.png uses the GLX drawable (GL_BACK)
instead of rendering to an FBO, which doesn't show the corruption.

The corruption seems to be resolution dependent. I don't see it when I am
running the application at 1400x1050 for example.


You are receiving this mail because:
  • You are the assignee for the bug.
--1438262019.4CC64D00.22261-- --===============0092636779== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0092636779==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Thu, 30 Jul 2015 13:21:53 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0287516495==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 13AE36E0CD for ; Thu, 30 Jul 2015 06:21:53 -0700 (PDT) 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 --===============0287516495== Content-Type: multipart/alternative; boundary="1438262512.0f630.26949"; charset="UTF-8" --1438262512.0f630.26949 Date: Thu, 30 Jul 2015 13:21:52 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D91509 --- Comment #2 from Stefan D=C3=B6singer --- It seems that the corruption has something to do with FBO sizes where the w= idth is a multiple of 16. width =3D 112 to 128 works OK. 129 to 143 is broken. 1= 44 to 160 works, 161 to 175 is broken and so on. --=20 You are receiving this mail because: You are the assignee for the bug. --1438262512.0f630.26949 Date: Thu, 30 Jul 2015 13:21:52 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Comment= # 2 on bug 91509<= /a> from Stefan D=C3=B6singer
It seems that the corruption has something to do with FBO size=
s where the width
is a multiple of 16. width =3D 112 to 128 works OK. 129 to 143 is broken. 1=
44 to
160 works, 161 to 175 is broken and so on.


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1438262512.0f630.26949-- --===============0287516495== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0287516495==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Fri, 31 Jul 2015 22:26:24 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0103902468==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F0A96EE01 for ; Fri, 31 Jul 2015 15:26:24 -0700 (PDT) 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 --===============0103902468== Content-Type: multipart/alternative; boundary="1438381584.f3D831.24512"; charset="UTF-8" --1438381584.f3D831.24512 Date: Fri, 31 Jul 2015 22:26:24 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=91509 Roland Scheidegger changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117462|text/plain |image/png mime type| | -- You are receiving this mail because: You are the assignee for the bug. --1438381584.f3D831.24512 Date: Fri, 31 Jul 2015 22:26:24 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 91509
What Removed Added
Attachment #117462 mime type text/plain image/png


You are receiving this mail because:
  • You are the assignee for the bug.
--1438381584.f3D831.24512-- --===============0103902468== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0103902468==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Fri, 31 Jul 2015 22:30:12 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0789968225==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id E9EA86EE02 for ; Fri, 31 Jul 2015 15:30:11 -0700 (PDT) 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 --===============0789968225== Content-Type: multipart/alternative; boundary="1438381811.e75Bb1.25216"; charset="UTF-8" --1438381811.e75Bb1.25216 Date: Fri, 31 Jul 2015 22:30:11 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=91509 --- Comment #3 from Alex Deucher --- On r200, IIRC, linear depth buffers are not supported (only tiled). I suspect the cases where it works are when the width aligns to a tile multiple. -- You are receiving this mail because: You are the assignee for the bug. --1438381811.e75Bb1.25216 Date: Fri, 31 Jul 2015 22:30:11 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 3 on bug 91509 from
On r200, IIRC, linear depth buffers are not supported (only tiled).  I suspect
the cases where it works are when the width aligns to a tile multiple.


You are receiving this mail because:
  • You are the assignee for the bug.
--1438381811.e75Bb1.25216-- --===============0789968225== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0789968225==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Fri, 31 Jul 2015 23:02:18 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2041281818==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id DA3846EE07 for ; Fri, 31 Jul 2015 16:02:17 -0700 (PDT) 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 --===============2041281818== Content-Type: multipart/alternative; boundary="1438383737.f17e1.537"; charset="UTF-8" --1438383737.f17e1.537 Date: Fri, 31 Jul 2015 23:02:17 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=91509 --- Comment #4 from Roland Scheidegger --- As a quick hunch based on your observations and some quick look in the code, it seems depth buffers need to be 128 byte aligned on r200 (and 64 byte on r100 though that's just based on the tile/untile code), but radeon_alloc_renderbuffer_storage() only does it to 64 bytes: (pitch = ((cpp * width + 63) & ~63) / cpp;) Could you try out if increasing that to 128 byte alignment there would help? For the heck of it I can't figure out though from where the window depth/colorbuffers get their alignment, so I've no idea how that's calculated there... Not sure right now on color buffers neither... -- You are receiving this mail because: You are the assignee for the bug. --1438383737.f17e1.537 Date: Fri, 31 Jul 2015 23:02:17 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 4 on bug 91509 from
As a quick hunch based on your observations and some quick look in the code, it
seems depth buffers need to be 128 byte aligned on r200 (and 64 byte on r100
though that's just based on the tile/untile code), but
radeon_alloc_renderbuffer_storage() only does it to 64 bytes: (pitch = ((cpp *
width + 63) & ~63) / cpp;)
Could you try out if increasing that to 128 byte alignment there would help?
For the heck of it I can't figure out though from where the window
depth/colorbuffers get their alignment, so I've no idea how that's calculated
there...
Not sure right now on color buffers neither...


You are receiving this mail because:
  • You are the assignee for the bug.
--1438383737.f17e1.537-- --===============2041281818== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============2041281818==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Sat, 01 Aug 2015 00:17:15 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1398368436==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D4076EE33 for ; Fri, 31 Jul 2015 17:17:15 -0700 (PDT) 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 --===============1398368436== Content-Type: multipart/alternative; boundary="1438388235.015baDf11.18336"; charset="UTF-8" --1438388235.015baDf11.18336 Date: Sat, 1 Aug 2015 00:17:15 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=91509 --- Comment #5 from Roland Scheidegger --- (In reply to Roland Scheidegger from comment #4) > As a quick hunch based on your observations and some quick look in the code, > it seems depth buffers need to be 128 byte aligned on r200 (and 64 byte on > r100 though that's just based on the tile/untile code), but > radeon_alloc_renderbuffer_storage() only does it to 64 bytes: (pitch = ((cpp > * width + 63) & ~63) / cpp;) > Could you try out if increasing that to 128 byte alignment there would help? > For the heck of it I can't figure out though from where the window > depth/colorbuffers get their alignment, so I've no idea how that's > calculated there... > Not sure right now on color buffers neither... Actually if I see that right it looks like the xorg ati driver would align things to 64 pixels for non-tiled surfaces and 256 / cpp for tiled ones (so still 64 pixels for z24s8). That would be even twice of what I suggested above. May not really be required, though. The docs seem to suggest 8 pixels for color buffers both for r100 and r200 but tile sized if tiling is used (whatever the tile size is, seems to be small though, clearly this has to be a micro-tile). Depth buffer though says 8 pixels for r100 (or tile sized if tiling is enabled, though on some chips you can't even disable it) and 32 pixels for r200 (though given the tiling code I have some doubts that's enough for z16). In any case though I stick to my 128byte recommendation for r200 depth buffers... -- You are receiving this mail because: You are the assignee for the bug. --1438388235.015baDf11.18336 Date: Sat, 1 Aug 2015 00:17:15 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 5 on bug 91509 from
(In reply to Roland Scheidegger from comment #4)
> As a quick hunch based on your observations and some quick look in the code,
> it seems depth buffers need to be 128 byte aligned on r200 (and 64 byte on
> r100 though that's just based on the tile/untile code), but
> radeon_alloc_renderbuffer_storage() only does it to 64 bytes: (pitch = ((cpp
> * width + 63) & ~63) / cpp;)
> Could you try out if increasing that to 128 byte alignment there would help?
> For the heck of it I can't figure out though from where the window
> depth/colorbuffers get their alignment, so I've no idea how that's
> calculated there...
> Not sure right now on color buffers neither...

Actually if I see that right it looks like the xorg ati driver would align
things to 64 pixels for non-tiled surfaces and 256 / cpp for tiled ones (so
still 64 pixels for z24s8). That would be even twice of what I suggested above.
May not really be required, though. The docs seem to suggest 8 pixels for color
buffers both for r100 and r200 but tile sized if tiling is used (whatever the
tile size is, seems to be small though, clearly this has to be a micro-tile).
Depth buffer though says 8 pixels for r100 (or tile sized if tiling is enabled,
though on some chips you can't even disable it) and 32 pixels for r200 (though
given the tiling code I have some doubts that's enough for z16). In any case
though I stick to my 128byte recommendation for r200 depth buffers...


You are receiving this mail because:
  • You are the assignee for the bug.
--1438388235.015baDf11.18336-- --===============1398368436== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1398368436==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Mon, 03 Aug 2015 03:02:16 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1779156592==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BACB6E2FC for ; Sun, 2 Aug 2015 20:02:16 -0700 (PDT) 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 --===============1779156592== Content-Type: multipart/alternative; boundary="1438570935.2feB0dE1.1857"; charset="UTF-8" --1438570935.2feB0dE1.1857 Date: Mon, 3 Aug 2015 03:02:15 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D91509 --- Comment #6 from Michel D=C3=A4nzer --- FWIW, the (micro-)tile size is always 8x8. With macro-tiling (called 2D til= ing with current GPUs) enabled, the pitch (and height, for calculating the memo= ry allocation size) must usually be aligned to a macro-tile boundary. Not sure offhand how to calculate the macro-tile size on those old GPUs though. --=20 You are receiving this mail because: You are the assignee for the bug. --1438570935.2feB0dE1.1857 Date: Mon, 3 Aug 2015 03:02:15 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Comment= # 6 on bug 91509<= /a> from Michel D=C3=A4nzer
FWIW, the (micro-)tile size is always 8x8. With macro-tiling (=
called 2D tiling
with current GPUs) enabled, the pitch (and height, for calculating the memo=
ry
allocation size) must usually be aligned to a macro-tile boundary. Not sure
offhand how to calculate the macro-tile size on those old GPUs though.


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1438570935.2feB0dE1.1857-- --===============1779156592== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1779156592==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 91509] Depth render buffer corruption Date: Mon, 03 Aug 2015 17:01:57 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1723019229==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 84E966E100 for ; Mon, 3 Aug 2015 10:01:57 -0700 (PDT) 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 --===============1723019229== Content-Type: multipart/alternative; boundary="1438621317.dbFdcBE1.18475"; charset="UTF-8" --1438621317.dbFdcBE1.18475 Date: Mon, 3 Aug 2015 17:01:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable https://bugs.freedesktop.org/show_bug.cgi?id=3D91509 --- Comment #7 from Roland Scheidegger --- (In reply to Michel D=C3=A4nzer from comment #6) > FWIW, the (micro-)tile size is always 8x8. With macro-tiling (called 2D > tiling with current GPUs) enabled, the pitch (and height, for calculating > the memory allocation size) must usually be aligned to a macro-tile > boundary. Not sure offhand how to calculate the macro-tile size on those = old > GPUs though. I'm not sure if micro/macro-tiling really apply to r200 depth tiled buffers, the pattern is quite different to color tiling. Actually the docs say for rv200: DEPTHOFFSET: "...128 bit aligned address. When tiling the offset must be tile-aligned (2KB)" DEPTHPITCH:"Pitch is specified in multiples of 8 pixels. When tiling the pi= tch must be tile-aligned" And for R200: DEPTHOFFSET: "Z Buffer Offset must be aligned to 4KB" DEPTHPITCH: "Pitch is specified in multiples of 32 pixels" So, in r200, depthoffset wording takes into account that it is always tiled, however depth pitch doesn't mention it at all, making it sound like no spec= ific alignment due to tiling would be required. Of course I don't know how true = that really is, in particular for z16 it seems it cannot be true (because the formula in the driver for tiling only uses (pitch >> 7) both for z16 and z3= 2). Even if those 128bytes there would be sufficient you're probably quite right that we're also missing height alignment adjustment (if we'd use 128 bytes = for width and 32 alignment for height that would give us the 4KB aligned blocks overall too). Oh, and based on the doc wording clearly the depth pitch would be wrongly aligned on r100 too (even though based on the formula the driver uses (pitc= h >> 6) it looks like it could work). --=20 You are receiving this mail because: You are the assignee for the bug. --1438621317.dbFdcBE1.18475 Date: Mon, 3 Aug 2015 17:01:57 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Comment= # 7 on bug 91509<= /a> from Roland Scheidegger
(In reply to Michel D=C3=A4nzer from comment #6)
> FWIW, the (micro-)tile size is always 8x8. With =
macro-tiling (called 2D
> tiling with current GPUs) enabled, the pitch (and height, for calculat=
ing
> the memory allocation size) must usually be aligned to a macro-tile
> boundary. Not sure offhand how to calculate the macro-tile size on tho=
se old
> GPUs though.

I'm not sure if micro/macro-tiling really apply to r200 depth tiled buffers,
the pattern is quite different to color tiling.

Actually the docs say for rv200:
DEPTHOFFSET: "...128 bit aligned address. When tiling the offset must =
be
tile-aligned (2KB)"
DEPTHPITCH:"Pitch is specified in multiples of 8 pixels. When tiling t=
he pitch
must be tile-aligned"

And for R200:
DEPTHOFFSET: "Z Buffer Offset must be aligned to 4KB"
DEPTHPITCH: "Pitch is specified in multiples of 32 pixels"

So, in r200, depthoffset wording takes into account that it is always tiled,
however depth pitch doesn't mention it at all, making it sound like no spec=
ific
alignment due to tiling would be required. Of course I don't know how true =
that
really is, in particular for z16 it seems it cannot be true (because the
formula in the driver for tiling only uses (pitch >> 7) both for z16 =
and z32).
Even if those 128bytes there would be sufficient you're probably quite right
that we're also missing height alignment adjustment (if we'd use 128 bytes =
for
width and 32 alignment for height that would give us the 4KB aligned blocks
overall too).
Oh, and based on the doc wording clearly the depth pitch would be wrongly
aligned on r100 too (even though based on the formula the driver uses (pitc=
h >>
6) it looks like it could work).


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1438621317.dbFdcBE1.18475-- --===============1723019229== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1723019229==--