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

Relax max_anisotropy validation #3275

Closed
teoxoy opened this issue Dec 8, 2022 · 0 comments · Fixed by #3610
Closed

Relax max_anisotropy validation #3275

teoxoy opened this issue Dec 8, 2022 · 0 comments · Fixed by #3610
Labels
area: validation Issues related to validation, diagnostics, and error handling

Comments

@teoxoy
Copy link
Member

teoxoy commented Dec 8, 2022

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.

@teoxoy teoxoy added this to the WebGPU Specification V1 milestone Dec 8, 2022
@teoxoy teoxoy added the area: validation Issues related to validation, diagnostics, and error handling label Dec 8, 2022
@teoxoy teoxoy mentioned this issue Mar 21, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: validation Issues related to validation, diagnostics, and error handling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant