All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 37142] New: Too much vertex buffers uploads
@ 2011-05-12 15:11 bugzilla-daemon
  2011-05-12 15:15 ` [Bug 37142] " bugzilla-daemon
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 15:11 UTC (permalink / raw)
  To: dri-devel

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

           Summary: Too much vertex buffers uploads
           Product: DRI
           Version: DRI CVS
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: DRM/Radeon
        AssignedTo: dri-devel@lists.freedesktop.org
        ReportedBy: pelloux@gmail.com


Created an attachment (id=46638)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=46638)
openarena + verbose vertex buffer upload logs

Test case : openarena + anholt benchmark + r600g

I added several fprintf debug trace to mesa code around Vertex buffer
uploading.
Basically, openarena render things using :
glVertexPointeer()
glLockArraysEXT()
several glDrawElements()
glUnlockArraysEXT()

It seems that each call to glDrawElements implies a reupload of the vertex
buffers, even if it has not changed (as glLock/Unlock calls tell, at least for
part of the buffer).

Another related bug (it seems) is in : cso_set_vertex_buffers() which does a
test before calling : util_copy_vertex_buffers and pipe->set_vertex_buffers
This test always return true, thus the 2 above functions are always called. The
test is always true because it memcmp all pipe_vertex_buffer, which contains a
'buffer' pointer, which changes at each frame (see st_draw.c:349).

I'm trying to build a patch which fix the cso_set_vertex_buffers problem and
then, taking advantage of glLock/Unlock calls to fix the upload issue.

What do you think ?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
@ 2011-05-12 15:15 ` bugzilla-daemon
  2011-05-12 17:54 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 15:15 UTC (permalink / raw)
  To: dri-devel

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

Michel Dänzer <michel@daenzer.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Product|DRI                         |Mesa
            Version|DRI CVS                     |git
          Component|DRM/Radeon                  |Drivers/Gallium/r600

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
  2011-05-12 15:15 ` [Bug 37142] " bugzilla-daemon
@ 2011-05-12 17:54 ` bugzilla-daemon
  2011-05-12 17:55 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 17:54 UTC (permalink / raw)
  To: dri-devel

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

Ian Romanick <idr@freedesktop.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #46638|application/octet-stream    |text/plain
          mime type|                            |

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
  2011-05-12 15:15 ` [Bug 37142] " bugzilla-daemon
  2011-05-12 17:54 ` bugzilla-daemon
@ 2011-05-12 17:55 ` bugzilla-daemon
  2011-05-12 19:55 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 17:55 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #1 from Ian Romanick <idr@freedesktop.org> 2011-05-12 10:55:30 PDT ---
(In reply to comment #0)
> Created an attachment (id=46638)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=46638)
> openarena + verbose vertex buffer upload logs
> 
> Test case : openarena + anholt benchmark + r600g
> 
> I added several fprintf debug trace to mesa code around Vertex buffer
> uploading.
> Basically, openarena render things using :
> glVertexPointeer()
> glLockArraysEXT()
> several glDrawElements()
> glUnlockArraysEXT()
> 
> It seems that each call to glDrawElements implies a reupload of the vertex
> buffers, even if it has not changed (as glLock/Unlock calls tell, at least for
> part of the buffer).

EXT_compiled_vertex_array is dead.  It has been dead for almost 10 years.  No
new applications should use it, and old applications that use it should be fast
enough on modern hardware.  I really don't think we should add any code to Mesa
to make this case fast.  We'd be better off submitting patches to openarena to
use VBOs instead.

> Another related bug (it seems) is in : cso_set_vertex_buffers() which does a
> test before calling : util_copy_vertex_buffers and pipe->set_vertex_buffers
> This test always return true, thus the 2 above functions are always called. The
> test is always true because it memcmp all pipe_vertex_buffer, which contains a
> 'buffer' pointer, which changes at each frame (see st_draw.c:349).
> 
> I'm trying to build a patch which fix the cso_set_vertex_buffers problem and
> then, taking advantage of glLock/Unlock calls to fix the upload issue.
> 
> What do you think ?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (2 preceding siblings ...)
  2011-05-12 17:55 ` bugzilla-daemon
@ 2011-05-12 19:55 ` bugzilla-daemon
  2011-05-12 20:19 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 19:55 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #2 from Marek Olšák <maraeo@gmail.com> 2011-05-12 12:55:38 PDT ---
(In reply to comment #0)
> What do you think ?

You can't optimize the uploads because the sizes of all buffers are not known
when glLockArraysEXT is called. The only things you've got are pointers to the
buffers.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (3 preceding siblings ...)
  2011-05-12 19:55 ` bugzilla-daemon
