Skip to content

TextureDescriptor::theoretical_memory_footprint - #10032

Open
sagudev wants to merge 2 commits into
gfx-rs:trunkfrom
sagudev:theorem-mem
Open

TextureDescriptor::theoretical_memory_footprint#10032
sagudev wants to merge 2 commits into
gfx-rs:trunkfrom
sagudev:theorem-mem

Conversation

@sagudev

@sagudev sagudev commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Connections
Inspired by https://bugzilla.mozilla.org/show_bug.cgi?id=2061941

Description
Add TextureDescriptor::theoretical_memory_footprint that estimates memory footprint of a texture. This will be also useful in servo.

Testing
None

Squash or Rebase?
Squash

Checklist

  • I self-reviewed and fully understand this PR.
  • WebGPU implementations built with wgpu may be affected behaviorally.
  • Validation and feature gates are in place to confine behavioral changes.
  • Tests demonstrate the validation and altered logic works.
  • CHANGELOG.md entries for the user-facing effects of this change are present.
  • The PR is minimal, and doesn't make sense to land as multiple PRs.
  • Commits are logically scoped and individually reviewable.
  • The PR description has enough context to understand the motivation and solution implemented.

sagudev added 2 commits August 8, 2026 12:57
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@teoxoy teoxoy self-assigned this Aug 11, 2026

@teoxoy teoxoy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM but @cwfitzgerald should we also use this in the D3D12 backend (ea84239)? Since right now mips are not taken into account.

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.

2 participants