Bug 55217 - [RS880] opengl not working anymore
[RS880] opengl not working anymore
Status: RESOLVED FIXED
Product: DRI
Classification: Unclassified
Component: DRM/Radeon
unspecified
x86-64 (AMD64) Linux (All)
: medium normal
Assigned To: Default DRI bug account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-22 09:42 UTC by Michael Lange
Modified: 2012-09-28 05:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (65.61 KB, text/plain)
2012-09-22 09:48 UTC, Michael Lange
no flags Details
Xorg.0.log (43.92 KB, text/plain)
2012-09-22 09:49 UTC, Michael Lange
no flags Details
R600_DUMP_SHADERS=1 (11.97 KB, text/plain)
2012-09-23 16:24 UTC, Michael Lange
no flags Details
R600_DUMP_SHADERS=1 (13.33 KB, text/plain)
2012-09-23 16:32 UTC, Michael Lange
no flags Details
Possible fix (1.86 KB, patch)
2012-09-23 17:40 UTC, Tom Stellard
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Lange 2012-09-22 09:42:51 UTC
after updating mesa to latest git, i can not using opengl-apps anymore

running glxgears give the following error message:
EE r600_asm.c:121 r600_bytecode_get_num_operands - Need instruction operand number for 0xc

testet with kernel 3.5.1 and 3.6.0-rc6

using xorg-server-1.12.2 and libdrm, mesa, xf86-video-ati from git

removing xorg.conf gives the same error
Comment 1 Michael Lange 2012-09-22 09:48:57 UTC
Created attachment 67541 [details]
dmesg
Comment 2 Michael Lange 2012-09-22 09:49:29 UTC
Created attachment 67542 [details]
Xorg.0.log
Comment 3 rboudot 2012-09-22 13:52:29 UTC
Me too


Also Unity on Ubuntu 12.04 displays black screen with only the mouse pointer. Switching to another virtual console or logging in Unity 2D works though.

Radeon HD3450 (RV620) on Ubuntu 12.04 + OIBAF PPA
Comment 4 Alex Deucher 2012-09-22 14:52:35 UTC
Can you bisect?
Comment 5 Michael Lange 2012-09-22 17:32:05 UTC
sorry, but which PATH environment variables i have to set?

LD_LIBRARY_PATH="~/mesa/src/glx" glxgears
does not work
Comment 6 Alex Deucher 2012-09-22 18:40:41 UTC
Bisect is a git option to identify what commit caused a problem.  Google for "git bisect".
Comment 7 Michael Lange 2012-09-22 19:33:01 UTC
yes ... i have google for it ;)
so i should bisect mesa-git, right?

* i have clone the mesa-git with git clone git://anongit.freedesktop.org/git/mesa/mesa
* cd mesa
* git checkout 9aa8bac9 (i think this was working "date 2012-09-19")
* ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --disable-dependency-tracking --enable-dri --enable-glx --enable-texture-float --disable-debug --enable-egl --enable-gbm --enable-gles1 --enable-gles2 --enable-glx-tls --disable-osmesa --enable-asm --enable-shared-glapi --enable-xa --enable-xorg --with-dri-drivers= --with-gallium-drivers=,swrast,r600 --with-egl-platforms=x11,drm --enable-gallium-egl --enable-gallium-g3dvl --enable-gallium-llvm --disable-openvg --enable-r600-llvm-compiler --disable-vdpau --enable-xvmc
* make
* now i would like testing mesa, but how? running glxgears uses the system-libs from /usr/lib64.


