Skip to content

Add [Clamp] to maxAnisotropy#1280

Merged
kainino0x merged 1 commit intogpuweb:mainfrom
kainino0x:maxaniso
Dec 8, 2020
Merged

Add [Clamp] to maxAnisotropy#1280
kainino0x merged 1 commit intogpuweb:mainfrom
kainino0x:maxaniso

Conversation

@kainino0x
Copy link
Copy Markdown
Contributor

@kainino0x kainino0x commented Dec 7, 2020

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.


Preview | Diff

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 gpuweb#1269.
@kainino0x kainino0x requested a review from kvark December 7, 2020 23:05
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 7, 2020

Previews, as seen at the time of posting this comment:
WebGPU | IDL
WGSL
6088af8

@kainino0x kainino0x merged commit a4f220f into gpuweb:main Dec 8, 2020
@kainino0x kainino0x deleted the maxaniso branch December 8, 2020 17:43
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
…1417)

This PR adds unimplmented stubs for the read-write-modify atomic operations.

 * `atomicAdd`
 * `atomicAnd`
 * `atomicCompareExchangeWeak`
 * `atomicExchange`
 * `atomicMax`
 * `atomicMin`
 * `atomicOr`
 * `atomicSub`
 * `atomicXor`

Issue gpuweb#1275, gpuweb#1276, gpuweb#1277, gpuweb#1278, gpuweb#1279, gpuweb#1280, gpuweb#1281, gpuweb#1282, gpuweb#1283
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should maxAnisotropy have [EnforceRange]?

2 participants