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

Add R64Uint texture format #6453

Closed
wants to merge 6 commits into from
Closed

Conversation

atlv24
Copy link
Collaborator

@atlv24 atlv24 commented Oct 23, 2024

Connections
commits pulled from #5537

Description
add r64uint texture format, wgpu feature, naga capability, and adapter support detection for metal, directx, and vulkan

Testing
tests are in #5537

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@atlv24 atlv24 requested review from a team as code owners October 23, 2024 16:49
ErichDonGubler

This comment was marked as resolved.

wgpu-hal/src/metal/adapter.rs Outdated Show resolved Hide resolved
wgpu-hal/src/metal/adapter.rs Show resolved Hide resolved
naga/src/back/hlsl/conv.rs Outdated Show resolved Hide resolved
wgpu-hal/src/metal/adapter.rs Outdated Show resolved Hide resolved
wgpu-types/src/lib.rs Outdated Show resolved Hide resolved
@@ -3561,6 +3580,7 @@ impl TextureFormat {
| Self::Rg16Uint
| Self::Rgba16Uint
| Self::R32Uint
| Self::R64Uint
Copy link
Member

Choose a reason for hiding this comment

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

We should probably return None here if this is only meant to work with atomic ops.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

regular sampling should work with this format

Copy link
Member

Choose a reason for hiding this comment

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

Will it on the APIs we emulate it on?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I need it to, so consider that a blocking issue on the PR that actually implements this. Doesnt matter that it doesnt work with this PR because creating this texture errors every time anyways

@@ -3860,6 +3881,7 @@ impl TextureFormat {
Self::R32Uint
| Self::R32Sint
| Self::R32Float
| Self::R64Uint
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@@ -3780,6 +3800,7 @@ impl TextureFormat {
| Self::Rgba16Unorm
| Self::Rgba16Snorm
| Self::Rgba16Float
| Self::R64Uint
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

wgpu-hal/src/dx12/adapter.rs Outdated Show resolved Hide resolved
@teoxoy
Copy link
Member

teoxoy commented Oct 23, 2024

Please add an error when creating a texture with this format (for people trying to use this new feature) because there are currently no checks in naga that this format is only used with atomic ops (which are currently not implemented).

@atlv24 atlv24 force-pushed the r64-texture-format branch from 07b1608 to 5aa7e98 Compare October 23, 2024 20:35
@atlv24 atlv24 force-pushed the r64-texture-format branch from 5aa7e98 to a7538e3 Compare October 23, 2024 20:45
@@ -136,7 +136,7 @@ winit = { version = "0.29", features = ["android-native-activity"] }
# Metal dependencies
block = "0.1"
core-graphics-types = "0.1"
metal = { version = "0.29.0" }
metal = { version = "0.29.0", git = "https://github.com/gfx-rs/metal-rs.git", rev = "ae7030be0edff4cda88ece74137e5bcd28ef48fa" }
Copy link
Member

Choose a reason for hiding this comment

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

issue: We have a release impending, and we can't release to Crates.io with Git dependencies. This needs to be resolved upstream; I'm going to investigate releasing the current mainline history of Metal to see if this can be resolved before a WGPU release.

Copy link
Member

Choose a reason for hiding this comment

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

I have a PR open upstream: gfx-rs/metal-rs#341

Copy link
Member

Choose a reason for hiding this comment

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

metal v0.30.0 is now released!

ErichDonGubler

This comment was marked as resolved.

@teoxoy
Copy link
Member

teoxoy commented Oct 25, 2024

We were hopeful to have #5537 as part of a minor release if we could get the breaking changes in before we release v23 but what I expected was that said breaking changes were refactors of existing code (#6451) and adding a few enum variants but this PR and #6459 are not doing just that, they are partially implementing the feature and I have a very hard time reviewing partial implementations.

As @ErichDonGubler also mentioned on matrix, we shouldn't wait for PRs to land in order to release (unless they solve critical issues).

@teoxoy teoxoy closed this Oct 25, 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