Bug 33389 - [RADEON:KMS:R600G] amnesia (closed source game) segfaults
Summary: [RADEON:KMS:R600G] amnesia (closed source game) segfaults
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-23 14:55 UTC by roughl
Modified: 2011-06-04 16:18 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
render test logfile (125.38 KB, text/x-log)
2011-01-31 13:07 UTC, roughl
Details
render test logfile with llvm-pipe (127.44 KB, text/x-log)
2011-01-31 13:17 UTC, roughl
Details

Description roughl 2011-01-23 14:55:32 UTC
When trying to run Amnesia (http://www.amnesiagame.com/#demo) on my system it gives me this output:
[1]    619 segmentation fault  ./Amnesia.bin64

It runs fine until the loading screen and then crashes.

Steps to reproduce:
Run Amnesia with r600 driver

Additional information:
It doesn't crash if I'm using the llvm-pipe driver. I've tested it at the lowest possible graphics settings.

Backtrace:
#0  0x000000000082ab08 in hpl::iParticleEmitter::GetMaterial() ()
#1  0x0000000000805de2 in hpl::iRenderer::RenderObjectZAndAddToRenderList(hpl::iRenderable*) ()
#2  0x0000000000805e59 in hpl::iRenderer::RenderObjectZAndAddToRenderListStaticCallback(hpl::iRenderer*, hpl::iRenderable*) ()
#3  0x0000000000807d8f in hpl::iRenderer::RenderAndAddNodeObjects(hpl::iRenderableContainerNode*, bool (*)(hpl::iRenderer*, hpl::iRenderable*), unsigned int) ()
#4  0x000000000080808a in hpl::iRenderer::CheckForVisibleObjectsAddToListAndRenderZ(hpl::cVisibleRCNodeTracker*, unsigned int, unsigned int, bool, bool (*)(hpl::iRenderer*, hpl::iRenderable*)) ()
#5  0x00000000007e4841 in hpl::cRendererDeferred::RenderObjects() ()
#6  0x0000000000809334 in hpl::iRenderer::Render(float, hpl::cFrustum*, hpl::cWorld*, hpl::cRenderSettings*, hpl::cRenderTarget*, bool, std::list<hpl::iRendererCallback*, std::allocator<hpl::iRendererCallback*> >*) ()
#7  0x000000000082496d in hpl::cScene::Render(float, unsigned int) ()
#8  0x0000000000925423 in hpl::cEngine::Run() ()
#9  0x0000000000689890 in hplMain(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#10 0x000000000090ff29 in main ()

Version Information:
mesa: git 835c4ea1053730c8eea98337c9da1b14fcff6b5e
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD RV770
OpenGL version string: 2.1 Mesa 7.11-devel
OpenGL shading language version string: 1.20
Comment 1 Sven Arvidsson 2011-01-23 15:13:18 UTC
Amnesia was only recently made playable with r300g, so it might be a bit early for r600g.

Anyway, the Amnesia devs have published a compatability test for the game called RendererFeatTest which is probably a good start for anyone working on supporting this: 

http://frictionalgames.com/forum/thread-3656.html
Comment 2 roughl 2011-01-31 13:06:50 UTC
(In reply to comment #1)
> Amnesia was only recently made playable with r300g, so it might be a bit early
> for r600g.
> 
> Anyway, the Amnesia devs have published a compatability test for the game
> called RendererFeatTest which is probably a good start for anyone working on
> supporting this: 
> 
> http://frictionalgames.com/forum/thread-3656.html

I've tested the compatibility test and it did run with a lot of errors:
$ grep ERROR render_test.log
ERROR: Could not create GL texture 
ERROR: Could not create GL texture 
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture /home/roughl/Downloads/RendererFeatTest64/data/cubemap_evening.dds
ERROR: Couldn't load material 'H:/HPL_2/RendererFeatTest/data/test_refraction.mat'
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds
ERROR: Could not create GL texture cubemap_evening.dds

The cubemap_evening.dds erros have probably to do with missing S3TC functionality in the r600 driver.
Comment 3 roughl 2011-01-31 13:07:48 UTC
Created attachment 42774 [details]
render test logfile
Comment 4 roughl 2011-01-31 13:16:46 UTC
if running the test with llvm-pipe most of the test's work, and I get less errors in the logfile:
egrep "(ERROR|WARNING)" render_test.log
ERROR: Frame buffer 'ShadowMap1024x1024_0_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap512x512_0_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap512x512_1_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap512x512_2_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap512x512_3_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap256x256_0_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap256x256_1_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap256x256_2_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap256x256_3_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap256x256_4_Buffer' is not complete! Format is unsupported!
ERROR: Frame buffer 'ShadowMap256x256_5_Buffer' is not complete! Format is unsupported!
WARNING: System does not support float textures! SSAO is disabled.
WARNING: System does not support float textures! Edge smooth is disabled.

test 7, 10 and 14 do look wrong. 15 and 16 have minor visual artefacts.
Comment 5 roughl 2011-01-31 13:17:52 UTC
Created attachment 42776 [details]
render test logfile with llvm-pipe
Comment 6 Jerome Glisse 2011-03-08 10:54:54 UTC
Does it works better with lastest mesa ?
Comment 7 Alexandre Demers 2011-04-07 12:48:20 UTC
Right now, the RendererFeatTest doesn't work properly at all if I enable the S3TC extension with mesa git version, libdrm git version and libtxc_dxtn git version.

Not forcing the S3TC extension, the first test shows corruption on text (written on top left corner) while the i915 doesn't. All the test fails to show the background which is probably related to a texture not loaded because of missing S3TC extension or because of float textures not supported. SSAO (used in test 10) and Edge smooth (used in test 14) are disabled because of float textures not supported.

Should we report problem with RendererTestFeat in different bugs (listing each problem as a different bug, i.e. S3TC and Float Textures)?
Comment 8 Sven Arvidsson 2011-04-07 13:28:21 UTC
(In reply to comment #7)
> Right now, the RendererFeatTest doesn't work properly at all if I enable the
> S3TC extension with mesa git version, libdrm git version and libtxc_dxtn git
> version.
> 
> Not forcing the S3TC extension, the first test shows corruption on text
> (written on top left corner) while the i915 doesn't. All the test fails to show
> the background which is probably related to a texture not loaded because of
> missing S3TC extension or because of float textures not supported. SSAO (used
> in test 10) and Edge smooth (used in test 14) are disabled because of float
> textures not supported.
> 
> Should we report problem with RendererTestFeat in different bugs (listing each
> problem as a different bug, i.e. S3TC and Float Textures)?

Does S3TC work in other games? If not, it's a more general problem. (I'm not sure if S3TC works equally well for all r600g hardware, or only on Evergreen?)

Float textures only exist in marek's branch, and only for r300g, so it's probably a bit premature to file bugs about this. Amensia works without it, you're just missing out on a couple of effects.
Comment 9 Sven Arvidsson 2011-05-01 12:23:56 UTC
Have you had a chance to retry Amnesia? With r600g on a HD5670 both the RenderTest and the game itself is working. 

There's still a few rendering issues though, the game itself has black bars which make it seem like it was letterboxed.
Comment 10 roughl 2011-06-04 15:25:14 UTC
With kernel 2.6.39 and a recent 7.11-devel mesa it does not crash anymore. Although there are some visual glitches with the lights in the game (see atached picture). But I fill separate bugs for these issues.
Comment 11 Sven Arvidsson 2011-06-04 16:18:52 UTC
(In reply to comment #10)
> Although there are some visual glitches with the lights in the game (see
> atached picture). But I fill separate bugs for these issues.

Already being tracked in bug 37028.


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.