Bug 61690 - [r600g][rs780] Graphic issue on PCSX2 (float texture rounding)
Summary: [r600g][rs780] Graphic issue on PCSX2 (float texture rounding)
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: 9.0
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
Depends on:
Reported: 2013-03-02 15:32 UTC by LukK
Modified: 2019-09-18 19:02 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

trace of "Checking MEMORY CARD" first message (2.81 MB, text/plain)
2013-03-02 15:32 UTC, LukK
Xorg log (43.24 KB, text/plain)
2013-03-02 16:00 UTC, LukK
dmesg... (54.45 KB, text/plain)
2013-03-02 16:01 UTC, LukK
texture rounded (11.32 KB, application/octet-stream)
2013-03-14 12:17 UTC, gregory.hainaut
texture good (15.57 KB, text/plain)
2013-03-14 12:36 UTC, gregory.hainaut

Description LukK 2013-03-02 15:32:27 UTC
Created attachment 75782 [details]
trace of "Checking MEMORY CARD" first message

Upgrading Mesa 8 to 9.1 got me a graphic problem with PCSX2 emulator
Attached an apitrace's trace generated in Mesa 8.0.4.  When I replay it on Mesa 9.1 I got bad rendering, some shapes appar to be messed up.



"configure" Mesa 8.0.4 flags:
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --libdir=/usr/lib \
  --mandir=/usr/man \
  --docdir=/usr/doc/mesa-$VERSION \
  --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  --with-dri-drivers=i915,i965,nouveau,r200,radeon,swrast \
  --with-gallium-drivers=nouveau,swrast,r300,r600 \
  --enable-gallium-llvm \

"configure" Mesa 9.1 flags:
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --mandir=/usr/man \
  --docdir=/usr/doc/mesa-$VERSION \
  --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  --with-dri-drivers=i915,i965,intel,nouveau,r200,radeon,swrast \
  --with-gallium-drivers=nouveau,swrast,r300,r600 \
  --enable-gallium-llvm \
  --enable-shared-glapi \
Comment 1 Alex Deucher 2013-03-02 15:41:09 UTC
Does mesa 9.0 work ok? Can you bisect? Please attach your xorg log and dmesg output.
Comment 2 LukK 2013-03-02 16:00:51 UTC
Created attachment 75785 [details]
Xorg log
Comment 3 LukK 2013-03-02 16:01:27 UTC
Created attachment 75786 [details]
Comment 4 LukK 2013-03-02 16:08:09 UTC
(In reply to comment #1)
> Does mesa 9.0 work ok? Can you bisect? Please attach your xorg log and dmesg
> output.

No mesa 9.0 don't work,also I tried mesa 8.0.4 with "--texture-float" and give me the same bad rendering. 
OK, I can test but i have my times..
Comment 5 LukK 2013-03-05 21:09:31 UTC
OK, bisected.

914b4bb80c28c81101941d5533361ae0108eb771 is the first bad commit
commit 914b4bb80c28c81101941d5533361ae0108eb771
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Feb 29 13:09:51 2012 +0100

    r600g: add support for missing colorbuffer formats
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Christian König <christian.koenig@amd.com>

:040000 040000 05adc23b1529b09afffcde046bd76f4417339138 90f988f39ed5ed836c38d6509d9ddcdbdc318463 M      src

Changed to 9.0 version.
Comment 6 LukK 2013-03-09 15:06:53 UTC
I guess with "ARB_texture_float" every version give me the graphic issue.

8e28d842d192e69ba8cae4f9754766a26ae8c739 is the first bad commit
commit 8e28d842d192e69ba8cae4f9754766a26ae8c739
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Feb 16 00:40:37 2011 +0100

    st/mesa: convert Mesa float formats to Gallium
    Squashed commit of the following:
    Author: Marek Olšák <maraeo@gmail.com>
        st/mesa: require RGBA16F and RGBA32F to be renderable
        st/mesa: fix L32F and L16F format translation
        st/mesa: also convert the R/RG float formats
    commit 49a9948b6a81b7d813304d081139d98e95ba5d1a
    Author: Luca Barbieri <luca@luca-barbieri.com>                                                                           
    Date:   Fri Aug 20 10:36:17 2010 +0200                                                                                   
        mesa/st: enable ARB_texture_float if supported formats allow it                                                      
    commit 7383632f7b6f9021b65f4973b7e7c99f0e8ce9b2                                                                          
    Author: Luca Barbieri <luca@luca-barbieri.com>                                                                           
    Date:   Tue Aug 24 21:00:46 2010 +0200                                                                                   
        mesa/st: support ARB_texture_float internal formats
    commit 7c362cc06982586c2d29fac55f6bcc4bcd1550b5
    Author: Luca Barbieri <luca@luca-barbieri.com>
    Date:   Tue Aug 24 21:00:33 2010 +0200
        mesa/st: convert L/A/I floating point formats
Comment 7 gregory.hainaut 2013-03-14 12:17:04 UTC
Created attachment 76524 [details]
texture rounded
Comment 8 gregory.hainaut 2013-03-14 12:36:37 UTC
Created attachment 76525 [details]
texture good

Hello Alex,

I'm a developper of PCSX2 and made some tests on my side. I think I understand the cause of the bad rendering. 

At the beginning of the program we upload a float texure (see attachment). I ask Lukk to dump the texture with glGetTexImage (see attachment). If you compare both textures, we will see that some floats were rounded.
I upload Lukk's texture and I can confirm you that we got same rendering issue. 

The upload of the texture is fine on my HD5770 with mesa 8.0.5. So the issue feel chip specific.

Comment 9 GitLab Migration User 2019-09-18 19:02:14 UTC
-- 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/431.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.