Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Format::UNDEFINED #2262

Merged
merged 3 commits into from
Jul 14, 2023
Merged

Add Format::UNDEFINED #2262

merged 3 commits into from
Jul 14, 2023

Conversation

Rua
Copy link
Contributor

@Rua Rua commented Jul 14, 2023

Changelog:

### Breaking changes
Changes to `Format`:
- The following objects now use `Format` instead of `Option<Format>`: `BufferView`, `Image`, `ImageView`, `SamplerYcbcrConversion`.
- The `block_size` method no longer returns an `Option`.

### Additions
- Added `Format::UNDEFINED`, and implemented `Default` which returns this value.

Following KhronosGroup/Vulkan-Docs#2165, it seems that the Vulkan definition of a "valid VkFormat value" includes UNDEFINED. So this makes that a valid enum value for Vulkano as well, and removes Option APIs where appropriate.

I haven't done it for attachment formats for dynamic rendering. In this case, None doesn't just mean "undefined format", but "no attachment". It matches with the fields of RenderingInfo where the attachments that are absent are also represented as None.

@marc0246
Copy link
Contributor

Looks wonderful, thanks!

@marc0246 marc0246 merged commit 0f5e298 into vulkano-rs:master Jul 14, 2023
marc0246 added a commit that referenced this pull request Jul 14, 2023
@Rua Rua deleted the format-undefined branch October 25, 2023 14:25
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
* Add `Format::UNDEFINED`

* Use `iter::once`
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants