KhronosGroup / KhronosGroup/DataFormat

PVRTC minimum data work count

Open
#12 4 comments 0 reactions 1 assignee View on GitHub

@fluppeteer is already working on this.

Since Jul 27, 2020.

Dominant language
C
Stars
43
Forks
8
PR merge metrics
No merged PRs in 30d

Description

As detailed here: https://github.com/KhronosGroup/KTX-Specification/issues/131
It appears that a PVRTC surface must always have at least 2x2=4 data words.
Specifically this seems from this: https://github.com/KhronosGroup/KTX-Specification/issues/131#issuecomment-664576977

From the OpenGL ES IMG_texture_compression_pvrtc extension:

  • For PVRTC 4BPP formats the imageSize is calculated as:
    (max(width, 8) * max(height, 8) * 4 + 7) / 8
  • For PVRTC 2BPP formats the imageSize is calculated as:
    (max(width, 16) * max(height, 8) * 2 + 7) / 8

Seems like 32 bytes is the minimum PVR image size possible.

This is kind-of ambiguous with this document's phrasing of "At least one word of PVRTC data must exist in each mip level of a texture.", because although it's correct it probably should read "At least four words of PVRTC data must exist in each mip level of a texture because interpolation requires 2x2 data words".

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.