Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add [Clamp] to maxAnisotropy
The default behavior (`value % 65536`) doesn't make any sense here.
We could use [EnforceRange], but [Clamp] makes sense:

- Any value of maxAnisotropy > 65535 behaves identically to 65535
  (that is, it's as if there's no maximum).
- Any value of maxAnisotropy < 0 behaves identically to 0
  (it's a validation error).

Fixes #1269.
  • Loading branch information
kainino0x committed Dec 7, 2020
commit 6088af821415d1b1f702ea51108635f3c79bd571
3 changes: 2 additions & 1 deletion spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2286,7 +2286,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase {
float lodMinClamp = 0;
float lodMaxClamp = 0xffffffff; // TODO: What should this be? Was Number.MAX_VALUE.
GPUCompareFunction compare;
unsigned short maxAnisotropy = 1;
[Clamp] unsigned short maxAnisotropy = 1;
};
</script>

Expand All @@ -2303,6 +2303,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase {
- If {{GPUSamplerDescriptor/compare}} is provided, the sampler will be a comparison sampler with the specified
{{GPUCompareFunction}}.
- {{GPUSamplerDescriptor/maxAnisotropy}} specifies the maximum anisotropy value clamp used by the sampler.
- It must be &ge; 1.

Note: most implementations support {{GPUSamplerDescriptor/maxAnisotropy}} values in range between 1 and 16, inclusive.

Expand Down