-
Notifications
You must be signed in to change notification settings - Fork 474
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
PVRTC1 textures must have dimensions that are power-of-two #1991
Comments
PVRTC has been deprecated. |
PVRTC is deprecated, but PVRTC1 does need to have dimensions that are powers of two (partly because you're expected to upload the texture in Morton order and there's no allowance for padding); PVRTC2 (which is almost completely a superset) does not have this requirement, and the driver would insert padding as necessary (possibly including not backing pages which fall beyond the limits). The official PVRTexTool will only allow PVRTC1 output for textures with power-of-two dimensions, although they don't need to be square. The square requirement is specific to Apple, though. The PVRTC1 description in the KDFS should be considered to be authoritative (barring any accidental errors). However, it's true that Vulkan doesn't currently contain validation to confirm that a user hasn't attempted to create an image of PVRTC1 format with npot sizes; we're working on adding this, so thank you for the catch. |
Does that disallow any spec changes to happen now? The extension still allows for invalid textures, which imo should still be changed after the fact, regardless of it being deprecated. It's still a flaw in the spec. |
Don't know if the Vulkan working group will consider spending time fixing this issue but I don't think they're opposed to letting the community resolving this ? |
Yes, deprecated or not we (with a working group hat on) should still fix it. The working group is aware, a clarification line has been written, and I'm on the hook to get validation in once it bubbles through the pipeline (sorry, I'm the stumbling block at the moment, but I'm on it). |
This comment was marked as spam.
This comment was marked as spam.
This should be fixed in the current spec update. |
The Vulkan spec currently allows the use of PVRTC1 textures that do not have power-of-two dimensions. For one, this requirement is in the OpenGL ES spec and in the Khronos Data Format Specification. Secondly, this seems to be a design requirement of the texture format itself, meaning that images with non-power-of-two dimensions would simply not work. This does not apply to PVRTC2.
However, I could not find a source from imgtec explicitely saying that PVRTC1 textures have this requirement and instead I only found this PDF about PVRTC2 which states:
And a few other sources I found:
The layout of PVRTC1 does not require the images to be square (only power-of-two), however there's some hardware which restricts itself to square textures such as iOS devices.
This issue stems from KhronosGroup/MoltenVK#1760.
The text was updated successfully, but these errors were encountered: