Making supportsWebGPU more stringent

This commit is contained in:
Rezmason
2022-08-28 23:04:38 -07:00
committed by GitHub
parent 5133d44054
commit aee790bf4b

View File

@@ -7,7 +7,7 @@ document.addEventListener("touchmove", (e) => e.preventDefault(), {
});
const supportsWebGPU = async () => {
return window.GPUQueue != null;
return window.GPUQueue != null && navigator.gpu != null && navigator.gpu.getPreferredCanvasFormat != null;
};
document.body.onload = async () => {