Bug 41744 - Unigine Heaven shows black textures (Radeon HD4250)
Summary: Unigine Heaven shows black textures (Radeon HD4250)
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-10-13 06:18 UTC by Gašper Sedej
Modified: 2012-08-23 11:26 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
starting log of oilrush (8.02 KB, text/plain)
2011-11-12 05:18 UTC, kao_chen
Details
my glxinfo (24.56 KB, text/plain)
2011-11-12 05:19 UTC, kao_chen
Details

Description Gašper Sedej 2011-10-13 06:18:21 UTC
Unigine Heaven benchmark shows black textures. It looks like this: http://imageshack.us/photo/my-images/842/slika322.jpg/
It looks like it's problem with floating-point textures.

This is output of program: http://pastebin.com/GKWmbhV9
Here is my glxinfo: http://pastebin.com/BM9Vw8vm

I am using Ubuntu 11.04 with "oibaf" PPA build. Do I need to provide more data?
Comment 1 Gašper Sedej 2011-10-13 06:21:10 UTC
Also, FrozenByte games are missing textures (ShadowGrounds and Trine)
Comment 2 Sven Arvidsson 2011-10-13 11:04:23 UTC
From the glxinfo output you seem to be missing S3TC support. If so, you need to install libtxc_dxtn
Comment 3 Gašper Sedej 2011-10-17 00:02:20 UTC
gsedej@seraph:~/Prenosi/Unigine_Heaven$ dpkg -l | grep libtxc
ii libtxc-dxtn0 1.0.1-0.2 S3 Texture Compression (S3TC) library

glxinfo:
http://pastebin.com/96JdRUQp

I found out that I need to use R600_ENABLE_S3TC=1
But then I get: 

radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
...
dmesg:
[577112.943190] radeon 0000:01:05.0: r600_check_texture_resource:1214 texture invalid format 49
[577112.943196] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
[577112.945640] radeon 0000:01:05.0: r600_check_texture_resource:1214 texture invalid format 49
[577112.945650] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
[577112.946185] radeon 0000:01:05.0: r600_check_texture_resource:1214 texture invalid format 52
[577112.946190] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
[577112.946467] radeon 0000:01:05.0: r600_check_texture_resource:1214 texture invalid format 51
[577112.946469] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !
[577112.947521] radeon 0000:01:05.0: r600_check_texture_resource:1214 texture invalid format 51
....
so formats are 49 51 and 52

Probably some error with kernel?
Comment 4 Alex Deucher 2011-10-17 06:57:32 UTC
(In reply to comment #3)
> 
> Probably some error with kernel?

You need a newer kernel to use that feature.
Comment 5 Gašper Sedej 2011-10-18 06:14:37 UTC
Thanks. Kernel 3.0 solved the problem.
Render is still not perfect and speed is bad, but it's wokring :).
I see odd shading and odd image in dark (ignore tearing, it's only because of sceenshot): http://imgur.com/a/HxtlE
And output: http://pastebin.com/qAcrn2Um

Should I open new bug?
Comment 6 Vadim Girlin 2011-10-18 17:34:26 UTC
(In reply to comment #5)
> Thanks. Kernel 3.0 solved the problem.
> Render is still not perfect and speed is bad, but it's wokring :).
> I see odd shading and odd image in dark (ignore tearing, it's only because of
> sceenshot): http://imgur.com/a/HxtlE
> And output: http://pastebin.com/qAcrn2Um
> 
> Should I open new bug?

Unigine demos have a bug, disabling GL_EXT_texture_array extension should help.
You could use environment variable to disable it:

MESA_EXTENSION_OVERRIDE=-GL_EXT_texture_array
Comment 7 Gašper Sedej 2011-10-19 01:31:36 UTC
I tried disabling extension but still wrong shading. (like it was some "net" on sun)
variable is working because I don't see  any output when I do
:$ MESA_EXTENSION_OVERRIDE=-GL_EXT_texture_array glxinfo | grep GL_EXT_texture_array
(if I don't put variable I see this extention)
Comment 8 kao_chen 2011-11-12 05:18:54 UTC
Created attachment 53449 [details]
starting log of oilrush
Comment 9 kao_chen 2011-11-12 05:19:14 UTC
Created attachment 53450 [details]
my glxinfo
Comment 10 kao_chen 2011-11-12 05:21:24 UTC
Hello!

I also get the same issue with the unigine game "Oilrush". Textures are black. 
I tried this two commands without success:
kao@kao-64:/opt/oilrush$ MESA_EXTENSION_OVERRIDE=-GL_EXT_texture_array ./oilrush
kao@kao-64:/opt/oilrush$ MESA_EXTENSION_OVERRIDE=+GL_ARB_half_float_pixel ./oilrush

I use Ubuntu 10.10 with the update "xorg-edgers/ppa" 

OpenGL vendor:   X.Org
OpenGL renderer: Gallium 0.4 on AMD RV670
OpenGL version:  2.1 Mesa 7.12-devel
System: Linux 3.0.0-13-generic x86_64


I attached the starting log of Oilrush, and my glxinfo output.

Regards
Kao
Comment 11 kao_chen 2011-11-15 09:03:51 UTC
Sorry I have done a mistake, the libtxc-dxtn library was not installed properly on my PC.
 
I found the source code here:
http://debian-multimedia.org/pool/main/libt/libtxc-dxtn/libtxc-dxtn.php

It's working better for me on both Unigine Heaven and Unigine Oilrush game. I still have some graphics artifacts but they probably  come from another bug.

Here:
Unigine Heaven with wrong shadows:
http://pix.toile-libre.org/upload/original/1321376279.png

And

Oilrush, the crane is flying
http://pix.toile-libre.org/upload/original/1321376118.png

Regards
Kao
Comment 12 Andreas Boll 2012-08-23 11:26:44 UTC
As mentioned above in Comment 5 and Comment 11
properly installing libtxc-dxtn library fixed the black textures.


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.