summaryrefslogtreecommitdiff
path: root/ext/webgpu/01_webgpu.js
AgeCommit message (Collapse)Author
2024-11-17fix(ext/webgpu): Create GPUQuerySet converter before usage (#26883)reczkok
Converter for `GPUComputePassTimestampWrites` uses converter for `GPUQuerySet` before it is defined making it impossible to use. This PR simply reorders converter creation to resolve this issue. Logging the `GPUQuerySet` still fails (as mentioned in #26769) but it is now usable inside pass descriptors and works when used.
2024-09-22BREAKING(webgpu/unstable): move `width` and `height` options to ↵Divy Srivastava
`UnsafeWindowSurface` constructor (#24200) Fixes https://github.com/denoland/deno/issues/23508 `width` and `height` are required to configure the wgpu surface because Deno is headless and depends on user to create a window. The options were non-standard extension of `GPUCanvasConfiguration#configure`. This PR adds a required options parameter with the `width` and `height` options to `Deno.UnsafeWindowSurface` constructor. ```typescript // Old, non-standard extension of GPUCanvasConfiguration const surface = new Deno.UnsafeWindowSurface("x11", displayHandle, windowHandle); const context = surface.getContext(); context.configure({ width: 600, height: 800, /* ... */ }); ``` ```typescript // New const surface = new Deno.UnsafeWindowSurface({ system: "x11", windowHandle, displayHandle, width: 600, height: 800, }); const context = surface.getContext(); context.configure({ /* ... */ }); ```
2024-09-19refactor(ext/webgpu): align error messages (#25719)Ian Bull
Aligns the error messages in the ext/webgpu folder to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-09-06fix(runtime): use more null proto objects again (#25040)Kenta Moriuchi
proceed with #23921 This PR is a preparation for https://github.com/denoland/deno_lint/pull/1307 --------- Signed-off-by: Kenta Moriuchi <moriken@kimamass.com> Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-08-07fix(webgpu): Fix `GPUAdapter#isFallbackAdapter` and `GPUAdapter#info` ↵Kenta Moriuchi
properties (#24914) Fixed `GPUAdapter` bugs: * `GPUAdapter#isFallbackAdapter` being `undefined` * `GPUAdapter#info` throwing `TypeError` * introduced by #24783 * `GPUAdapter#info` closing adapter resources * introduced by #23752
2024-08-06BREAKING(webgpu/unstable): Replace async .requestAdapterInfo() with sync ↵Divy Srivastava
.info (#24783) Closes https://github.com/denoland/deno/issues/24779 Ref https://github.com/gpuweb/gpuweb/pull/4662
2024-08-01fix(ext/webgpu): assign missing `constants` property of shader about ↵Hajime-san
`GPUDevice.createRenderPipeline[Async]` (#24803) fixes https://github.com/denoland/deno/issues/24287
2024-07-31fix(ext/webgpu): don't crash while constructing GPUOutOfMemoryError (#24807)Luca Casonato
2024-07-12fix(ext/webgpu): GPUDevice.createRenderPipelineAsync should return a Promise ↵chirsz
(#24349) Fixes #24317
2024-05-23fix(runtime): use more null proto objects (#23921)Luca Casonato
This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-10fix(ext/webgpu): invalidate GPUAdapter when a device is created (#23752)Leo Kettmeir
This removes the need for using `Deno.resources` to close the gpuadapter resource, while being more spec compliant.
2024-05-06fix(ext/webgpu): correctly validate GPUExtent3D, GPUOrigin3D, GPUOrigin2D & ↵Hajime-san
GPUColor (#23413)
2024-05-05chore: update wgpu (#23684)Leo Kettmeir
2024-04-30docs: fix some typos in comments (#23520)findmyhappy
2024-03-14fix: typo in error from GPUBuffer.prototype.mapAsync (#22913)guangwu
2024-03-11chore: enable clippy unused_async rule (#22834)David Sherret
2024-01-27feat(unstable): implement `navigator.gpu.getPreferredCanvasFormat()` (#22149)Divy Srivastava
2024-01-26refactor: migrate extensions to virtual ops module (#22135)Bartek Iwańczuk
First pass of migrating away from `Deno.core.ensureFastOps()`. A few "tricky" ones have been left for a follow up.
2024-01-10refactor: use `core.ensureFastOps()` (#21888)Kenta Moriuchi
2024-01-05chore(ext/webgpu): include GPUCanvasContext in snapshot (#21773)Divy Srivastava
Part 1 of #21713 Changes: - Remove `.present()` and add a `presentGPUCanvasContext` (not exposed yet to users) - Move lazy load logic to `00_init.js`. This can be used to use webgpu on-demand from future code (OffScreenCanvas)
2024-01-04fix: strict type check for cross realms (#21669)Kenta Moriuchi
Deno v1.39 introduces `vm.runInNewContext`. This may cause problems when using `Object.prototype.isPrototypeOf` to check built-in types. ```js import vm from "node:vm"; const err = new Error(); const crossErr = vm.runInNewContext(`new Error()`); console.assert( !(crossErr instanceof Error) ); console.assert( Object.getPrototypeOf(err) !== Object.getPrototypeOf(crossErr) ); ``` This PR changes to check using internal slots solves them. --- current: ``` > import vm from "node:vm"; undefined > vm.runInNewContext(`new Error("message")`) Error {} > vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`) Date {} ``` this PR: ``` > import vm from "node:vm"; undefined > vm.runInNewContext(`new Error("message")`) Error: message at <anonymous>:1:1 > vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`) 2018-12-10T02:26:59.002Z ``` --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-27perf: remove opAsync (#21690)Matt Mastracci
`opAsync` requires a lookup by name on each async call. This is a mechanical translation of all opAsync calls to ensureFastOps. The `opAsync` API on Deno.core will be removed at a later time.
2023-12-09feat: bring back WebGPU (#20812)Leo Kettmeir
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com> Co-authored-by: Kenta Moriuchi <moriken@kimamass.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17BREAKING(unstable): remove WebGPU (#18094)Leo Kettmeir
This PR _**temporarily**_ removes WebGPU (which has behind the `--unstable` flag in Deno), due to performance complications due to its presence. It will be brought back in the future; as a point of reference, Chrome will ship WebGPU to stable on 26/04/2023. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-08refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme ↵Bartek Iwańczuk
for snapshotted modules (#18041) This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020
2023-02-23fix(webgpu): don't default to 0 for setVertexBuffer.size & properly use ↵Leo Kettmeir
webidl.setlike (#17800)
2023-02-20refactor: move webgpu files to ext root (#17832)Leo Kettmeir
Required for #17826
2022-05-15Revert "core: don't include_str extension js code (#10786)" (#14614)Aaron O'Mullan
This reverts commit 10e50a120744de71d6915af4ae93f8231607573d Alternative to #13217, IMO the tradeoffs made by #10786 aren't worth it. It breaks abstractions (crates being self-contained, deno_core without snapshotting etc...) and causes pain points / gotchas for both embedders & devs for a relatively minimal gain in incremental build time ... Closes #11030
2022-02-07refactor: update runtime code for primordial check for iterators (#13510)Bartek Iwańczuk
2022-02-04refactor: fix primordials for WebGPU (#13594)Bartek Iwańczuk
2022-02-01refactor: primordials for instanceof (#13527)Bartek Iwańczuk
2022-01-27Revert "refactor: update runtime code for primordial checks for "instanceof" ↵Bartek Iwańczuk
(#13497)" (#13511) This reverts commit 884143218fad0e18f7553aaf079d52de703f7601.
2022-01-27refactor: update runtime code for primordial checks for "instanceof" (#13497)Bartek Iwańczuk
2022-01-24chore: re-enable wgpu_sync (#13453)Aaron O'Mullan
2022-01-20revert(#13402): experiment: wgpu sync (#13439)Aaron O'Mullan
2022-01-20chore: update copyright year (#13434)Yoshiya Hinosawa
2022-01-19experiment: wgpu sync (#13402)Aaron O'Mullan
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-10-12chore: upgrade crates based on deno ast 0.3 (#12403)David Sherret
2021-09-02feat(fmt): add basic JS doc formatting (#11902)David Sherret
2021-08-24refactor(webgpu): use op interface idiomatically (#11835)Luca Casonato
2021-08-24chore(ext/webgpu): update wgpu to 0.10.0 (#11781)Leo K
Co-authored-by: Luca Casonato <hello@lcas.dev>
2021-08-11Rename extensions/ directory to ext/ (#11643)Ryan Dahl