SDK emulator does not raise error when loading unsupported compressed texture

This topic contains 4 replies, has 2 voices, and was last updated by  kevin 1 year, 10 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #52214

    Mark
    Member

    In SDK 3.5 when attempting to load an unsupported texture format with CompressedTexImage2D, e.g. GL_COMPRESSED_RGB8_ETC2 in an OpenGL ES 1.1 context, no error is raised. According to the spec, an INVALID_ENUM should be raised.

    I get an incomplete texture with this and other ETC2 formats which is what leads me to suppose they are unsupported.

    Why am I trying to do this? Because the easiest way to determine if a format is supported is to try to load it, a strategy that fails dismally when the implementation does not raise the errors it is supposed to.

    #52221

    Mark
    Member

    Please inform me of the bug number.

    #52250

    kevin
    Member

    Hi Mark,
    We always recommend checking for capabilities and extension strings to determine available features. This approach is the most portable solution for determining the support of a given feature.
    In this case, it should be OES_compressed_ETC2_RGB8_texture.

    I will try to reproduce this issue. then create a bug for this.

    Thanks,
    Kevin

    #52251

    Mark
    Member

    The application in question is the KTX loader (https://github.com/KhronosGroup/KTX). KTX supports any format so in order to use the approach you suggest I would have to maintain a large table of format enums to extension names. It couldn’t even be a simple table because the enum values aren’t packed together. So there would be some inelegant code.

    The IMG emulator is the first implementation I have encountered that does not raise an error. The only issue I previously encountered was an implementation that raised INVALID_VALUE instead of INVALID_ENUM.

    You can use the KTX es1loadtests to reproduce the problem. Clone the repo from the above URL and checkout the “incoming” branch. Install GYP as per the KTX README. Edit the file gyp_include/config.gypi in the KTX source, commenting out maliemu.gypi in the includes at the bottom and uncommenting pvremu.gypi. Then regenerate the projects (“make msvs”) and open the generated solution (build/msvs/vsNNNN) in your version of Visual Studio (NNNN is, e.g, 2013) and build and run es1loadtests.

    All the ETC2 tests will show a yellow square due to this bug. The loader has a software ETC2 decoder that it uses when a raised error indicates the implementation does not support the formats. In that case you will see some images.

    #52261

    kevin
    Member

    Hi Mark,
    Thank you for your information.
    I created a bug for this issue. == BRN58313

    Thanks,
    Kevin

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.