Skip to content

Commit

Permalink
fix: fixed the issue where RenderCache could not cache RenderPipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
re-ovo committed Nov 14, 2024
1 parent 81b9cbc commit 1bf0bb3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/g-plugin-device-renderer/src/render/RenderCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,12 @@ export class RenderCache {
let renderPipeline = this.renderPipelinesCache.get(descriptor);
if (renderPipeline === null) {
const descriptorCopy = renderPipelineDescriptorCopy(descriptor);
descriptorCopy.colorAttachmentFormats =
descriptorCopy.colorAttachmentFormats.filter((f) => f);
renderPipeline = this.device.createRenderPipeline(descriptorCopy);
renderPipeline = this.device.createRenderPipeline({
...descriptorCopy,
colorAttachmentFormats: descriptor.colorAttachmentFormats.filter(
(f) => f,
),
});
this.renderPipelinesCache.add(descriptorCopy, renderPipeline);
}
return renderPipeline;
Expand Down

0 comments on commit 1bf0bb3

Please sign in to comment.