mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
fix(hal): adjust the conditions when F16_IN_F32 is available
This commit is contained in:
parent
03513e8f90
commit
0aacfeadff
@ -384,7 +384,8 @@ impl super::Adapter {
|
||||
let mut downlevel_flags = wgt::DownlevelFlags::empty()
|
||||
| wgt::DownlevelFlags::NON_POWER_OF_TWO_MIPMAPPED_TEXTURES
|
||||
| wgt::DownlevelFlags::CUBE_ARRAY_TEXTURES
|
||||
| wgt::DownlevelFlags::COMPARISON_SAMPLERS;
|
||||
| wgt::DownlevelFlags::COMPARISON_SAMPLERS
|
||||
| wgt::DownlevelFlags::SHADER_F16_IN_F32;
|
||||
downlevel_flags.set(wgt::DownlevelFlags::COMPUTE_SHADERS, supports_compute);
|
||||
downlevel_flags.set(
|
||||
wgt::DownlevelFlags::FRAGMENT_WRITABLE_STORAGE,
|
||||
|
||||
@ -575,7 +575,8 @@ impl PhysicalDeviceFeatures {
|
||||
| Df::INDIRECT_EXECUTION
|
||||
| Df::VIEW_FORMATS
|
||||
| Df::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES
|
||||
| Df::NONBLOCKING_QUERY_RESOLVE;
|
||||
| Df::NONBLOCKING_QUERY_RESOLVE
|
||||
| Df::SHADER_F16_IN_F32;
|
||||
|
||||
dl_flags.set(
|
||||
Df::SURFACE_VIEW_FORMATS,
|
||||
@ -1693,9 +1694,9 @@ impl super::Instance {
|
||||
);
|
||||
};
|
||||
|
||||
if info.driver_info.contains("Mesa ") {
|
||||
if info.driver == "llvmpipe" {
|
||||
// The `F16_IN_F32` instructions do not normally require native `F16` support, but on
|
||||
// Mesa, they do.
|
||||
// llvmpipe, they do.
|
||||
downlevel_flags.set(
|
||||
wgt::DownlevelFlags::SHADER_F16_IN_F32,
|
||||
available_features.contains(wgt::Features::SHADER_F16),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user