Skip to content

Commit cc9b291

Browse files
committed
update to v0.19.1.1
1 parent 5c502ba commit cc9b291

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

src/adapter.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ function requestAdapter(;
4040
backendType = getDefaultBackendType()
4141

4242
adapterOptions = cStruct(WGPURequestAdapterOptions)
43-
adapterOptions.compatibleSurface = canvas.surfaceRef[]
43+
if (typeof(canvas) == FallbackCanvas) || (typeof(canvas) == nothing)
44+
adapterOptions.compatibleSurface = C_NULL
45+
else
46+
adapterOptions.compatibleSurface = canvas.surfaceRef[]
47+
end
4448
adapterOptions.powerPreference = powerPreference
4549
adapterOptions.forceFallbackAdapter = false
4650

test/bufferCopyTest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ end
1616

1717
canvas = WGPUCore.getCanvas();
1818

19-
gpuDevice = WGPUCore.getDefaultDevice()
19+
gpuDevice = WGPUCore.getDefaultDevice(canvas)
2020

2121
# GC.gc()
2222

test/fragmentStateTest.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ shaderSource = Vector{UInt8}(
3535
);
3636

3737
canvas = WGPUCore.getCanvas();
38-
gpuDevice = WGPUCore.getDefaultDevice();
38+
gpuDevice = WGPUCore.getDefaultDevice(canvas);
3939
shaderinfo = WGPUCore.loadWGSL(shaderSource);
4040
cshader =
4141
Ref(WGPUCore.createShaderModule(gpuDevice, "shadercode", shaderinfo.shaderModuleDesc, nothing, nothing));
@@ -65,4 +65,4 @@ fs = unsafe_load(fstate.internal[] |> ptr)
6565

6666
Test.@testset "FragmentState" begin
6767
Test.@test unsafe_string(fs.entryPoint) == "fs_main"
68-
end
68+
end

test/renderpipelineTest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ shaderSource =
3737
""",
3838
)
3939
canvas = WGPUCore.getCanvas();
40-
gpuDevice = WGPUCore.getDefaultDevice();
40+
gpuDevice = WGPUCore.getDefaultDevice(canvas);
4141
shaderInfo = WGPUCore.loadWGSL(shaderSource);
4242
cshader = WGPUCore.createShaderModule(gpuDevice, "shadercode", shaderInfo.shaderModuleDesc, nothing, nothing);
4343
cshaderRef = cshader |> Ref

test/setVertexBufferTest.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ vertexData =
3838
) .|> Float32
3939

4040
canvas = WGPUCore.getCanvas()
41-
gpuDevice = WGPUCore.getDefaultDevice()
41+
gpuDevice = WGPUCore.getDefaultDevice(canvas)
4242

4343
(vertexBuffer, tmpData) = WGPUCore.createBufferWithData(
4444
gpuDevice,

0 commit comments

Comments
 (0)