|
let valid_clamp = |
|
clamp <= hal::MAX_ANISOTROPY && conv::is_power_of_two_u32(clamp as u32); |
|
if !valid_clamp { |
|
return Err(resource::CreateSamplerError::InvalidClamp(clamp)); |
|
} |
Note: Most implementations support maxAnisotropy values in range between 1 and 16, inclusive. The used value of maxAnisotropy will be clamped to the maximum value that the platform supports.
from https://gpuweb.github.io/gpuweb/#dom-gpusamplerdescriptor-maxanisotropy
Filed gpuweb/gpuweb#3671 to check for non power of two behavior.
wgpu/wgpu-core/src/device/mod.rs
Lines 1181 to 1185 in a50836e
from https://gpuweb.github.io/gpuweb/#dom-gpusamplerdescriptor-maxanisotropy
Filed gpuweb/gpuweb#3671 to check for non power of two behavior.