Skip to content

Relax max_anisotropy validation #3275

@teoxoy

Description

@teoxoy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: validationIssues related to validation, diagnostics, and error handling

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions