Skip to content

Commit

Permalink
Fix reifyTextureViewDescriptor (#3969)
Browse files Browse the repository at this point in the history
I updated it incorrectly in the types roll.
  • Loading branch information
kainino0x authored Sep 30, 2024
1 parent 1746bcb commit 9d029d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/webgpu/util/texture/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export function reifyTextureViewDescriptor(
const format = view.format ?? texture.format;
const mipLevelCount = view.mipLevelCount ?? texture.mipLevelCount - baseMipLevel;
const dimension = view.dimension ?? defaultViewDimensionsForTexture(texture);
const usage = (view.usage ?? 0) === 0 ? texture.usage : view.usage!;

let arrayLayerCount = view.arrayLayerCount;
if (arrayLayerCount === undefined) {
Expand All @@ -255,7 +256,7 @@ export function reifyTextureViewDescriptor(
format,
dimension,
aspect,
usage: texture.usage,
usage,
baseMipLevel,
mipLevelCount,
baseArrayLayer,
Expand Down

0 comments on commit 9d029d3

Please sign in to comment.