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

Issues with specifications #43

Closed
mcraiha opened this issue May 22, 2018 · 4 comments
Closed

Issues with specifications #43

mcraiha opened this issue May 22, 2018 · 4 comments

Comments

@mcraiha
Copy link

mcraiha commented May 22, 2018

I assume this is the right place to report issues related to documentation in https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/

Issues in An example KTX file: section

  1. 0x0D, 0x0A, 0x1A, 0x0A. // final four bytes of Byte[12] identifier should be 0x0D, 0x0A, 0x1A, 0x0A, // final four bytes of Byte[12] identifier
  2. 0x6A, 0x6F, 0x6B, 0x65, // UTF8 v: 'gles2\0' 0x6A, 0x6F, 0x6B, 0x65 means j o k e, not g l e s

Suggestions:

  1. It would be nice to have actual KTX binary file linked to the documentation because Example file section does not contain full KTX file
  2. Explain what are valid values for padding bytes
  3. There is no reasoning why multiple of 4 are used, so maybe add a small text about it (and also mention modulo 4 since it is a bit easier to understand than Byte valuePadding[3 - ((keyAndValueByteSize + 3) % 4)]).
@MarkCallow
Copy link
Collaborator

I assume this is the right place
No, but don't worry. I understand you had problems trying to use the Khronos Bugzilla. I'll add a repo for specification issues and move this issue there once it is set up. I'll fix the issues in a little while.

Congratulations on being the first person to spot the hidden cookie. I am afraid there is no prize.

  1. You can find KTX files in https://github.com/KhronosGroup/KTX-Software/tree/master/testimages. You can find some more complex ones, including a cubemap texture in https://github.com/msc-/KTX-Software/tree/incoming/tests/testimages. I'll be moving these to this repo's incoming branch in the near future.

  2. The padding bytes can be any value. They are ignored by loaders and are there simply to maintain 4-byte alignment for the imageSize fields.

  3. Mobile devices were a major target for KTX. These require that 32-bit values be aligned on 4-byte boundaries. To keep loaders a little simpler we make sure that all 32-bit values in the the KTX file are 4-byte aligned. One does not typically explain this sort of thing in specifications but I suppose I can add a footnote. Isn't "% 4" sufficient clue that this is about modulo 4?

@MarkCallow
Copy link
Collaborator

Please refile this at https://github.com/KhronosGroup/KTX-Specification/issues and close this one. Sorry to ask but I have not found a way to mark an issue as filed by somebody else or ensure a particular user will receive notifications about updates to the issue.

@mcraiha
Copy link
Author

mcraiha commented May 29, 2018

Moved to KhronosGroup/KTX-Specification#1

@mcraiha mcraiha closed this as completed May 29, 2018
@MarkCallow
Copy link
Collaborator

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants