Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the fine CPU shader running #386

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Zoxc
Copy link
Collaborator

@Zoxc Zoxc commented Oct 13, 2023

This hooks up the fine CPU shader to the rest of the infrastructure.

  • TransientBindMap is moved outside of run_recording to allow passing CPU buffers from coarse to fine.
  • There's partial support for CPU image buffer added.
  • The transient map can now hold a TransientImage::CpuOwned CPU buffer for WriteOnce images. This is used to hold the result of fine.
  • There's new command Command::Writeback which writes TransientImage::CpuOwned back into a GPU texture view using the new writeback.wgsl shader.

This is based on #383.

@@ -0,0 +1,25 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this shader necessary? Can't we use wgpu::CommandEncoder::copy_buffer_to_texture or Command::UploadImage to perform the upload?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That can't be used with just a texture view.

src/engine.rs Outdated Show resolved Hide resolved
src/cpu_shader/fine.rs Show resolved Hide resolved
src/cpu_shader/fine.rs Show resolved Hide resolved
@Zoxc Zoxc force-pushed the fine-shader branch 2 times, most recently from 7f2f740 to 0747e52 Compare November 1, 2023 03:06
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since #456 we have standard copyright headers. Please update this shader file to be consistent with the others.

Suggested change
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense
// Copyright 2023 the Vello Authors
// SPDX-License-Identifier: Apache-2.0 OR MIT OR Unlicense

@xStrom xStrom mentioned this pull request Feb 29, 2024
@DJMcNab DJMcNab mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants