Bug 58666 - rv670 + llvm = errors.
Summary: rv670 + llvm = errors.
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-22 23:46 UTC by Andy Furniss
Modified: 2013-02-01 22:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
R600_DUMP_SHADERS=2 ./gears &>gears-dump (102.78 KB, text/plain)
2013-02-01 15:46 UTC, Andy Furniss
Details
Possible Fix (1.08 KB, text/plain)
2013-02-01 16:01 UTC, Tom Stellard
Details

Description Andy Furniss 2012-12-22 23:46:55 UTC
I've only just tested this AGP HD3850 card with tstellar LLVM (or any llvm) as it's been out of the PC since Feb.

Both last week and now with updated llvm/mesa gits, running anything eg. gears will just flood -

EE r600_asm.c:122 r600_bytecode_get_num_operands - Need instruction operand number for 0xc.

Works OK with R600_LLVM=0

This was tested with drm-fixes kernel.
Comment 1 Andy Furniss 2013-02-01 14:08:28 UTC
Since mesa commit -

022122ee63b8a00afc23eaa347df934a79fb1d4c

r600g: use tables with ISA info v3

I can run demos without flooding errors, but most of them don't render anything.

The ones that do render something resemble what they should look like are all flawed/distorted eg, "textures" is almost normal but the actual textures are repeated rather than scaled to fit the surfaces.
Comment 2 Tom Stellard 2013-02-01 15:06:51 UTC
Can you run one of the demos and post the output with the environment variable R600_DUMP_SHADERS=2
Comment 3 Andy Furniss 2013-02-01 15:46:17 UTC
Created attachment 74051 [details]
R600_DUMP_SHADERS=2 ./gears &>gears-dump

R600_DUMP_SHADERS=2 ./gears which doesn't render anything, but appears to be running OK eg. outputting sane fps stats and quitting normally with Esc.
Comment 4 Tom Stellard 2013-02-01 16:01:21 UTC
Created attachment 74053 [details]
Possible Fix

It looks like we were telling the backend that RV670 is an R700 GPU, when it is really an R600.  R600 chips uses a slightly different instruction encoding.  This patch should fix it, can you test?
Comment 5 Andy Furniss 2013-02-01 17:41:39 UTC
(In reply to comment #4)
> Created attachment 74053 [details]
> Possible Fix
> 
> It looks like we were telling the backend that RV670 is an R700 GPU, when it
> is really an R600.  R600 chips uses a slightly different instruction
> encoding.  This patch should fix it, can you test?

Yes, this fixes it - demos are all OK (well at least the same as my rv790) and a brief run of etqw worked.
Comment 6 Tom Stellard 2013-02-01 22:47:32 UTC
Fixed by commit 	257006e2a4201c11ca5f800a74ac4aaf62a7bfc1


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.