[Mesa-dev] [Bug 70432] New: Handling of S3TC with backends not supporting s3tc (like i915g)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Oct 13 20:38:23 CEST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=70432

          Priority: medium
            Bug ID: 70432
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: Handling of S3TC with backends not supporting s3tc
                    (like i915g)
          Severity: minor
    Classification: Unclassified
                OS: Linux (All)
          Reporter: freedesktop-bugzilla at mkarcher.dialup.fu-berlin.de
          Hardware: x86-64 (AMD64)
            Status: NEW
           Version: git
         Component: Mesa core
           Product: Mesa

Portal for Windows (in steam) tries to set up compressed textures like this
(from seen in apitrace)

 glTexImage2D(target = GL_TEXTURE_2D, level = 0, internalformat =
GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, width = 1024, height = 1024, border =
0, format = GL_RGBA, type = GL_UNSIGNED_BYTE, pixels = NULL)
 glCompressedTexSubImage2DARB(target = GL_TEXTURE_2D, level = 0, xoffset = 0,
yoffset = 0, width = 1024, height = 1024, format =
GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, imageSize = 524288, data = [binary
data, size = 512 kb])

The glTexImage2D would encounter an assertion failure on debug builds, and the
glCompressedTexSubImage2DARB causes an division by zero on release builds. The
generic Mesa core decides that S3TC compression is OK when libtxc_dxtn is
installed (I have the s2tc version installed), and so texture_error_check
succeeds on the first call. Nevertheless _mesa_choose_texture_format fails as
S3TC is not supported on i915g. If assertions were enabled, the assertion
texFormat != MESA_FORMAT_NONE would trigger, but that condition is ignored.

The block size check in glCompressedTexSubImage2DARB ("(xoffset % bw != 0) ||
(yoffset % bh != 0)") crashes for MESA_FORMAT_NONE, as bw and bh are zero in
that case.

Uninstalling libtxc-dxtn-s2tc helps to not trigger that problem, thus the
"minor" severity, as that library on a system without s3tc support is mostly
pointless anyway.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131013/7c51c8b7/attachment.html>


More information about the mesa-dev mailing list