Skip to content

Commit

Permalink
Fix ufloat_texel_data_in_shader value (#3205)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao authored Dec 6, 2023
1 parent 3942dc8 commit c78b06d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/webgpu/util/texture/texel_data.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ TODO: Test NaN, Infinity, -Infinity [1]`
g.test('ufloat_texel_data_in_shader')
.desc(
`
TODO: Test NaN, Infinity [1]`
Note: this uses values that are representable by both rg11b10ufloat and rgb9e5ufloat.
TODO: Test NaN, Infinity`
)
.params(u =>
u
Expand All @@ -312,21 +314,19 @@ TODO: Test NaN, Infinity [1]`
// Test extrema
makeParam(format, () => 0),

// [2]: Test NaN, Infinity

// Test some values
makeParam(format, () => 0.119140625),
makeParam(format, () => 1.40625),
makeParam(format, () => 24896),
makeParam(format, () => 128),
makeParam(format, () => 1984),
makeParam(format, () => 3968),

// Test scattered mixed values
makeParam(format, (bitLength, i) => {
return [24896, 1.40625, 0.119140625, 0.23095703125][i];
return [128, 1984, 3968][i];
}),

// Test mixed values that are close in magnitude.
makeParam(format, (bitLength, i) => {
return [0.1337890625, 0.17919921875, 0.119140625, 0.125][i];
return [0.05859375, 0.03125, 0.03515625][i];
}),
];
})
Expand Down

0 comments on commit c78b06d

Please sign in to comment.