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

dx12: Add support for push constants #2866

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

JCapucho
Copy link

@JCapucho JCapucho commented Jul 10, 2022

Checklist

  • Run cargo clippy (shows some warning unrelated to my work).
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable (not applicable).
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
Requires gfx-rs/naga#2005 (merged)

Closes #2829

Description
Adds support for push constants on the dx12 backend by using a slot on the root signature for a constant buffer.

Testing
Tested with a very basic cube program, needs more testing

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

Small comments, but code looks good.

wgpu-hal/src/dx12/adapter.rs Show resolved Hide resolved
wgpu-hal/src/dx12/command.rs Outdated Show resolved Hide resolved
@JCapucho JCapucho force-pushed the dx12-push-constants branch from 51a6831 to 3d484da Compare August 14, 2022 17:14
@JCapucho JCapucho force-pushed the dx12-push-constants branch from 3d484da to e3d8dcd Compare August 29, 2022 11:11
@JCapucho JCapucho marked this pull request as ready for review August 29, 2022 11:12
@JCapucho JCapucho force-pushed the dx12-push-constants branch from e3d8dcd to c91d5c0 Compare September 8, 2022 10:45
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

LGTM after added documentation on the push constant size

@JCapucho
Copy link
Author

CI is failing on vulkan tests... on dx12 changes 🙃

@cwfitzgerald
Copy link
Member

Hmm, seems to be spurious

@cwfitzgerald cwfitzgerald merged commit c61f61c into gfx-rs:master Sep 20, 2022
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.

Implement Push Constants for DX12
2 participants