Announcement

Collapse
No announcement yet.

r600/r700 libdrm, mesa, and radeon performance patches

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

  • r600/r700 libdrm, mesa, and radeon performance patches

    I wrote some patches to improve performance. You'll need to apply them to the git master of each project as of March 17 2010.


    http://filebin.ca/kxvvzh/libdrm_radeon_cs_h.patch
    http://filebin.ca/cuxmeu/mesa_patch_Mar_17_2010.patch
    http://filebin.ca/bcpfto/radeon_Mar_17_2010.patch

    these instructions should work on gentoo other distributions are on your own

    Instructions

    "mkdir experimental"
    "cd experimental"
    "git clone git://anongit.freedesktop.org/mesa/drm"
    "cd drm"

    copy the file libdrm_radeon_cs_h.patch to this directory

    "patch -p1 <libdrm_radeon_cs_h.patch"
    "./autogen.sh --prefix=/usr --exec-prefix=/ --disable-intel"
    "make -j3"
    "sudo make install"

    "cd .."
    "git clone git://anongit.freedesktop.org/git/mesa/mesa"
    "cd mesa"

    copy the file mesa_patch_Mar_17_2010.patch to this directory
    "patch -p1 <mesa_patch_Mar_17_2010.patch"
    "DRI_DRIVERS="r600,swrast""
    "./autogen.sh --prefix=/usr --with-dri-drivers=$DRI_DRIVERS --disable-gallium"
    "make -j3"
    "sudo make install"

    "cd .."
    "git clone git://anongit.freedesktop.org/xorg/driver/xf86-video-ati"
    "cd xf86-video-ati"

    copy the file radeon_Mar_17_2010.patch to this directory

    "patch -p1 <radeon_Mar_17_2010.patch"
    "./autogen --prefix=/usr"
    "make -j3"
    "make install"


    let me know if you see an improvement. glxgears is not a benchmark!!!

  • #2
    someone asked that I post these patches in an area that could be viewed in a browser. So with out much fanfare.....

    libdrm_radeon_cs_h.patch http://pastebin.ca/1844125

    mesa_patch_Mar_17_2010.patch http://pastebin.ca/1844133

    radeon_Mar_17_2010.patch http://pastebin.ca/1844139

    Comment


    • #3
      Cool - Might I ask for some performance numbers? Also, what did you change to speed things up (might make it easier for some devs to chime in).

      Comment


      • #4
        I get about a 5 to 10% increase in minimum FPS on Torcs. To speed things up I rewrote some macros thus eliminating redundant checks from each instance of a macro. The changes are to the code that writes the GPU instructions to the buffers that get DMAed into the GPU.

        I have also verified that the code generated by the changes produces clean assembly instruction sequences.

        in short Pretty C code in to the compiler results in ugly code out of a the compiler. Ugly C code in to the compiler results in pretty code out of the compiler

        Comment


        • #5
          Cool thread. I'm quite satisfied with my system's performance at the moment but I'm sure it'll please a few hardcore benchmarkers.

          Originally posted by Obscene_CNN View Post
          these instructions should work on gentoo
          Actually on Gentoo you should be able to simply add the patches to the corresponding ebuilds, which would make it easier and cleaner to apply.

          Out of curiosity, what kind of improvment could one expect in average desktop use? I assume it wouldn't speed up desktop effects as much as pure 3D stuff, right?

          Comment


          • #6
            Originally posted by Obscene_CNN View Post
            in short Pretty C code in to the compiler results in ugly code out of a the compiler. Ugly C code in to the compiler results in pretty code out of the compiler
            did you try compiling with higher -O options? usually these automatically do the right thing regarding "inline" and instruction reordering. Furthermore a profiled build should be just as good as "likely" and "unlikely"...

            Comment


            • #7
              Originally posted by that guy View Post
              Actually on Gentoo you should be able to simply add the patches to the corresponding ebuilds, which would make it easier and cleaner to apply.
              There is even no need for that, just use bashrcng-patching
              ## VGA ##
              AMD: X1950XTX, HD3870, HD5870
              Intel: GMA45, HD3000 (Core i5 2500K)

              Comment


              • #8
                Originally posted by darkbasic View Post
                There is even no need for that, just use bashrcng-patching
                What's that?

                Comment


                • #9
                  Have you considered sending these patches to the respective freedesktop.org mailing lists? IIRC they do only add patches that were discussed on the mailing lists. Even patches in bug reports that are reported "working fine" are not enough, someone has to send them to their developers mailing lists.

                  Comment


                  • #10
                    Originally posted by ivanovic View Post
                    Have you considered sending these patches to the respective freedesktop.org mailing lists? IIRC they do only add patches that were discussed on the mailing lists. Even patches in bug reports that are reported "working fine" are not enough, someone has to send them to their developers mailing lists.
                    It has already been stated that code like this will not be included upstream. It's just too ugly :P

                    Comment

                    Working...
                    X