* [Bug 105256] Slow performance using glDrawElementsBaseVertex
@ 2018-02-26 16:46 bugzilla-daemon
2018-02-26 18:47 ` bugzilla-daemon
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-26 16:46 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1269 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
Bug ID: 105256
Summary: Slow performance using glDrawElementsBaseVertex
Product: Mesa
Version: 17.3
Hardware: Other
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r600
Assignee: dri-devel@lists.freedesktop.org
Reporter: logan@bacoosta.com
QA Contact: dri-devel@lists.freedesktop.org
Original application bug report here:
https://github.com/gonetz/GLideN64/issues/1561
This bug happens using mupen64plus (N64 emulator) and the GLideN64 graphics
plugin.
The application uses VBO streaming
(https://www.khronos.org/opengl/wiki/Buffer_Object_Streaming) using
ARB_buffer_storage to upload the VBO data.
Multiple users that when using Mesa + r600 driver, the performance was abysmal.
It turns out that converting the glDrawElementsBaseVertex calls to glDrawArrays
fixed the problem.
You can see the commit that fixed the problem here:
https://github.com/loganmc10/GLideN64/commit/9bcfa67d9550c7f1cd4ba72f657facd66a4d27e4
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2876 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElementsBaseVertex
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
@ 2018-02-26 18:47 ` bugzilla-daemon
2018-02-26 19:05 ` bugzilla-daemon
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-26 18:47 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 934 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
--- Comment #1 from Roland Scheidegger <sroland@vmware.com> ---
At a quick glance, I'd suspect the problem isn't really drawElementsBaseVertex
per se, but the use of GL_UNSIGNED_BYTE indices as the code seemed to do.
The hw doesn't support ubyte indices, and this has to be emulated by converting
the elements to ushort (and if you don't start from zero, IIRC this can get
huge buffers allocated especially if start is negative, but I don't remember
the details).
I don't know if the driver could do better, but in general you're advised to
not use ubyte indices (this is a gl only feature, d3d doesn't support it, so
it's unsurprising some hw doesn't support it natively).
(Note that even early GCN does not support ubyte indices, they are only
supported starting with Vulcanic Islands.)
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1718 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElementsBaseVertex
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
2018-02-26 18:47 ` bugzilla-daemon
@ 2018-02-26 19:05 ` bugzilla-daemon
2018-02-26 19:55 ` bugzilla-daemon
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-26 19:05 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
--- Comment #2 from Logan McNaughton <logan@bacoosta.com> ---
Interesting, is this documented somewhere? How do you know what data formats
the HW supports? Is there any other hardware besides these cards that don't
support it?
I'll have the users test using GL_UNSIGNED_SHORT
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElementsBaseVertex
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
2018-02-26 18:47 ` bugzilla-daemon
2018-02-26 19:05 ` bugzilla-daemon
@ 2018-02-26 19:55 ` bugzilla-daemon
2018-02-26 20:05 ` bugzilla-daemon
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-26 19:55 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 695 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
Logan McNaughton <logan@bacoosta.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |NOTABUG
--- Comment #3 from Logan McNaughton <logan@bacoosta.com> ---
The user confirmed that using GL_UNSIGNED_SHORT fixed the issue, thanks. I
would still be curious if there is some easy way to figure this out via
documentation or querying the device somehow.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2201 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElementsBaseVertex
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
` (2 preceding siblings ...)
2018-02-26 19:55 ` bugzilla-daemon
@ 2018-02-26 20:05 ` bugzilla-daemon
2018-02-27 0:41 ` [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices bugzilla-daemon
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-26 20:05 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2306 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
Roland Scheidegger <sroland@vmware.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|NOTABUG |FIXED
--- Comment #4 from Roland Scheidegger <sroland@vmware.com> ---
(In reply to Logan McNaughton from comment #2)
> Interesting, is this documented somewhere? How do you know what data formats
> the HW supports? Is there any other hardware besides these cards that don't
> support it?
>
> I'll have the users test using GL_UNSIGNED_SHORT
I'm not sure if AMD (or ATI) had some perf guides published where this was
stated. You can, however, see this from the published register guides -
https://developer.amd.com/resources/developer-guides-manuals/
It says VGT_INDEX_16 and VGT_INDEX_32 as valid values for VGT_DMA_INDEX_TYPE
(for evergreen, others should be similar), interestingly however it's already a
2-bit value there.
(Actually the register guides only seem to go up to Sea Islands, so you can't
even see that it is supported starting with VI.)
A look at the mesa driver is probably easier though :-). This should affect all
amd/ati hw up to Sea Islands. Of course, if you use old-school non-vbo element
data, it's probably no big deal.
At a very quick glance at the driver code, it looks like newer nvidia chips can
handle it (everything from g80). nv30/nv40 cannot, but there it looks like nv30
will emulate index buffers anyway, so the only chips which this might make a
difference is nv40 family.
Looks like all intel chips can handle it fine.
That said, even if the slowdown is due to this, I'm not convinced the driver
couldn't do better (though it does not look trivial to do better). But it's one
of the features which noone really expects to get used, therefore it's good
enough as long as it works correctly...
You can't query this afaik and just have to know... Apparently using
GL_UNSIGNED_BYTE indices was simply broken at some point with windows drivers
too - it's possible the blob implements a more sophisticated emulation
strategy: https://community.amd.com/thread/159040
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 3918 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
` (3 preceding siblings ...)
2018-02-26 20:05 ` bugzilla-daemon
@ 2018-02-27 0:41 ` bugzilla-daemon
2018-02-27 3:29 ` bugzilla-daemon
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-27 0:41 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1089 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
Roland Scheidegger <sroland@vmware.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Slow performance using |Slow performance using
|glDrawElementsBaseVertex |glDrawElements calls with
| |GL_UNSIGNED_BYTE indices
--- Comment #5 from Roland Scheidegger <sroland@vmware.com> ---
FWIW from a driver perspective this isn't really resolved fixed, I'd consider
that a bug. Using GL_UNSIGNED_BYTE indices will never be the optimal solution,
but clearly the driver could do better, as evidenced by the driver for some
other OS (I don't know what the driver does, but it could for instance maintain
a shadow copy, translate indices with a compute shader, the problem likely is
that the driver translates the indices on the cpu for each draw call
currently).
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2503 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
` (4 preceding siblings ...)
2018-02-27 0:41 ` [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices bugzilla-daemon
@ 2018-02-27 3:29 ` bugzilla-daemon
2018-03-11 7:56 ` bugzilla-daemon
2019-09-18 19:25 ` bugzilla-daemon
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-02-27 3:29 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 616 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
Logan McNaughton <logan@bacoosta.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #6 from Logan McNaughton <logan@bacoosta.com> ---
Fair enough, even a warning when MESA_DEBUG is set would be good, just
something to notify the developer what is wrong
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2153 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
` (5 preceding siblings ...)
2018-02-27 3:29 ` bugzilla-daemon
@ 2018-03-11 7:56 ` bugzilla-daemon
2019-09-18 19:25 ` bugzilla-daemon
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2018-03-11 7:56 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 335 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
--- Comment #7 from H4nN1baL <reizemberk@gmail.com> ---
Just as a constancy and this does not remain in oblivion, this is related to
this another: https://bugs.freedesktop.org/show_bug.cgi?id=102204
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 1381 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
` (6 preceding siblings ...)
2018-03-11 7:56 ` bugzilla-daemon
@ 2019-09-18 19:25 ` bugzilla-daemon
7 siblings, 0 replies; 9+ messages in thread
From: bugzilla-daemon @ 2019-09-18 19:25 UTC (permalink / raw)
To: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 841 bytes --]
https://bugs.freedesktop.org/show_bug.cgi?id=105256
GitLab Migration User <gitlab-migration@fdo.invalid> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|REOPENED |RESOLVED
--- Comment #8 from GitLab Migration User <gitlab-migration@fdo.invalid> ---
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.
You can subscribe and participate further through the new bug through this link
to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/631.
--
You are receiving this mail because:
You are the assignee for the bug.
[-- Attachment #1.2: Type: text/html, Size: 2520 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-09-18 19:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 16:46 [Bug 105256] Slow performance using glDrawElementsBaseVertex bugzilla-daemon
2018-02-26 18:47 ` bugzilla-daemon
2018-02-26 19:05 ` bugzilla-daemon
2018-02-26 19:55 ` bugzilla-daemon
2018-02-26 20:05 ` bugzilla-daemon
2018-02-27 0:41 ` [Bug 105256] Slow performance using glDrawElements calls with GL_UNSIGNED_BYTE indices bugzilla-daemon
2018-02-27 3:29 ` bugzilla-daemon
2018-03-11 7:56 ` bugzilla-daemon
2019-09-18 19:25 ` 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.