Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 20f33eee8ec56ee62246bfa6c3fe006cdd6f944a
https://github.com/WebKit/WebKit/commit/20f33eee8ec56ee62246bfa6c3fe006cdd6f944a
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-24 (Thu, 24 Sep 2026)
Changed paths:
M Source/WebGPU/WebGPU/TextureView.h
M Source/WebGPU/WebGPU/TextureView.mm
Log Message:
-----------
WebGPU: Do not store WGPUTextureViewDescriptor in TextureView
https://bugs.webkit.org/show_bug.cgi?id=325143
rdar://188277403
Reviewed by Mike Wyrzykowski.
TextureView stored a copy of the WGPUTextureViewDescriptor it was
created with. Storing API descriptors in implementation objects is poor
form: the descriptors communicate the wgpu API call parameters for the
duration of the call only, and pointer fields of the copy dangle after
the call returns. Here the copy's label string view dangled.
Store the fields that are read instead: format, dimension,
baseMipLevel, mipLevelCount, baseArrayLayer, arrayLayerCount, aspect
and usage. Remove the unused descriptor() accessor.
This is work towards being able to add nextInChain to the WebGPU.h
descriptors.
* Source/WebGPU/WebGPU/TextureView.h:
* Source/WebGPU/WebGPU/TextureView.mm:
(WebGPU::TextureView::TextureView):
(WebGPU::TextureView::usage const):
(WebGPU::TextureView::format const):
(WebGPU::TextureView::mipLevelCount const):
(WebGPU::TextureView::baseMipLevel const):
(WebGPU::TextureView::aspect const):
(WebGPU::TextureView::arrayLayerCount const):
(WebGPU::TextureView::baseArrayLayer const):
(WebGPU::TextureView::dimension const):
Canonical link: https://commits.webkit.org/321817@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications