https://bugs.freedesktop.org/show_bug.cgi?id=55256
Priority: medium Bug ID: 55256 Assignee: dri-devel@lists.freedesktop.org Summary: r600g R600_LLVM=1 bad rendering (light blue instead of grey) Severity: normal Classification: Unclassified OS: Linux (All) Reporter: edwin+mesa@etorok.net 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.
https://bugs.freedesktop.org/show_bug.cgi?id=55256
--- Comment #1 from Török Edwin edwin+mesa@etorok.net --- 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.
https://bugs.freedesktop.org/show_bug.cgi?id=55256
--- Comment #2 from Török Edwin edwin+mesa@etorok.net --- Created attachment 67594 --> https://bugs.freedesktop.org/attachment.cgi?id=67594&action=edit bad.png
https://bugs.freedesktop.org/show_bug.cgi?id=55256
--- Comment #3 from Török Edwin edwin+mesa@etorok.net --- Created attachment 67595 --> https://bugs.freedesktop.org/attachment.cgi?id=67595&action=edit good.png
https://bugs.freedesktop.org/show_bug.cgi?id=55256
--- Comment #4 from Török Edwin edwin+mesa@etorok.net --- 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.
https://bugs.freedesktop.org/show_bug.cgi?id=55256
Török Edwin edwin+mesa@etorok.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #67594|text/plain |image/png mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=55256
Török Edwin edwin+mesa@etorok.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #67595|text/plain |image/png mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=55256
Török Edwin edwin+mesa@etorok.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #67593|text/plain |application/octet-stream mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=55256
Török Edwin edwin+mesa@etorok.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #67592|text/plain |application/octet-stream mime type| |
https://bugs.freedesktop.org/show_bug.cgi?id=55256
Török Edwin edwin+mesa@etorok.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Hardware|Other |x86-64 (AMD64) CC| |tstellar@gmail.com Component|Drivers/DRI/R600 |Drivers/Gallium/r600
--- Comment #5 from Török Edwin edwin+mesa@etorok.net --- Sorry, chose wrong component: bug is about r600g.
https://bugs.freedesktop.org/show_bug.cgi?id=55256
--- Comment #6 from Török Edwin edwin+mesa@etorok.net --- 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' }
https://bugs.freedesktop.org/show_bug.cgi?id=55256
--- Comment #7 from Alex Deucher agd5f@yahoo.com --- 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)
https://bugs.freedesktop.org/show_bug.cgi?id=55256
GitLab Migration User gitlab-migration@fdo.invalid changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |MOVED Status|NEW |RESOLVED
--- Comment #8 from GitLab Migration User gitlab-migration@fdo.invalid --- -- 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.
dri-devel@lists.freedesktop.org