Bug 212762 - [11.0-RC2] [i915kms] OpenGL: DDS/DXT textures are rendered black, missing libtxn_dxtn-20140604 package
Summary: [11.0-RC2] [i915kms] OpenGL: DDS/DXT textures are rendered black, missing lib...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: x11
URL:
Keywords: i915
Depends on:
Blocks:
 
Reported: 2016-09-17 09:57 UTC by Aleksander Alekseev
Modified: 2016-11-18 18:42 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksander Alekseev 2016-09-17 09:57:43 UTC
Here is a simple OpenGL project that uses DXT textures:

https://github.com/afiskon/c-opengl-text/

README.md describes how to build it on FreeBSD, it's very simple.

Here is how it should look like:

http://eax.me/files/2016/02/opengl-text.jpg

Here is how it actually looks like now on FreeBSD:

http://afiskon.ru/s/fd/5938d906fa_opengl-regression.png

In other words all DXT textures are rendered black. I had this issue before a few months ago and installing `libtxn_dxtn-20140604` package fixed it. The problem is there is no such package or any similar package any longer.

Hardware:

* Fujitsu Lifebook E733
* Intel HD Graphics 4000
Comment 1 Aleksander Alekseev 2016-09-17 10:40:25 UTC
A few updates on this ticket.

1) Previous discussion https://lists.freebsd.org/pipermail/freebsd-x11/2016-February/017198.html

2) Installing libtxn_dxtn-20140604.txz from here http://ftp.rusnet.ru/FreeBSD/PKG/freebsd%3A10%3Ax86%3A64/release_3/All/ fixes a problem. (Mirror: http://afiskon.ru/s/8b/13dfd0ba0b_libtxn_dxtn-20140604.txz ) So problem is really caused by a missing package. What happened to it? Didn't find any corresponding records in /usr/ports/UPDATING.

3) After installing a package FPS is very low (from 10 to 40 FPS depending on window size) and textures are rendered very weird:

http://afiskon.ru/s/6d/07d8fc8c66_textures-quality.png

I need to add user to 'video' group:

sudo pw group mod video -m eax

... and re-login or run `su eax` (since adding user to the group doesn't apply immediately - http://unix.stackexchange.com/q/18796 ) to fix this. After this everything renders as expected!

I strongly believe that this is a very inconvenient for users. Any chance it could be considered a bug (a minor one)?
Comment 2 David Naylor freebsd_committer 2016-11-18 18:42:54 UTC
It appears that graphics/dri is missing a RUN_DEPENDS=libtxc_dxtn.so:graphics/s2tc.  I can commit this fix if someone from x11 can approve?  

(P.S. Note that it is libtxc_dxtn, not libtxn_dxtn.  There appeared to be a typo in the original port: PORTORIGIN = graphics/libtxc_dxtn, PORTNAME = libtxn_dxtn, LIBNAME = libtxc_dxtn).