From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Date: Fri, 06 Feb 2015 16:31:36 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0183636859==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 920666E30D for ; Fri, 6 Feb 2015 08:31:36 -0800 (PST) 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 --===============0183636859== Content-Type: multipart/alternative; boundary="1423240296.FdcCBD0.17419"; charset="UTF-8" --1423240296.FdcCBD0.17419 Date: Fri, 6 Feb 2015 16:31:36 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89014 Bug ID: 89014 Summary: PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Product: Mesa Version: git Hardware: Other OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: axel.davy@ens.fr QA Contact: dri-devel@lists.freedesktop.org I put it as radeonsi bug, but it is probably r600 bug given the implementation seems shared there. Some d3d9 games do manual throttling as advised at the end of: http://www.nvidia.com/object/General_FAQ.html#G4 "A second solution is to use DirectX 9's Asynchronous Query functionality (analogous to using fences in OpenGL). At the end of your frame, insert a D3DQUERYTYPE_EVENT query into your rendering stream. You can then poll whether the GPU has reached this event yet by using GetData." Games like Heroes V of Might and Magic uses two d3d9 event queries (mapped to PIPE_QUERY_GPU_FINISHED) to do manual throttling: end query A loop until query B is OK (d3d9: loop on GetData /pipe: loop on pipe->get_query_result) render present frame end query B loop until query A is OK render present frame etc Only old apps seems to do this manual throttling, as likely recent drivers do it automatically, like Mesa. Both Gallium Nine and Wine get poor performance with this scheme and get same performance (and is the same performance than by forcing a glfinish) Not advertising the query under Gallium Nine gives a enormous performance boost to the app. Similarly advertising the query, but not using PIPE_QUERY_GPU_FINISHED but rather a custom implementation with pipe fences, gives the correct performance. In both cases, forcing glFinish gives the same bad performance than before. Thus PIPE_QUERY_GPU_FINISHED implementation seems to have a bug that makes it acts as glFinish instead of just waiting what was before the end query is rendered. What seems strange is that Wine uses ARB_sync to implement the query, and it doesn't seem to be implemented in Mesa with PIPE_QUERY_GPU_FINISHED. -- You are receiving this mail because: You are the assignee for the bug. --1423240296.FdcCBD0.17419 Date: Fri, 6 Feb 2015 16:31:36 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
Bug ID 89014
Summary PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
Product Mesa
Version git
Hardware Other
OS All
Status NEW
Severity normal
Priority medium
Component Drivers/Gallium/radeonsi
Assignee dri-devel@lists.freedesktop.org
Reporter axel.davy@ens.fr
QA Contact dri-devel@lists.freedesktop.org

I put it as radeonsi bug, but it is probably r600 bug given the implementation
seems shared there.

Some d3d9 games do manual throttling as advised at the end of:
http://www.nvidia.com/object/General_FAQ.html#G4

"A second solution is to use DirectX 9's Asynchronous Query functionality
(analogous to using fences in OpenGL).  At the end of your frame, insert a
D3DQUERYTYPE_EVENT query into your rendering stream.  You can then poll whether
the GPU has reached this event yet by using GetData."

Games like Heroes V of Might and Magic uses two d3d9 event queries (mapped to
PIPE_QUERY_GPU_FINISHED) to do manual throttling:

end query A
loop until query B is OK (d3d9: loop on GetData /pipe: loop on
pipe->get_query_result)
render
present frame
end query B
loop until query A is OK
render
present frame
etc

Only old apps seems to do this manual throttling, as likely recent drivers do
it automatically, like Mesa.

Both Gallium Nine and Wine get poor performance with this scheme and get same
performance (and is the same performance than by forcing a glfinish)

Not advertising the query under Gallium Nine gives a enormous performance boost
to the app. Similarly advertising the query, but not using
PIPE_QUERY_GPU_FINISHED but rather a custom implementation with pipe fences,
gives the correct performance.
In both cases, forcing glFinish gives the same bad performance than before.

Thus PIPE_QUERY_GPU_FINISHED implementation seems to have a bug that makes it
acts as glFinish instead of just waiting what was before the end query is
rendered.

What seems strange is that Wine uses ARB_sync to implement the query, and it
doesn't seem to be implemented in Mesa with PIPE_QUERY_GPU_FINISHED.


You are receiving this mail because:
  • You are the assignee for the bug.
--1423240296.FdcCBD0.17419-- --===============0183636859== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0183636859==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Date: Fri, 06 Feb 2015 16:38:42 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1551672052==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 3BA036E97C for ; Fri, 6 Feb 2015 08:38:44 -0800 (PST) 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 --===============1551672052== Content-Type: multipart/alternative; boundary="1423240722.2cCBAc680.19694"; charset="UTF-8" --1423240722.2cCBAc680.19694 Date: Fri, 6 Feb 2015 16:38:42 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89014 --- Comment #1 from Axel Davy --- Created attachment 113232 --> https://bugs.freedesktop.org/attachment.cgi?id=113232&action=edit Hack used to use pipe fences instead of PIPE_QUERY_GPU_FINISHED -- You are receiving this mail because: You are the assignee for the bug. --1423240722.2cCBAc680.19694 Date: Fri, 6 Feb 2015 16:38:42 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 1 on bug 89014 from
Created attachment 113232 [details]
Hack used to use pipe fences instead of PIPE_QUERY_GPU_FINISHED


