Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kmamal committed Nov 29, 2023
1 parent 46d4a32 commit ef3dc40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dawn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ index e0fe9b77..2342910c 100644
"${PROJECT_SOURCE_DIR}"
"${NODE_ADDON_API_DIR}"
diff --git a/src/dawn/node/Module.cpp b/src/dawn/node/Module.cpp
index 1061c8b6..4e639d6b 100644
index 1061c8b6..a4dd1cd0 100644
--- a/src/dawn/node/Module.cpp
+++ b/src/dawn/node/Module.cpp
@@ -34,8 +34,14 @@
Expand Down Expand Up @@ -129,6 +129,7 @@ index 1061c8b6..4e639d6b 100644
+
+public:
+
+ std::unique_ptr<dawn::native::Instance> _instance;
+ Napi::ObjectReference _window;
+ WGPUDevice _device;
+ WGPUSwapChain _swapChain;
Expand Down Expand Up @@ -199,9 +200,8 @@ index 1061c8b6..4e639d6b 100644
+private:
+
+ void _createSwapChain(const Napi::Env &env) {
+ WGPUInstance instance = dawn::native::Instance().Get();
+ Napi::Buffer<char> buffer = { env, _window.Get("_native") };
+ WGPUSurface surface = wgpu::sdl::CreateSurfaceForWindow(procs, instance, buffer.Data());
+ WGPUSurface surface = wgpu::sdl::CreateSurfaceForWindow(procs, _instance->Get(), buffer.Data());
+
+ WGPUSwapChainDescriptor swapChainDesc = {};
+ swapChainDesc.usage = WGPUTextureUsage_RenderAttachment;
Expand Down

0 comments on commit ef3dc40

Please sign in to comment.