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

ktx create should warn about images that exceed common GPU maximum texture dimensions #383

Open
MarkCallow opened this issue Mar 24, 2021 · 6 comments
Labels

Comments

@MarkCallow
Copy link
Collaborator

This stems from issue #373. Two things needs to be done:

  1. Remove the artificial size limits in the JPEG decoder.
  2. Due to GPU texture size limits, ktx should exit with an error if no --resize or --scale option is specified and the size is greater than 16,384 and it should issue a warning if the size is > 16,384 after a --resize or --scale. It should not automatically resize. Some users may want to resize to a different size having not been aware until warned that the image was so large.

Question: should toktx allow texture sizes > 32768. I doubt any GPU supports texture sizes larger than that.

@lexaknyazev
Copy link
Member

lexaknyazev commented Mar 24, 2021

NVIDIA GeForce 10xx and newer supports 32,768 1D and 32,768x32,768 2D textures, so why is the proposed limit 16,384?

@lexaknyazev
Copy link
Member

Available VRAM gets bigger with each new GPU generation, so max texture dimensions would follow. toktx should issue a warning on dimensions above 16,384 as it's likely the most popular limitation atm.

@MarkCallow
Copy link
Collaborator Author

why is the proposed limit 16,834?

Because that is the limit on the majority of GPUs atm. The error is intended to be a hard warning that hey you need to look at this. If you've explicitly indicated the size you want then it turns into a warning. It needs an additional way to override other than resize or scale for use in the case of keeping the size as is.

@MarkCallow MarkCallow added the bug label Aug 30, 2021
@MarkCallow
Copy link
Collaborator Author

@lexaknyazev does ktx create have size limits or size warnings? Its reference page does not indicate anything.

@lexaknyazev
Copy link
Member

The original spec for ktx create does not have the warning. Seems reasonable to add it.

@MarkCallow
Copy link
Collaborator Author

Thanks @lexaknyazev.

@MarkCallow MarkCallow changed the title toktx needs to properly handle very large input images. ktx create should warn about images that exceed common GPU maximum texture dimensions Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants