Announcement

Collapse
No announcement yet.

Radeon VRAM Optimizations Coming, But Help Is Needed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #91
    Well I only have the memory trace, and it's very well behaved. There is close to no buffer trashing, and a very small amount of buffers created in total. So clearly they cared about memory performance.

    Comment


    • #92
      Reading the bug report, the linux port uses huge vertex arrays instead of VBOs. Well then, in that case the optimization in mesa is good

      Comment


      • #93
        In the newly sent traces, Avadon was another great example. During a 33-minute run, it only created 2099 buffers. Compare this with some of the worst, which did 200k buffers in five minutes.

        Comment


        • #94
          200k is too many. What app does that?

          Comment


          • #95
            The worst offenders were some of the commercial games. Sorted top-10:

            Code:
            minecraft1.bin          233112 buffers
            tf2_1.bin               163790 buffers
            etqw1.bin               163691 buffers
            minecraft2.bin          121314 buffers
            left4dead2_2.bin        107979 buffers
            css1.bin                101289 buffers
            assassin2_1.bin         96464 buffers
            blackplague1.bin        90760 buffers
            dungeondefenders1.bin   89381 buffers
            tf2_2.bin               83916 buffers
            Note that the trace length varies, so this is a rough measure. For more details on each trace see the INDEX file in git.

            Comment


            • #96
              There are other Numbers available like how many reports you got etc..?

              Comment


              • #97
                Originally posted by curaga View Post
                The worst offenders were some of the commercial games. Sorted top-10:

                Code:
                minecraft1.bin          233112 buffers
                tf2_1.bin               163790 buffers
                etqw1.bin               163691 buffers
                minecraft2.bin          121314 buffers
                left4dead2_2.bin        107979 buffers
                css1.bin                101289 buffers
                assassin2_1.bin         96464 buffers
                blackplague1.bin        90760 buffers
                dungeondefenders1.bin   89381 buffers
                tf2_2.bin               83916 buffers
                Note that the trace length varies, so this is a rough measure. For more details on each trace see the INDEX file in git.
                Just a guess, but they might batch geometry (per frame) allocating new buffers while discarding old ones (not reusing them). I've seen code that does this to reduce the number of draw calls. This could result in a few dozen buffer allocations per frame.

                Comment


                • #98
                  Originally posted by Nille View Post
                  There are other Numbers available like how many reports you got etc..?
                  What do you want to know? I currently have 96 traces, but people are still sending some (thanks! Very soon I won't be able to take more, probably will ask oibaf to remove it after this week).

                  @log0

                  I bet Minecraft is just plain badly written. The Source games use a DX-GL wrapper which likely causes some of that.

                  Just a guess, but they might batch geometry (per frame) allocating new buffers while discarding old ones (not reusing them). I've seen code that does this to reduce the number of draw calls. This could result in a few dozen buffer allocations per frame.
                  That's fairly stupid, because the saved cpu overhead is eaten up by the allocation cpu overhead.

                  Comment


                  • #99
                    Originally posted by curaga View Post
                    The worst offenders were some of the commercial games. Sorted top-10:

                    Code:
                    minecraft1.bin          233112 buffers
                    tf2_1.bin               163790 buffers
                    etqw1.bin               163691 buffers
                    minecraft2.bin          121314 buffers
                    left4dead2_2.bin        107979 buffers
                    css1.bin                101289 buffers
                    assassin2_1.bin         96464 buffers
                    blackplague1.bin        90760 buffers
                    dungeondefenders1.bin   89381 buffers
                    tf2_2.bin               83916 buffers
                    Note that the trace length varies, so this is a rough measure. For more details on each trace see the INDEX file in git.
                    I measured the buffer counts in ETQW long time ago and I think it used only 400 buffers per frame or so. Note that some buffers are allocated internally by the driver, like shaders, including vertex fetch shaders (R600-Cayman), resource descriptors (SI+), queries, fences, and transform feedback counters. There also may be a few buffers allocated by st/mesa and Gallium util code. Those are all buffers which are not allocated by apps directly.

                    That's not all. The flag PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE (= GL_MAP_INVALIDATE_BUFFER_BIT) usually reallocates the buffer being mapped. The flag PIPE_TRANSFER_DISCARD_RANGE (= GL_MAP_INVALIDATE_RANGE_BIT) usually allocates a temporary buffer for it assist with the transfer. Texture transfers do the same even without the flag.

                    Finally, it's quite common for games to load objects which are getting close to the player and unload objects which are getting further away from the player. This may result in a lot of buffer allocations and deallocations during game play.

                    Comment


                    • While you're correct that some are created by the driver, from the memory manager's POV ETQW is a bad app.

                      Comment

                      Working...
                      X