All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
@ 2015-02-06 16:31 bugzilla-daemon
  2015-02-06 16:38 ` bugzilla-daemon
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:31 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2312 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 3675 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
  2015-02-06 16:31 [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI bugzilla-daemon
@ 2015-02-06 16:38 ` bugzilla-daemon
  2015-02-07 12:22 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2015-02-06 16:38 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 343 bytes --]

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

--- Comment #1 from Axel Davy <axel.davy@ens.fr> ---
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.

[-- Attachment #1.2: Type: text/html, Size: 1333 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
  2015-02-06 16:31 [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI bugzilla-daemon
  2015-02-06 16:38 ` bugzilla-daemon
@ 2015-02-07 12:22 ` bugzilla-daemon
  2015-02-07 12:23 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2015-02-07 12:22 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 301 bytes --]

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

--- Comment #2 from Marek Olšák <maraeo@gmail.com> ---
Created attachment 113242
  --> https://bugs.freedesktop.org/attachment.cgi?id=113242&action=edit
patch 1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1287 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
  2015-02-06 16:31 [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI bugzilla-daemon
  2015-02-06 16:38 ` bugzilla-daemon
  2015-02-07 12:22 ` bugzilla-daemon
@ 2015-02-07 12:23 ` bugzilla-daemon
  2015-02-08 18:01 ` bugzilla-daemon
  2015-02-17 16:49 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2015-02-07 12:23 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 379 bytes --]

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

--- Comment #3 from Marek Olšák <maraeo@gmail.com> ---
Created attachment 113243
  --> https://bugs.freedesktop.org/attachment.cgi?id=113243&action=edit
patch 2

Can you try these patches? Patch 1 is there only to avoid merge conflicts.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1365 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
  2015-02-06 16:31 [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI bugzilla-daemon
                   ` (2 preceding siblings ...)
  2015-02-07 12:23 ` bugzilla-daemon
@ 2015-02-08 18:01 ` bugzilla-daemon
  2015-02-17 16:49 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2015-02-08 18:01 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 446 bytes --]

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

--- Comment #4 from Axel Davy <axel.davy@ens.fr> ---
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.

[-- Attachment #1.2: Type: text/html, Size: 1217 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI
  2015-02-06 16:31 [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI bugzilla-daemon
                   ` (3 preceding siblings ...)
  2015-02-08 18:01 ` bugzilla-daemon
@ 2015-02-17 16:49 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2015-02-17 16:49 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 549 bytes --]

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

Marek Olšák <maraeo@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Marek Olšák <maraeo@gmail.com> ---
Fixed by 5f1cef76f9bbaae772120dcb38e0b98d68a93f26. Closing.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2067 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-17 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-06 16:31 [Bug 89014] PIPE_QUERY_GPU_FINISHED is not acting as expected on SI bugzilla-daemon
2015-02-06 16:38 ` bugzilla-daemon
2015-02-07 12:22 ` bugzilla-daemon
2015-02-07 12:23 ` bugzilla-daemon
2015-02-08 18:01 ` bugzilla-daemon
2015-02-17 16:49 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.