You are receiving this mail because:
  • You are the assignee for the bug.
--1423240722.2cCBAc680.19694-- --===============1551672052== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1551672052==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Date: Sat, 07 Feb 2015 12:22:06 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0958950439==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id B87DA6E3D1 for ; Sat, 7 Feb 2015 04:22:06 -0800 (PST) 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 --===============0958950439== Content-Type: multipart/alternative; boundary="1423311726.Fd6b361.15744"; charset="UTF-8" --1423311726.Fd6b361.15744 Date: Sat, 7 Feb 2015 12:22:06 +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=3D89014 --- Comment #2 from Marek Ol=C5=A1=C3=A1k --- Created attachment 113242 --> https://bugs.freedesktop.org/attachment.cgi?id=3D113242&action=3Dedit patch 1 --=20 You are receiving this mail because: You are the assignee for the bug. --1423311726.Fd6b361.15744 Date: Sat, 7 Feb 2015 12:22:06 +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.
--1423311726.Fd6b361.15744-- --===============0958950439== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0958950439==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Date: Sat, 07 Feb 2015 12:23:25 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1456725411==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 229686E3D2 for ; Sat, 7 Feb 2015 04:23:25 -0800 (PST) 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 --===============1456725411== Content-Type: multipart/alternative; boundary="1423311805.ebB63cE1.16037"; charset="UTF-8" --1423311805.ebB63cE1.16037 Date: Sat, 7 Feb 2015 12:23:25 +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=3D89014 --- Comment #3 from Marek Ol=C5=A1=C3=A1k --- Created attachment 113243 --> https://bugs.freedesktop.org/attachment.cgi?id=3D113243&action=3Dedit patch 2 Can you try these patches? Patch 1 is there only to avoid merge conflicts. --=20 You are receiving this mail because: You are the assignee for the bug. --1423311805.ebB63cE1.16037 Date: Sat, 7 Feb 2015 12:23:25 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Comment= # 3 on bug 89014<= /a> from Marek Ol=C5=A1=C3=A1k
Created attachment 113243 [details]<=
/a> [review]
patch 2

Can you try these patches? Patch 1 is there only to avoid merge conflicts.<=
/pre>
        


You are receiving this mail because: =20=20=20=20=20=20
  • You are the assignee for the bug.
--1423311805.ebB63cE1.16037-- --===============1456725411== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1456725411==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Date: Sun, 08 Feb 2015 18:01:27 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0051992464==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 978866E07A for ; Sun, 8 Feb 2015 10:01:27 -0800 (PST) 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 --===============0051992464== Content-Type: multipart/alternative; boundary="1423418487.F257b0.15335"; charset="UTF-8" --1423418487.F257b0.15335 Date: Sun, 8 Feb 2015 18:01:27 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=89014 --- Comment #4 from Axel Davy --- Yes, I confirm the patch does the trick. Also for the comment that wine was too getting same performance than glFinish, I checked twice, and I think this is just mere coincidence that it gets performance around that. In specific scenes, wine got better than that. -- You are receiving this mail because: You are the assignee for the bug. --1423418487.F257b0.15335 Date: Sun, 8 Feb 2015 18:01:27 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 4 on bug 89014 from
Yes, I confirm the patch does the trick.

Also for the comment that wine was too getting same performance than glFinish,
I checked twice, and I think this is just mere coincidence that it gets
performance around that. In specific scenes, wine got better than that.


You are receiving this mail because:
  • You are the assignee for the bug.
--1423418487.F257b0.15335-- --===============0051992464== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0051992464==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI Date: Tue, 17 Feb 2015 16:49:48 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1096154289==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id D1E9A6E3F7 for ; Tue, 17 Feb 2015 08:49:48 -0800 (PST) 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 --===============1096154289== Content-Type: multipart/alternative; boundary="1424191788.1845efa1.9493"; charset="UTF-8" --1424191788.1845efa1.9493 Date: Tue, 17 Feb 2015 16:49:48 +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=3D89014 Marek Ol=C5=A1=C3=A1k changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #5 from Marek Ol=C5=A1=C3=A1k --- Fixed by 5f1cef76f9bbaae772120dcb38e0b98d68a93f26. Closing. --=20 You are receiving this mail because: You are the assignee for the bug. --1424191788.1845efa1.9493 Date: Tue, 17 Feb 2015 16:49:48 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable = Marek Ol=C5=A1=C3=A1k changed bug 89014<= /a>
What Removed Added
Status NEW RESOLVED
Resolution --- FIXED

Comment= # 5 on bug 89014<= /a> from Marek Ol=C5=A1=C3=A1k
Fixed by 5f1cef76f9bbaae772120dcb38e0b98d68a93f26. Closing.
        


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