Skip to content

Re-add upload texture #2915

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

Merged
merged 4 commits into from
Jul 24, 2025
Merged

Re-add upload texture #2915

merged 4 commits into from
Jul 24, 2025

Conversation

Firestar99
Copy link
Collaborator

@Firestar99 Firestar99 commented Jul 21, 2025

Effectively just 3 commits without dependent PRs:

  • dd380f9 vello: code cleanup of resource overwrites
  • 45596c0 upload_texture: upload cpu textures as SRGBA8
  • df9e2e1 vello: fix wgpu::Texture leak within vello's context.resource_overrides HashMap

Texture upload node

TLDR: With @TrueDoctor we decided that SRGB8 for now is fine, but we would like to switch to f32 later and add a conversion step down to SRGB8 before we give it to vello.

We would like to have linear f32 textures, as discussed with @TrueDoctor. However, this implementation currently uses Rgba8UnormSrgb converted to with graphite's SRGB8 struct, as using Rgba32Float causes FF nightly to emit Uncaptured WebGPU error: In a pass parameter, caused by: Encoder is invalid. The real fun will be debugging that, since wgpu documents the error like this:

/// Used internally by wgpu functions to indicate the encoder already
/// contained an error. This variant should usually not be seen by users of
/// the API, since an effort should be made to provide the caller with a
/// more specific reason for the encoder being invalid.
#[error("Encoder is invalid")]
Invalid,

https://github.com/gfx-rs/wgpu/blob/9b966bf8a39b07bfc495fb43e8bf7725c5df440c/wgpu-core/src/command/mod.rs#L971-L976

In other words, I have no clue to go on what's going wrong. Changing the image format shouldn't have triggered anything really. The only thing I can think of is the image format being unsupported for sampling, I'd have to verify this later. At least vulkan says I very much can with my hardware.

@Firestar99 Firestar99 force-pushed the readd-upload-texture branch from f3c3a56 to ef54629 Compare July 24, 2025 10:04
@Firestar99 Firestar99 merged commit 2d11d96 into master Jul 24, 2025
4 checks passed
@Firestar99 Firestar99 deleted the readd-upload-texture branch July 24, 2025 10:51
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