@ 2011-05-12 20:19 ` bugzilla-daemon
  2011-05-12 20:27 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 20:19 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #3 from Pierre-Eric Pelloux-Prayer <pelloux@gmail.com> 2011-05-12 13:19:13 PDT ---
> EXT_compiled_vertex_array is dead.  It has been dead for almost 10 years.  No
> new applications should use it, and old applications that use it should be fast
> enough on modern hardware.  I really don't think we should add any code to Mesa
> to make this case fast.  We'd be better off submitting patches to openarena to
> use VBOs instead.

That's why I asked for external opinions. I still feel that IF it can brings
significant enough performance improvement, it could be useful - mainly because
openarena and all games using quake3 based engine are used in every open-source
drivers benchmarks.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (4 preceding siblings ...)
  2011-05-12 20:19 ` bugzilla-daemon
@ 2011-05-12 20:27 ` bugzilla-daemon
  2011-05-13  7:11 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-12 20:27 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #4 from Pierre-Eric Pelloux-Prayer <pelloux@gmail.com> 2011-05-12 13:27:09 PDT ---
(In reply to comment #2)
> (In reply to comment #0)
> > What do you think ?
> 
> You can't optimize the uploads because the sizes of all buffers are not known
> when glLockArraysEXT is called. The only things you've got are pointers to the
> buffers.

Sure, but I was thinking to something more like : 
- glLockArraysEXT does nothing more than curently
- uploading a vertex buffer is done as before except in one case : when trying
to upload the same buffer AND glLock is enabled => the uploading is skipped as
data is already in GPU memory (which is the case shown in the attached trace
file)

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (5 preceding siblings ...)
  2011-05-12 20:27 ` bugzilla-daemon
@ 2011-05-13  7:11 ` bugzilla-daemon
  2011-05-13 16:22 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-13  7:11 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #5 from Fabio Pedretti <fabio.ped@libero.it> 2011-05-13 00:11:50 PDT ---
Note that ioquake3 will probably support VBOs soon:
https://bugzilla.icculus.org/show_bug.cgi?id=4358

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (6 preceding siblings ...)
  2011-05-13  7:11 ` bugzilla-daemon
@ 2011-05-13 16:22 ` bugzilla-daemon
  2011-05-17 12:33 ` bugzilla-daemon
  2014-04-13 11:20 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-13 16:22 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #6 from Sven Arvidsson <sa@whiz.se> 2011-05-13 09:22:41 PDT ---
(In reply to comment #3)
> That's why I asked for external opinions. I still feel that IF it can brings
> significant enough performance improvement, it could be useful - mainly because
> openarena and all games using quake3 based engine are used in every open-source
> drivers benchmarks.

Hey! A bug that can be solved by ignoring Phoronix!

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (7 preceding siblings ...)
  2011-05-13 16:22 ` bugzilla-daemon
@ 2011-05-17 12:33 ` bugzilla-daemon
  2014-04-13 11:20 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2011-05-17 12:33 UTC (permalink / raw)
  To: dri-devel

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

--- Comment #7 from Pierre-Eric Pelloux-Prayer <pelloux@gmail.com> 2011-05-17 05:33:51 PDT ---
Created an attachment (id=46804)
 View: https://bugs.freedesktop.org/attachment.cgi?id=46804
 Review: https://bugs.freedesktop.org/review?bug=37142&attachment=46804

vertex buffer upload caching

Here's a patch adding vertex buffer upload caching. 
It's not extensively tested (only with custom app and openarena), and is a bit
hackish (mainly regarding : ctx->Array.NewState field, but it seems unused
elsewhere).
Anyway, it allowed me to do some testing and confirm the initial guess : it
brings no performance improvements to openarena :-/ (but that was expected, as
profiling the game tells that u_upload_data < 1% cpu time)

So I guess the handling of EXT_compiled_vertex_array is useless - maybe with 1
exception : lower end video cards with lower bandwidth ? I can't test this
scenario here, as I only have AMD HD4850.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

* [Bug 37142] Too much vertex buffers uploads
  2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
                   ` (8 preceding siblings ...)
  2011-05-17 12:33 ` bugzilla-daemon
@ 2014-04-13 11:20 ` bugzilla-daemon
  9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2014-04-13 11:20 UTC (permalink / raw)
  To: dri-devel


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

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

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

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

--- Comment #8 from Marek Olšák <maraeo@gmail.com> ---
Closing. Ian's comment explains it:

> EXT_compiled_vertex_array is dead.  It has been dead for almost 10 years. 
> No new applications should use it, and old applications that use it should
> be fast enough on modern hardware.

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

[-- Attachment #1.2: Type: text/html, Size: 2210 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] 11+ messages in thread

end of thread, other threads:[~2014-04-13 11:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-12 15:11 [Bug 37142] New: Too much vertex buffers uploads bugzilla-daemon
2011-05-12 15:15 ` [Bug 37142] " bugzilla-daemon
2011-05-12 17:54 ` bugzilla-daemon
2011-05-12 17:55 ` bugzilla-daemon
2011-05-12 19:55 ` bugzilla-daemon
2011-05-12 20:19 ` bugzilla-daemon
2011-05-12 20:27 ` bugzilla-daemon
2011-05-13  7:11 ` bugzilla-daemon
2011-05-13 16:22 ` bugzilla-daemon
2011-05-17 12:33 ` bugzilla-daemon
2014-04-13 11:20 ` 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.