Open arhip144 opened 11 months ago
If you can create a Canvas
instance w/out error then you can use Canvas.gpu
property set to false
.
However skia-canvas tests for a valid GPU renderer by default for a new Canvas, so if you're getting this error upon Canvas
creation then the only recourse I know of is to build skia-canvas with GPU disabled by default.
The change is minor, though of course it does require a rebuild (dev. environment and all that): https://github.com/mpaperno/skia-canvas/commit/522388c35999e0a96c7c056dacf64573301fc569
Alternately you can use my fork as the package source if you want, which comes with GPU disabled by default (and other changes). I don't have Linux ARM builds though.
If you can create a
Canvas
instance w/out error then you can useCanvas.gpu
property set tofalse
.However skia-canvas tests for a valid GPU renderer by default for a new Canvas, so if you're getting this error upon
Canvas
creation then the only recourse I know of is to build skia-canvas with GPU disabled by default.The change is minor, though of course it does require a rebuild (dev. environment and all that): mpaperno@522388c
Alternately you can use my fork as the package source if you want, which comes with GPU disabled by default (and other changes). I don't have Linux ARM builds though.
How can I install your package via npm and require it in project?
How can I install your package via npm and require it in project?
I don't have it up on NPM (yet?), but you can use any Git[hub] URL as a package source. So eg. change your package.json dependencies
to
"skia-canvas": "github:mpaperno/skia-canvas#master"
Then run npm update
. This will keep the module with the same import name, so no code needs to be changed.
How can I install your package via npm and require it in project?
I don't have it up on NPM (yet?), but you can use any Git[hub] URL as a package source. So eg. change your package.json
dependencies
to"skia-canvas": "github:mpaperno/skia-canvas#master"
Then run
npm update
. This will keep the module with the same import name, so no code needs to be changed.
PS C:\Users\WETBOT\Documents\GitHub\wetbot> npm update npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -4058 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
Ive had users report this too, and so far reports have been positive from switching the backend from vulkan to d3d for windows (through recompiling the library). But based on reading this, maybe I should disable using the gpu instead..
npm ERR! errno -4058
Well, if you find a problem in my forked version, please do file a new Issue there. In this case doing a search on the error code brings up several possible answers, top one being that something is locking your current skia-canvas module files (or maybe some other project file). Adding "git" to the search brings up other suggestions like firewall issues.
@mpaperno you dont appear to have enabled issues there yet, github disables it by default for forks
Ive had users report this too, and so far reports have been positive from switching the backend from vulkan to d3d for windows (through recompiling the library). But based on reading this, maybe I should disable using the gpu instead..
Hi, I'm curious if you (or your users) have seen any benefit from GPU rendering with D3D? Asking because with Vulkan the benefit it not apparent here.
Also wondering what is involved in switching to D3D... though perhaps off-topic here.
@mpaperno you dont appear to have enabled issues there yet, github disables it by default for forks
Gah, silly me. Fixed, thanks!
Hi, I'm curious if you (or your users) have seen any benefit from GPU rendering with D3D? Asking because with Vulkan the benefit it not apparent here.
I've not tried doing any tests, performance hasnt been a concern yet.
Also wondering what is involved in switching to D3D... though perhaps off-topic here.
My build scripts are very different to this repository by now, and some other tidying got involved in the change, so it is a little hard to figure out which bits are relevant. But I think the only real change that you would need to make is swapping --features vulkan,window
for --features skia-safe/d3d,window
in the windows build script. I dont think it needed any extra dependencies
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/mpaperno/skia-canvas/releases/download/1.1.1-mp/win32-x64-napi-v6-unknown.tar.gz
I think "https://github.com/mpaperno/skia-canvas/releases/download/v1.1.1-mp/win32-x64-napi-v6-unknown.tar.gz" is correct v1.1.1 not just 1.1.1
Unhandled promise rejection: Error: internal error in Neon module: Failed to enumerate Vulkan physical devices.: ERROR_INITIALIZATION_FAILED 0|wetbot | at Canvas.init (C:\Users\WETBOT\Documents\GitHub\wetbot\node_modules\skia-canvas\lib\index.js:41:45) 0|wetbot | at Canvas.alloc (C:\Users\WETBOT\Documents\GitHub\wetbot\node_modules\skia-canvas\lib\index.js:37:17) 0|wetbot | at new Canvas (C:\Users\WETBOT\Documents\GitHub\wetbot\node_modules\skia-canvas\lib\index.js:399:19) 0|wetbot | at Object.run (C:\Users\WETBOT\Documents\GitHub\wetbot\slash-commands\rank.js:128:24) 0|wetbot | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
How I can disable GPU rendering? My specs: GT610, Xeon E5 2696V3