Skip to content

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
@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
@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