Skip to contentSkip to conversation

New: r600g R600_LLVM=1 bad rendering (light blue instead of grey)

Bug 55256 [email protected] 1 participant 13 messages Sep 23, 2012 – Sep 18, 2019

lore
Share & tools
lore
#0 lore raw

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

Priority: medium
Bug ID: 55256
Assignee: [email protected]
Summary: r600g R600_LLVM=1 bad rendering (light blue instead of
grey)
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: Other
Status: NEW
Version: git
Component: Drivers/DRI/R600
Product: Mesa

Created attachment 67592
--> https://bugs.freedesktop.org/attachment.cgi?id=67592&action=edit
apitrace

Attached is an apitrace, and screenshots.

Bad behaviour with --enable-r600-llvm-compiler:
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV730 OpenGL version string: 3.0 Mesa 9.1-devel (git-fb40f88) OpenGL shading language version string: 1.30

If you look at the 'bad.png' screenshot you'll see that the 4th column is light blue. It should be grey.
With R600_LLVM=0 the good behaviour is seen: good.png.

See the apitrace for the full shader, here is the relevant bit:

    else if (gl_FragCoord.x < 640)
        color = vec4(1.0f, 1.0f, 1.0f, 1.0f);//white
    [...]
        vec4 color0, color1, color2, color3;
        if (gl_FragCoord.y < 200) {
            color0 = color1 = color2 = color;//75%
   [...]
        } else if (xmod < 55 || xmod >= 105 ||
                   ymod < 75 || ymod >= 125) {
            // real color
            // TODO: buggy on r600g with LLVM?
            gl_FragColor = (color0 + color1 + color2 + color3) / 4.0f;

P.S.: the shader is not optimal, most of the branches could be moved out of it, I haven't tried to minimize the testcase though.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

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

--- Comment #1 from Török Edwin <[email protected]> --- Created attachment 67593
--> https://bugs.freedesktop.org/attachment.cgi?id=67593&action=edit
another.trace

Another apitrace that doesn't use 3.0 features and can thus be replayed with LIBGL_ALWAYS_SOFTWARE too.
The software rendered shows the same (good) behaviour as the R600_LLVM=0.
Note: the color values have a different gamma in this trace.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

--- Comment #2 from Török Edwin <[email protected]> --- Created attachment 67594
--> https://bugs.freedesktop.org/attachment.cgi?id=67594&action=edit
bad.png

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

--- Comment #3 from Török Edwin <[email protected]> --- Created attachment 67595
--> https://bugs.freedesktop.org/attachment.cgi?id=67595&action=edit
good.png

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

--- Comment #4 from Török Edwin <[email protected]> --- Graphics card type:
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV730 PRO [Radeon HD 4650]

xorg.conf:
Section "Device"

        Identifier  "Radeon"
        Driver      "radeon"
        Option      "ColorTiling2D" "True"
        BusID       "PCI:1:0:0"

EndSection

kernel: Linux debian 3.6.0-rc6 x86_64

Mesa build flags:
./configure --prefix=/opt/xorg --with-driver=dri --with-state-trackers="egl dri" --with-dri-drivers=i965 --with-gallium-drivers="r600 swrast" LLVM_CONFIG=/usr/bin/llvm-config-3.1 --enable-r600-llvm-compiler --enable-openvg --enable-vdpau --enable-glx-tls --enable-shared-glapi --enable-texture-float --enable-egl --enable-gallium-egl --enable-gbm --enable-gallium-gbm --with-egl-platforms=x11,drm,fbdev --enable-gles2

/opt/xorg has xserver, drm, libkms, etc. from git.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

Török Edwin <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #67594|text/plain                  |image/png
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

Török Edwin <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #67595|text/plain                  |image/png
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

Török Edwin <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #67593|text/plain                  |application/octet-stream
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

Török Edwin <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #67592|text/plain                  |application/octet-stream
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#9 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

Török Edwin <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

           Hardware|Other                       |x86-64 (AMD64)
                 CC|                            |[email protected]
          Component|Drivers/DRI/R600            |Drivers/Gallium/r600

--- Comment #5 from Török Edwin <[email protected]> --- Sorry, chose wrong component: bug is about r600g.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

--- Comment #6 from Török Edwin <[email protected]> --- Created attachment 67624
--> https://bugs.freedesktop.org/attachment.cgi?id=67624&action=edit
bug.shader_test

A small piglit .shader_test that reproduces the bug:

$ bin/shader_runner -auto bug.shader_test
Probe at (0,0)
  Expected: 0.500000 0.500000 0.500000 1.000000
  Observed: 0.501961 1.000000 1.000000 1.000000
PIGLIT: {'result': 'fail' }
$ R600_LLVM=0 bin/shader_runner -auto bug.shader_test
PIGLIT: {'result': 'pass' }
$ LIBGL_ALWAYS_SOFTWARE=1 bin/shader_runner -auto bug.shader_test
PIGLIT: {'result': 'pass' }
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

--- Comment #7 from Alex Deucher <[email protected]> ---
There are some asic specific shader instruction behaviors for r6xx/r7xx chips that need to be ported to the LLVM backend. A couple that come to mind:
- Trig functions (see tgsi_setup_trig() in r600_shader.c)
- AR register handling (see load_ar() in r600_asm.c)

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

[Bug 55256] r600g R600_LLVM=1 bad rendering (light blue instead of grey)

In reply to [email protected]

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

GitLab Migration User <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |MOVED
             Status|NEW                         |RESOLVED

--- Comment #8 from GitLab Migration User <[email protected]> --- -- 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/419.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel