[webkit-changes] [WebKit/WebKit] 81eb82: [WebGPU] [Style] Inline members of Texture::m_desc...

Myles C. Maxfield noreply at github.com
Mon Jan 30 10:05:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 81eb82843a2a882d22e932d3a773a679f7cf5ee7
      https://github.com/WebKit/WebKit/commit/81eb82843a2a882d22e932d3a773a679f7cf5ee7
  Author: Myles C. Maxfield <mmaxfield at apple.com>
  Date:   2023-01-30 (Mon, 30 Jan 2023)

  Changed paths:
    M Source/WebGPU/WebGPU/CommandEncoder.mm
    M Source/WebGPU/WebGPU/Queue.mm
    M Source/WebGPU/WebGPU/Texture.h
    M Source/WebGPU/WebGPU/Texture.mm

  Log Message:
  -----------
  [WebGPU] [Style] Inline members of Texture::m_descriptor
https://bugs.webkit.org/show_bug.cgi?id=251325
rdar://104786027

Reviewed by Tadeu Zagallo.

This is a purely stylistic change, to match our implementation to the nouns-and-verbs
that the spec uses. The spec for GPUTexture says it has internal slots for each of
the fields individually, rather than retaining the whole descriptor. I think it's
a good idea to match the spec, just stylistically.

No tests because there is no behavior change.

* Source/WebGPU/WebGPU/CommandEncoder.mm:
(WebGPU::validateCopyBufferToTexture):
(WebGPU::CommandEncoder::copyBufferToTexture):
(WebGPU::validateCopyTextureToBuffer):
(WebGPU::CommandEncoder::copyTextureToBuffer):
(WebGPU::validateCopyTextureToTexture):
(WebGPU::CommandEncoder::copyTextureToTexture):
* Source/WebGPU/WebGPU/Queue.mm:
(WebGPU::validateWriteTexture):
(WebGPU::Queue::writeTexture):
* Source/WebGPU/WebGPU/Texture.h:
(WebGPU::Texture::width const):
(WebGPU::Texture::height const):
(WebGPU::Texture::depthOrArrayLayers const):
(WebGPU::Texture::mipLevelCount const):
(WebGPU::Texture::sampleCount const):
(WebGPU::Texture::dimension const):
(WebGPU::Texture::format const):
(WebGPU::Texture::usage const):
(WebGPU::Texture::descriptor const): Deleted.
* Source/WebGPU/WebGPU/Texture.mm:
(WebGPU::Texture::Texture):
(WebGPU::Texture::resolveTextureViewDescriptorDefaults const):
(WebGPU::Texture::arrayLayerCount const):
(WebGPU::Texture::validateCreateView const):
(WebGPU::Texture::createView):
(WebGPU::Texture::logicalMiplevelSpecificTextureExtent):
(WebGPU::Texture::physicalMiplevelSpecificTextureExtent):
(WebGPU::Texture::validateImageCopyTexture):
(WebGPU::Texture::validateTextureCopyRange):

Canonical link: https://commits.webkit.org/259565@main




More information about the webkit-changes mailing list