Open Bug 1933328 Opened 5 days ago Updated 3 days ago

WebGPU: Handle 2024-08 renames in image copy APIs

Categories

(Core :: Graphics: WebGPU, task, P2)

task

Tracking

()

ASSIGNED

People

(Reporter: ErichDonGubler, Assigned: ErichDonGubler)

References

Details

(Keywords: leave-open)

Attachments

(2 files)

Motivating change upstream: gpuweb#4838

Summary: WebGPU: Handle 2024-09 renames in image copy APIs → WebGPU: Handle 2024-08 renames in image copy APIs

Driven by gpuweb#4838.

The vast majority of this script was implemented with a Nushell script,
using the nu binary and the wonderful fastmod tool

# Copy-pasted from the OP in [`gpuweb`#4838](https://github.com/gpuweb/gpuweb/pull/4838).
let renames_table = '
Type 	Old 	New 	Used in
dict 	GPUImageDataLayout 	GPUTexelCopyBufferLayout 	"writeTexture,
parent type of ↙"
dict 	GPUImageCopyBuffer 	"GPUTexelCopyBufferInfo
extends ↑" 	T2B, B2T
dict 	GPUImageCopyTexture 	GPUTexelCopyTextureInfo 	T2B, B2T, T2T, writeTexture
dict 	GPUImageCopyTextureTagged 	"GPUCopyExternalImageDestInfo
extends ↑" 	copyExternalImageToTexture
dict 	GPUImageCopyExternalImage 	GPUCopyExternalImageSourceInfo 	copyExternalImageToTexture
union 	GPUImageCopyExternalImageSource 	GPUCopyExternalImageSource 	member of ↖
'

let renames_table = $renames_table
  | from tsv
  | select 'Old ' 'New '
  | rename old new
  | update new { $in | lines | get 0 } # only the first line has the renamed symbol identifier
  | update new { str trim }
  | update old { str trim }
  | sort-by old | reverse # Replace most specific symbol names first (some have the same "word segments" but with fewer segments)

# Rename image APIs.
let rename_paths = [
  ...("dom/webgpu/*.{cpp,h}" | str expand)
  "dom/webidl/WebGPU.webidl"
] | each { glob $in } | flatten

for entry in $renames_table {
  print $'replacing ($entry.old | to nuon) with ($entry.new | to nuon)'
  fastmod --accept-all $'\b($entry.old)' $entry.new ...$rename_paths
}
Keywords: leave-open
Attachment #9439854 - Attachment description: Bug 1933328 - refactor(webgpu): handle image/texel renames from upstream IDL r=#webgpu-reviewers → Bug 1933328 - refactor(webgpu): handle 2024-08 image copy renames from upstream IDL r=#webgpu-reviewers
Keywords: leave-open
See Also: → 1921454
Keywords: leave-open
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/08a24ec85517 refactor(webgpu): handle 2024-08 image copy renames from upstream IDL r=webgpu-reviewers,webidl,teoxoy,emilio
Backout by agoloman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ccdf879264e5 Backed out changeset 08a24ec85517 for causing build bustages @ WebGpu. CLOSED TREE
Flags: needinfo?(egubler)
Pushed by egubler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/155ce9b483bd refactor(webgpu): handle 2024-08 image copy renames from upstream IDL r=webgpu-reviewers,webidl,teoxoy,emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: