From 0f98086580199c2d2166a83808781e8bc69dade6 Mon Sep 17 00:00:00 2001 From: Arhik Date: Tue, 9 Jul 2024 09:46:47 +0530 Subject: [PATCH 1/4] Update WGPUCanvas.jl --- src/WGPUCanvas.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WGPUCanvas.jl b/src/WGPUCanvas.jl index e0884d6..7b1ed90 100644 --- a/src/WGPUCanvas.jl +++ b/src/WGPUCanvas.jl @@ -33,7 +33,7 @@ end struct ErrorCanvas <: AbstractWGPUCanvas end -function WGPUCore.getCanvas(s::Symbol, size::Tuple{Int, Int} = (500,500)) +function WGPUCore.getCanvas(s::Symbol, size::Tuple{Int, Int} = (1080, 900)) canv = if s==:OFFSCREEN OffscreenCanvas elseif s==:GLFW From c99f051af1871933a053f2bc2f5006262fcdcf21 Mon Sep 17 00:00:00 2001 From: Arhik Date: Mon, 14 Apr 2025 10:15:50 +0530 Subject: [PATCH 2/4] updating surface changes with upstream v24.0.0.1 --- src/glfwWindows.jl | 6 +++--- src/offscreen.jl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glfwWindows.jl b/src/glfwWindows.jl index d245554..534ac62 100644 --- a/src/glfwWindows.jl +++ b/src/glfwWindows.jl @@ -41,18 +41,18 @@ function defaultCanvas(::Type{GLFWWinCanvas}, size::Tuple{Int, Int}) hinstance = GetModuleHandle(C_NULL) winSurfaceRef = cStruct( - WGPUSurfaceDescriptorFromWindowsHWND; + WGPUSurfaceSourceWindowsHWND; chain = cStruct( WGPUChainedStruct; next = C_NULL, - sType = WGPUSType_SurfaceDescriptorFromWindowsHWND, + sType = WGPUSType_SurfaceSourceWindowsHWND, ) |> concrete, hinstance = hinstance, hwnd = winHandleRef[] ) surfaceDescriptorRef = cStruct( WGPUSurfaceDescriptor; - label = C_NULL, + label = WGPUStringView(C_NULL, 0), nextInChain = winSurfaceRef |> ptr, ) instance = WGPUCore.getWGPUInstance() diff --git a/src/offscreen.jl b/src/offscreen.jl index 350deb8..21c6a28 100644 --- a/src/offscreen.jl +++ b/src/offscreen.jl @@ -66,7 +66,7 @@ function getContext(gpuCanvas::OffscreenCanvas) nothing, # currentTexture::Any nothing, # currentTextureView::Any nothing, # format::WGPUTextureFormat - WGPUCore.getEnum(WGPUTextureUsage, ["RenderAttachment"]), # usage::WGPUTextureUsage + WGPUTextureUsage_RenderAttachment, # usage::WGPUTextureUsage nothing, # compositingAlphaMode::Any nothing, # size::Any (500, 500), # physicalSize::Any @@ -144,7 +144,7 @@ function createNewTextureMaybe(canvasCntxt::GPUCanvasContextOffscreen) 1, WGPUCore.getEnum(WGPUTextureDimension, "2D"), canvasCntxt.format, - canvasCntxt.usage | WGPUCore.getEnum(WGPUTextureUsage, "CopySrc"), + WGPUTextureUsage(canvasCntxt.usage | WGPUCore.getEnum(WGPUTextureUsage, "CopySrc")), ) canvasCntxt.currentTextureView = WGPUCore.createView(canvasCntxt.currentTexture) end From 838069d93ce6a32023a4d76a05547a9c5e8e1ba7 Mon Sep 17 00:00:00 2001 From: Arhik Date: Mon, 14 Apr 2025 12:14:52 +0530 Subject: [PATCH 3/4] Update metalglfw.jl --- src/metalglfw.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/metalglfw.jl b/src/metalglfw.jl index 7bfdcdc..766826e 100644 --- a/src/metalglfw.jl +++ b/src/metalglfw.jl @@ -68,17 +68,17 @@ function defaultCanvas(::Type{GLFWMacCanvas}, size::Tuple{Int, Int}) setMetalLayer(nswindow[], metalLayer[]) metalSurfaceRef = cStruct( - WGPUSurfaceDescriptorFromMetalLayer; + WGPUSurfaceSourceMetalLayer; chain = cStruct( WGPUChainedStruct; next = C_NULL, - sType = WGPUSType_SurfaceDescriptorFromMetalLayer, + sType = WGPUSType_SurfaceSourceMetalLayer, ) |> concrete, layer = metalLayer[], ) surfaceDescriptorRef = cStruct( WGPUSurfaceDescriptor; - label = C_NULL, + label = WGPUStringView(C_NULL, 0), nextInChain = metalSurfaceRef |> ptr, ) instance = WGPUCore.getWGPUInstance() From f1c524772d39c0ca40465702db860461835eaa0f Mon Sep 17 00:00:00 2001 From: Arhik Date: Mon, 14 Apr 2025 12:28:30 +0530 Subject: [PATCH 4/4] Update CI.yml --- .github/workflows/CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bae2df1..8edd240 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,8 +18,8 @@ jobs: fail-fast: false matrix: version: - - '1.9' - - 'nightly' + - '1.10' + - '1.11' os: - ubuntu-latest arch: