Skip to content

Commit

Permalink
attachment canvasses
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Jan 30, 2025
1 parent bd63982 commit 944a299
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/cgp/cgp_canvasattachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export default class WebGpuCanvasAttachment
return this.#canvas;
}

render(commandEncoder, cb)
/**
* @param {function} cb
*/
render(cb)
{

const canvas = this.#cgp.canvas;
Expand Down Expand Up @@ -76,7 +79,7 @@ export default class WebGpuCanvasAttachment
};

// make a render pass encoder to encode render specific commands
this.#cgp.passEncoder = commandEncoder.beginRenderPass(this.#cgp.renderPassDescriptor);
this.#cgp.passEncoder = this.#cgp.commandEncoder.beginRenderPass(this.#cgp.renderPassDescriptor);
this.#cgp.textureView = this.#ctx.getCurrentTexture().createView();
this.#cgp.renderStart();

Expand Down
1 change: 1 addition & 0 deletions src/core/cgp/cgp_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class WebGpuContext extends CGState
this._stackErrorScopeLogs = [];

this.currentPipeDebug = null;
this.canvasAttachments = [];

this._defaultBlend = {
"color": {
Expand Down

0 comments on commit 944a299

Please sign in to comment.