Skip to content

Conversation

@dneto0
Copy link
Contributor

@dneto0 dneto0 commented Jan 22, 2021

Fixes #1355

@dneto0 dneto0 added wgsl WebGPU Shading Language Issues wgsl resolved Resolved - waiting for a change to the WGSL specification labels Jan 22, 2021
@dneto0 dneto0 requested a review from dj2 January 22, 2021 19:20
<td>`vec`|N|&lt;`bool`&gt;`(`|e|`)` : vec|N|&lt;bool&gt
<td>Component-wise coercion of a unsigned integer vector to a boolean vector.<br>
Component |i| of the result is `bool(`|e|`[`|i|`])`<br>
(OpINotEqual to compare |e| against a zero vector.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this line is right given we're doing component wise checks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpINotEqual operates on vector operands, producing a vector result of the same component count, and "Results are computed per component."

<td>`vec`|N|&lt;`bool`&gt;`(`|e|`)` : vec|N|&lt;bool&gt
<td>Component-wise coercion of a signed integer vector to a boolean vector.<br>
Component |i| of the result is `bool(`|e|`[`|i|`])`<br>
(OpINotEqual to compare |e| against a zero vector.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

<td>`vec`|N|&lt;`bool`&gt;`(`|e|`)` : vec|N|&lt;bool&gt
<td>Component-wise coercion of a floating point vector to a boolean vector.<br>
Component |i| of the result is `bool(`|e|`[`|i|`])`<br>
(OpFUnordNotEqual to compare |e| against a zero vector.)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

@dneto0 dneto0 added this to the MVP milestone Jan 25, 2021
@kvark
Copy link
Contributor

kvark commented Jan 29, 2021

Doesn't look controversial, merging

@kvark kvark merged commit 3cbd94a into gpuweb:main Jan 29, 2021
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
This CL adds unimplemented tests for the `dpdyFine` builtin.

Issue: gpuweb#1254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wgsl resolved Resolved - waiting for a change to the WGSL specification wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vector of int/float -> vector of bool casts

4 participants