Skip to content

Conversation

cryvosh
Copy link
Contributor

@cryvosh cryvosh commented Jul 5, 2025

Connections
Extension of #7656

Description
Polyfills f16 I/O when storageInputOutput16 capability is missing on vulkan backend.
Emits these variables as f32 and inserts OpFConverts at loads/stores.
If capability is available, generated spirv is unaffected.

Testing
Added a snapshot test and some basic inspection of the spirv disassembly in spirv_capabilities.rs.
Generated spirv in snapshots look okay to me, but I haven't yet run any live correctness tests.

Squash or Rebase?
Squash

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@cryvosh cryvosh marked this pull request as ready for review July 5, 2025 18:22
@cryvosh cryvosh requested a review from a team as a code owner July 5, 2025 18:22
@cryvosh cryvosh changed the title Add f16 io polyfill [naga spv-out] Add f16 io polyfill Jul 5, 2025
Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

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

Mostly LGTM, but I noticed some things that seem like potential issues.

I also think the API could use some work, but let's iterate on that in follow-up PRs.

@ErichDonGubler ErichDonGubler added type: enhancement New feature or request backend: vulkan Issues with Vulkan lang: SPIR-V Vulkan's Shading Language labels Jul 22, 2025
@jimblandy
Copy link
Member

@cryvosh @ErichDonGubler What are the next steps here? I see questions from Erich that haven't been answered yet.

@cryvosh
Copy link
Contributor Author

cryvosh commented Aug 6, 2025

Hey sorry been busy, will address when I get a chance

Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Nice work!

@teoxoy teoxoy merged commit 4b5e38a into gfx-rs:trunk Aug 21, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: vulkan Issues with Vulkan lang: SPIR-V Vulkan's Shading Language type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants