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

Fix 1251: Texture Compression BasisU: Missing device extension #1264

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

jeroenbakker-atmind
Copy link
Collaborator

@jeroenbakker-atmind jeroenbakker-atmind commented Jan 22, 2025

Description

Sample checks if device contains an extension, but never enabled them.
This PR marks the VK_IMG_format_pvrct extension optional.

Fixes #1251

Note

Requires assets from KhronosGroup/Vulkan-Samples-Assets#27 for testing. The updated images will not be merged due to the deprecation of the extension. A new PR will be created to remove the texture format from the sample.

Note

Currently still under investigation if this works. On MacM2 (1.3.296.0 or 1.4.304.0) the decoding is incorrect See screenshot below, but no validation warnings. Other formats do give correct results.
Could also be related to the new assets. As it wasn't clear how there were originally created.
On Linux (Pro + Mesa AMD PRO W6800) this extension is not supported.

image

General Checklist:

Please ensure the following points are checked:

  • My code follows the coding style
  • I have reviewed file licenses
  • I have commented any added functions (in line with Doxygen)
  • I have commented any code that could be hard to understand
  • My changes do not add any new compiler warnings
  • My changes do not add any new validation layer errors or warnings
  • I have used existing framework/helper functions where possible
  • My changes do not add any regressions
  • I have tested every sample to ensure everything runs correctly
  • This PR describes the scope and expected impact of the changes I am making

Note: The Samples CI runs a number of checks including:

  • I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions

If this PR contains framework changes:

  • I did a full batch run using the batch command line argument to make sure all samples still work properly

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

  • I have tested the sample on at least one compliant Vulkan implementation
  • If the sample is vendor-specific, I have tagged it appropriately
  • I have stated on what implementation the sample has been tested so that others can test on different implementations and platforms
  • Any dependent assets have been merged and published in downstream modules
  • For new samples, I have added a paragraph with a summary to the appropriate chapter in the readme of the folder that the sample belongs to e.g. api samples readme
  • For new samples, I have added a tutorial README.md file to guide users through what they need to know to implement code using this feature. For example, see conditional_rendering
  • For new samples, I have added a link to the Antora navigation so that the sample will be listed at the Vulkan documentation site

@jeroenbakker-atmind jeroenbakker-atmind changed the title Fix 1251: Texture Compressoin BasisU: Missing extension Fix 1251: Texture Compression BasisU: Missing extension Jan 22, 2025
@jeroenbakker-atmind jeroenbakker-atmind changed the title Fix 1251: Texture Compression BasisU: Missing extension Fix 1251: Texture Compression BasisU: Missing device extension Jan 22, 2025
Copy link
Contributor

@asuessenbach asuessenbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No matter what, enabling the extension is correct.

But what makes me think about this sample at all: this extension is deprecated (https://registry.khronos.org/vulkan/specs/latest/man/html/VK_IMG_format_pvrtc.html#_deprecation_state)

@jeroenbakker-atmind
Copy link
Collaborator Author

My proposal would be to land this change, but don't land the updated images.
I will also provide a PR to remove the texture format and the references in the documentation. We can discuss the removal in that PR.

@jeroenbakker-atmind jeroenbakker-atmind self-assigned this Jan 23, 2025
@SaschaWillems
Copy link
Collaborator

Do you get validation messages for this. I'm not sure if you actually have to enable that extension, as it does not enable features per se. But seeing that the ext is deprecated, we may just remove PVRTC support completely.

@jeroenbakker-atmind
Copy link
Collaborator Author

jeroenbakker-atmind commented Jan 27, 2025

Yes I got a validation errors using Vulkan SDK 1.4.304.0

VUID-VkImageCreateInfo-format-parameter(ERROR / SPEC): msgNum: 518653028 - Validation Error: [ VUID-VkImageCreateInfo-format-parameter ] | MessageID = 0x1eea0464 | vkCreateImage(): pCreateInfo->format (VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG) requires the extensions VK_IMG_format_pvrtc.
The Vulkan spec states: format must be a valid VkFormat value (https://vulkan.lunarg.com/doc/view/1.4.304.0/mac/1.4-extensions/vkspec.html#VUID-VkImageCreateInfo-format-parameter)
[error] 518653028 - VUID-VkImageCreateInfo-format-parameter: Validation Error: [ VUID-VkImageCreateInfo-format-parameter ] | MessageID = 0x1eea0464 | vkCreateImage(): pCreateInfo->format (VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG) requires the extensions VK_IMG_format_pvrtc.
The Vulkan spec states: format must be a valid VkFormat value (https://vulkan.lunarg.com/doc/view/1.4.304.0/mac/1.4-extensions/vkspec.html#VUID-VkImageCreateInfo-format-parameter)
VUID-VkImageViewCreateInfo-format-parameter(ERROR / SPEC): msgNum: 1626088923 - Validation Error: [ VUID-VkImageViewCreateInfo-format-parameter ] | MessageID = 0x60ec25db | vkCreateImageView(): pCreateInfo->format (VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG) requires the extensions VK_IMG_format_pvrtc.
The Vulkan spec states: format must be a valid VkFormat value (https://vulkan.lunarg.com/doc/view/1.4.304.0/mac/1.4-extensions/vkspec.html#VUID-VkImageViewCreateInfo-format-parameter)
[error] 1626088923 - VUID-VkImageViewCreateInfo-format-parameter: Validation Error: [ VUID-VkImageViewCreateInfo-format-parameter ] | MessageID = 0x60ec25db | vkCreateImageView(): pCreateInfo->format (VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG) requires the extensions VK_IMG_format_pvrtc.
The Vulkan spec states: format must be a valid VkFormat value (https://vulkan.lunarg.com/doc/view/1.4.304.0/mac/1.4-extensions/vkspec.html#VUID-VkImageViewCreateInfo-format-parameter)

@SaschaWillems SaschaWillems self-requested a review January 27, 2025 15:57
Copy link
Collaborator

@SaschaWillems SaschaWillems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it does make sense to enable the extension :)

@marty-johnson59 marty-johnson59 merged commit 8d282d4 into KhronosGroup:main Jan 27, 2025
19 checks passed
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

Successfully merging this pull request may close these issues.

TextureCompression: Error+Crash when transcoding KTX_TFF_PVRCT1_4_RGBA
5 participants