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

Parse shaders with half-precision floats (float16) #1149

Closed
lyricwulf opened this issue Jul 28, 2021 · 3 comments
Closed

Parse shaders with half-precision floats (float16) #1149

lyricwulf opened this issue Jul 28, 2021 · 3 comments
Labels
kind: feature New feature or request

Comments

@lyricwulf
Copy link

When using 16bit float storage and arithmetic extensions:

#extension GL_EXT_shader_16bit_storage : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable

Shader compiles to spv without issue, but trying to create a wgpu shader module:

[WARN wgpu_core::device] Failed to parse shader SPIR-V code for Some("shader.comp.spv"): UnsupportedCapability(Float16)
@kvark
Copy link
Member

kvark commented Jul 29, 2021

If you want to use them from wgpu, you'd also need a feature inside wgpu to be exposed/enabled first. WebGPU group has it on the radar for the nearest future, but it's not there yet. See gpuweb/gpuweb#658

@kvark kvark added the kind: feature New feature or request label Jul 29, 2021
@TimothyBergstrom
Copy link

If you want to use them from wgpu, you'd also need a feature inside wgpu to be exposed/enabled first. WebGPU group has it on the radar for the nearest future, but it's not there yet. See gpuweb/gpuweb#658

Two relatively new PRs have added f16 for WebGPU

gpuweb/gpuweb#2696

gpuweb/gpuweb#2647

@teoxoy
Copy link
Member

teoxoy commented May 14, 2022

Support for f16 for wgpu has been merged in gfx-rs/wgpu#2646.
Let's track f16 support for WGSL in gfx-rs/wgpu#4384.

@teoxoy teoxoy closed this as completed May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants