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 max_color_attachments and max_color_attachment_bytes_per_sample #5218

Merged
merged 6 commits into from
Feb 9, 2024

Conversation

nical
Copy link
Contributor

@nical nical commented Feb 7, 2024

Connections

Description

This PR adds the two limits. max_color_attachment was already partially implemented via a constant in wgpu-hal. The render bundle code still uses that instead of the device limit so there is followup work to do.

For max_color_attachment_bytes_per_sample This does a best effort to pick reasonable defaults since the limit is largely undocumented for most platforms (See the linked gpuweb discussion). The general idea is that in doubt, 32 bytes is a safe assumption, and the limit is mostly to cater to tiled GPUs so on non-tiled ones we could increase the limits (for example d3d12 does not target non-tiled GPUs today).

Testing

The CTS covers these.

Checklist

  • Run cargo fmt.
  • Run cargo clippy.
  • Run cargo xtask test to run tests.

@nical nical requested a review from a team as a code owner February 7, 2024 15:14
@nical nical added the area: validation Issues related to validation, diagnostics, and error handling label Feb 7, 2024
@nical nical force-pushed the max-color-attachments branch from 6e0b36b to f7b1b47 Compare February 7, 2024 16:08
@nical nical force-pushed the max-color-attachments branch from ff8c734 to 1cabd84 Compare February 8, 2024 10:19
@nical nical force-pushed the max-color-attachments branch from 0e274c0 to 0c9b3ca Compare February 8, 2024 10:36
@teoxoy teoxoy mentioned this pull request Feb 8, 2024
37 tasks
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

LGTM

@nical nical merged commit 990324f into gfx-rs:trunk Feb 9, 2024
27 checks passed
@nical nical deleted the max-color-attachments branch February 9, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: validation Issues related to validation, diagnostics, and error handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants