Skip to content

Commit 4095125

Browse files
committed
texture arraylayercount and viewport typo fixes
1 parent fdb92d0 commit 4095125

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/WGPU.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ function createView(gpuTexture::GPUTexture; dimension=nothing)
449449
dimension = T(value)
450450
end
451451
end
452+
texSize = gpuTexture.texInfo["size"]
452453
viewDescriptor = partialInit(
453454
WGPUTextureViewDescriptor;
454455
label = pointer(gpuTexture.label),
@@ -458,7 +459,7 @@ function createView(gpuTexture::GPUTexture; dimension=nothing)
458459
baseMipLevel = 0, # TODO
459460
mipLevelCount = 1, # TODO
460461
baseArrayLayer = 0, # TODO
461-
arrayLayerCount = 1, # TODO
462+
arrayLayerCount = last(texSize), # TODO
462463
texture = gpuTexture |> Ref
463464
) |> Ref
464465
view = GC.@preserve gpuTextureInternal wgpuTextureCreateView(gpuTexture.internal[], viewDescriptor) |> Ref
@@ -1533,7 +1534,7 @@ function setViewport(renderPass::GPURenderPassEncoder,
15331534
x, y,
15341535
width, height,
15351536
minDepth, maxDepth)
1536-
wgpuRenderPassEncoderSetViewPort(
1537+
wgpuRenderPassEncoderSetViewport(
15371538
renderPass.internal[],
15381539
float(x),
15391540
float(y),

0 commit comments

Comments
 (0)