Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KTX2Loader: Improve transcoder target format selection #29745

Open
5 tasks
donmccurdy opened this issue Oct 24, 2024 · 0 comments
Open
5 tasks

KTX2Loader: Improve transcoder target format selection #29745

donmccurdy opened this issue Oct 24, 2024 · 0 comments

Comments

@donmccurdy
Copy link
Collaborator

donmccurdy commented Oct 24, 2024

Description

Related:

As described in the issue above, Firefox may indicate support for compressed formats that it actually emulates in drivers, decompressing or transcoding to another format. This emulation has much higher cost than just transcoding to the 'right' format in KTX2Loader, but we don't necessarily know what the right format is because Firefox doesn't say. We don't have this problem on ANGLE, but currently we are preserving a less-optimal choice of target transcoding format for ANGLE because of the Firefox issue.

Solution

  • Consider detecting the Firefox user agent and adjusting format selection as a special case, if we can do so reliably
    • For Linux+Firefox+RadeonSI we should prefer BCn formats over ETC2 as the target from ETC1S, when both are "supported"
    • For other platforms, is the reverse happening? Would Firefox report BCn support when only ETC2 is actually available?
  • Test major browsers on multiple platforms, check target format selection, and implement unit tests for transcoder target formats if possible (WASM in tests may be tricky...)
  • Consider preferring BC1/3 over BC7 for ETC1S transcoding
  • File an issue with Firefox about the emulated support
  • Fix invalid WebGPU feature detection in KTX2Loader for (non-existent) texture-compression-bptc and texture-compression-etc1

Alternatives

n/a

Additional context

No response

@donmccurdy donmccurdy changed the title KTX2Loader: KTX2Loader: Improve transcoder target format selection Oct 24, 2024
@donmccurdy donmccurdy added this to the r171 milestone Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@donmccurdy and others