with 
EGIT_COMMIT="9aa8bac98b823e8783bc3a06a6e5b23fbf8d87fb" emerge mesa
i got a working mesa.
Comment 8 Michael Lange 2012-09-22 19:35:57 UTC
my system is working and running with a mesa-build from 2012-09-19
how i could test the mesa-build in my home-dir?
Comment 9 Matt Turner 2012-09-22 20:34:51 UTC
(In reply to comment #8)
> my system is working and running with a mesa-build from 2012-09-19
> how i could test the mesa-build in my home-dir?

You can set where to look for shared libraries by settings LD_LIBRARY_PATH=... and where to look for DRI drivers with LIBGL_DRIVERS_PATH=...

E.g., LD_LIBRARY_PATH=<directory where libGL.so.1 lives> LIBGL_DRIVERS_PATH=<directory where r600_dri.so lives> glxgears

will run glxgears with your new Mesa.
Comment 10 Marek Olšák 2012-09-22 20:59:42 UTC
I can't reproduce this. Mesa master on RS880 is working fine here.
Comment 11 Fabio Pedretti 2012-09-23 07:07:12 UTC
(In reply to comment #10)
> I can't reproduce this. Mesa master on RS880 is working fine here.

A quick search in the git log returned this:
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b4aefd3c9c1b04832306b8114b3f2007318f087

Did you compile with --enable-r600-llvm-compiler ? It's enabled in my PPA.
Comment 12 kowalski marcin 2012-09-23 15:21:31 UTC
i'm currently experiencing this with rs780 and darkplaces. I only get black screen, and logs are filled with this error. I have an llvm-enabled build of mesa.

This is on current git @ fb40f88338b6af23faae03ced5906add8507db26
Comment 13 Michael Lange 2012-09-23 15:39:54 UTC
(In reply to comment #9)
> 
> E.g., LD_LIBRARY_PATH=<directory where libGL.so.1 lives>
> LIBGL_DRIVERS_PATH=<directory where r600_dri.so lives> glxgears
> 
> will run glxgears with your new Mesa.

thanks, this works

currently bisecting mesa - two steps to go
Comment 14 Tom Stellard 2012-09-23 16:08:30 UTC
If you are using the llvm compiler setting the environment variable R600_LLVM=0 will cause the driver to fall back to the TGSI compiler and should fix the rendering errors.

It would be helpful if someone could run one of the affected programs with the R600_DUMP_SHADES=1 environment variable set and post the output.
Comment 15 Tom Stellard 2012-09-23 16:09:21 UTC
(In reply to comment #14)
> If you are using the llvm compiler setting the environment variable
> R600_LLVM=0 will cause the driver to fall back to the TGSI compiler and
> should fix the rendering errors.
> 
> It would be helpful if someone could run one of the affected programs with
> the R600_DUMP_SHADES=1 environment variable set and post the output.

Sorry, typo above.  The environment variable is R600_DUMP_SHADERS=1
Comment 16 Michael Lange 2012-09-23 16:18:08 UTC
bisecting mesa comes to this

0e0c21e00ee80bcff67e37ec86b97d6c25db066a is the first bad commit
commit 0e0c21e00ee80bcff67e37ec86b97d6c25db066a
Author: Michal Sciubidlo <michal.sciubidlo@gmail.com>
Date:   Wed Sep 12 08:57:01 2012 +0200

    radeon/llvm: Emit ISA for ALU instructions in the R600 code emitter
    
    Signed-off-by: Tom Stellard <thomas.stellard@amd.com>

:040000 040000 de615a99537b02f3e978f285393559da27d8c1da 2e75e2c1ba7912acfdbbb38c65c3c21831b258da M	src


configure is in comment 7
Comment 17 Michael Lange 2012-09-23 16:24:59 UTC
Created attachment 67582 [details]
R600_DUMP_SHADERS=1
Comment 18 Michael Lange 2012-09-23 16:32:31 UTC
Created attachment 67583 [details]
R600_DUMP_SHADERS=1

ahhh ... rtf-file - i hate this texteditor from macosx

nano make this right ;)
Comment 19 Michael Lange 2012-09-23 16:46:28 UTC
in case it is important, i have set some environment variables

belly@jelly ~/mesa $ env | grep R600
R600_STREAMOUT=1
R600_HYPERZ=1
R600_GLSL130=1
R600_TILING=1
R600_SURF=1

this was set for a few months to test something, i forgot to reset this
Comment 20 Tom Stellard 2012-09-23 17:40:14 UTC
Created attachment 67586 [details] [review]
Possible fix

Does this patch fix the problem?
Comment 21 Michael Lange 2012-09-23 20:40:02 UTC
(In reply to comment #20)
> Created attachment 67586 [details] [review] [review]
> Possible fix
> 
> Does this patch fix the problem?

your patch works
tested with the latest mesa-version from git
Comment 22 Michel Dänzer 2012-09-24 10:03:20 UTC
(In reply to comment #20)
> Created attachment 67586 [details] [review] [review]
> Possible fix

Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Comment 23 Fabio Pedretti 2012-09-28 05:07:09 UTC
Fixed with 92b033a89ebd46d640ecb2592159087a87e5516e .