Closed
Bug 2081416
Opened 1 month ago
Closed 25 days ago
WebGPU: Avoid redundant texture import code
Categories
(Core :: Graphics: WebGPU, enhancement, P1)
Core
Graphics: WebGPU
Tracking
()
RESOLVED
FIXED
161 Branch
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: aleiserson, Assigned: aleiserson)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
gfx/wgpu_bindings/src/server.rs contains code to import system-shared textures to wgpu. Currently, there are two versions of what is largely the same code, for the swapchain and external textures cases. Vulkan does not currently have an external texture version, but needs it soon. In the case of Vulkan, wgpu offers the import functionality, so it should not be necessary to reimplement it in wgpu_bindings at all.
| Assignee | ||
Comment 1•1 month ago
|
||
Refactors texture import code so that it can be reused for swapchain
surfaces and external textures.
- Identical calls to
wgpu_server_ensure_shared_texture_for_swap_chain
previously existed in all threecreate_texture_with_shared_texture_*
functions. These calls, and the rest of the swapchain shared texture
creation code in handling ofCreateTexture, move into a new function
create_shared_texture_for_swap_chain. - The code at the start of the
create_texture_with_shared_texture_*
functions that obtains the platform shared texture resource from
the prepared swap chain surface moves out of those functions into
create_shared_texture_for_swap_chain. - The
IOSurfaceswap chain path previously set
MTLTextureUsage::PixelFormatView.wgpuuses that only for
depth/stencil textures. I don't see why it is needed for swap chain
textures (the Metal docs say not to use it for component swizzle or
sRGB conversion), so I've left it out of the combined import.
Updated•1 month ago
|
Assignee: nobody → aleiserson
Status: NEW → ASSIGNED
Updated•29 days ago
|
Priority: -- → P1
Pushed by aleiserson@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/aed1419941c8
https://hg.mozilla.org/integration/autoland/rev/e0b5a44cef0e
WebGPU: Avoid redundant texture import code r=webgpu-reviewers,teoxoy
Comment 3•25 days ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 25 days ago
status-firefox161:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
Updated•8 days ago
|
QA Whiteboard: [qa-triage-done-c162/b161]
You need to log in
before you can comment on or make changes to this bug.
Description
•