Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-59870

Research on supported texture formats

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • 5.10
    • Quick: SceneGraph
    • None

    Description

      There is extreme variability on which compressed formats are supported by which hardware. This needs to be carefully surveyed if we want to create some sort of easy to use "profiles" in a build system (e.g. "target is iMX6" => compress to this format, with these options,etc.)

      Desktop

      A desktop GPU typically has support for the S3 algorithms (BC1 / BC2 / BC3) via the ubiquitous https://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt extension. They map to the DXT1 / DXT3 / DXT5 formats in Direct3D.

      • Notable exception: Mesa drivers on Linux may lack support for the S3 extension, because it's patented (but expires soon http://www.patentcountdown.org/ ).
      • Note that DXT2 and DXT4 are not supported by that OpenGL extension, and they're the formats with premultiplied alpha. DXT3 and DXT5 have alpha, but it's assumed to be non-premultiplied.
      • Modern desktop GPUs may offer support for the ETC1/ETC2/EAC formats, mostly because they run OpenGL versions high enough and/or which claim some sort of compatibility with OpenGL ES (for instance: OpenGL 4.3 mandates ETC2 support; OpenGL 4.5 you must have full ES 3 compatibility). DO NOT TRUST THE ETC1/2 FORMATS ON DESKTOP (or, in general, "mobile" formats). As I've found out, on my Nvidia ETC2 gets decompressed on the fly (and stored in VRAM decompressed (warning)).
      • BC6 supports HDR. Do we even need it?
      • BC7 is great but takes a long time to compress. Requires OpenGL 4 grade hardware.

      Mobile/Embedded

      OpenGL ES-wise, situation is as follows:

      • OpenGL ES 2 does not mandate support for any specific texture format, leaving the decision up to the vendor. In other words: you must know in advance.
      • OpenGL ES 3 mandates ETC2 support

      And that's it. When we look a little closer:

      More research and data collection is needed.

      • Esp. for embedded boards, it's not easy to find on the internet what formats are supported. Also on embedded there might be extreme variability.
        • Be sure that the format is actually supported by the hardware and not just "reported" but then the textures are uncompressed in VRAM!
      • How to handle all the possible compression formats in a build tool?
      • How to ship the correct compressed textures for a given device, if there's variability?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              janichol Andy Nichols
              peppe Giuseppe D'Angelo
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes