Changeset 213780 in webkit


Ignore:
Timestamp:
Mar 12, 2017 8:40:55 PM (7 years ago)
Author:
jonlee@apple.com
Message:

WebGPU Backend
https://bugs.webkit.org/show_bug.cgi?id=169535
<rdar://problem/31002364>

Patch by Dean Jackson <dino@apple.com> on 2017-03-12
Reviewed by Jon Lee.

Fill in the remainder of the WebGPU backend. This is effectively
a C++ representation of the Metal API.

  • WebCore.xcodeproj/project.pbxproj:
  • html/canvas/WebGPUDrawable.cpp:

(WebCore::WebGPUDrawable::WebGPUDrawable):

  • html/canvas/WebGPUDrawable.h:

(WebCore::GPUDrawable::texture): Deleted.

  • platform/graphics/cocoa/GPUBufferMetal.mm:

(WebCore::GPUBuffer::GPUBuffer):
(WebCore::GPUBuffer::platformBuffer):

  • platform/graphics/cocoa/GPUCommandBufferMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.

(WebCore::GPUCommandBuffer::GPUCommandBuffer):
(WebCore::GPUCommandBuffer::platformCommandBuffer):
(WebCore::GPUCommandBuffer::presentDrawable):

  • platform/graphics/cocoa/GPUCommandQueueMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.

(WebCore::GPUCommandQueue::GPUCommandQueue):
(WebCore::GPUCommandQueue::label):
(WebCore::GPUCommandQueue::setLabel):
(WebCore::GPUCommandQueue::platformCommandQueue):

  • platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm.

(WebCore::GPUDepthStencilDescriptor::GPUDepthStencilDescriptor):
(WebCore::GPUDepthStencilDescriptor::depthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::depthCompareFunction):
(WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction):
(WebCore::GPUDepthStencilDescriptor::platformDepthStencilDescriptor):

  • platform/graphics/cocoa/GPUDepthStencilStateMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.

(WebCore::GPUDepthStencilState::GPUDepthStencilState):
(WebCore::GPUDepthStencilState::label):
(WebCore::GPUDepthStencilState::setLabel):
(WebCore::GPUDepthStencilState::platformDepthStencilState):

  • platform/graphics/cocoa/GPUDrawableMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.

(WebCore::GPUDrawable::GPUDrawable):
(WebCore::GPUDrawable::release):
(WebCore::GPUDrawable::platformDrawable):
(WebCore::GPUDrawable::platformTexture):

  • platform/graphics/cocoa/GPUFunctionMetal.mm:

(WebCore::GPUFunction::GPUFunction):
(WebCore::GPUFunction::platformFunction):

  • platform/graphics/cocoa/GPULibraryMetal.mm:

(WebCore::GPULibrary::GPULibrary):
(WebCore::GPULibrary::setLabel):
(WebCore::GPULibrary::platformLibrary):

  • platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm: Added.

(WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
(WebCore::GPURenderCommandEncoder::setRenderPipelineState):
(WebCore::GPURenderCommandEncoder::setDepthStencilState):
(WebCore::GPURenderCommandEncoder::setVertexBuffer):
(WebCore::GPURenderCommandEncoder::setFragmentBuffer):
(WebCore::GPURenderCommandEncoder::drawPrimitives):
(WebCore::GPURenderCommandEncoder::endEncoding):
(WebCore::GPURenderCommandEncoder::platformRenderCommandEncoder):

  • platform/graphics/cocoa/GPURenderPassAttachmentDescriptorMetal.mm: Added.

(WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor):
(WebCore::GPURenderPassAttachmentDescriptor::loadAction):
(WebCore::GPURenderPassAttachmentDescriptor::setLoadAction):
(WebCore::GPURenderPassAttachmentDescriptor::storeAction):
(WebCore::GPURenderPassAttachmentDescriptor::setStoreAction):
(WebCore::GPURenderPassAttachmentDescriptor::setTexture):
(WebCore::GPURenderPassAttachmentDescriptor::platformRenderPassAttachmentDescriptor):

  • platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm: Added.

(WebCore::GPURenderPassColorAttachmentDescriptor::create):
(WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor):
(WebCore::GPURenderPassColorAttachmentDescriptor::clearColor):
(WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor):
(WebCore::GPURenderPassColorAttachmentDescriptor::platformRenderPassColorAttachmentDescriptor):

  • platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm: Added.

(WebCore::GPURenderPassDepthAttachmentDescriptor::create):
(WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor):
(WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth):
(WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth):
(WebCore::GPURenderPassDepthAttachmentDescriptor::platformRenderPassDepthAttachmentDescriptor):

  • platform/graphics/cocoa/GPURenderPassDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUBufferMetal.mm.

(WebCore::GPURenderPassDescriptor::GPURenderPassDescriptor):
(WebCore::GPURenderPassDescriptor::colorAttachments):
(WebCore::GPURenderPassDescriptor::depthAttachment):
(WebCore::GPURenderPassDescriptor::platformRenderPassDescriptor):

  • platform/graphics/cocoa/GPURenderPipelineColorAttachmentDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPULibraryMetal.mm.

(WebCore::GPURenderPipelineColorAttachmentDescriptor::create):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::platformRenderPipelineColorAttachmentDescriptor):

  • platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm: Added.

(WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
(WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setVertexFunction):
(WebCore::GPURenderPipelineDescriptor::setFragmentFunction):
(WebCore::GPURenderPipelineDescriptor::colorAttachments):
(WebCore::GPURenderPipelineDescriptor::reset):
(WebCore::GPURenderPipelineDescriptor::platformRenderPipelineDescriptor):

  • platform/graphics/cocoa/GPURenderPipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm.

(WebCore::GPURenderPipelineState::GPURenderPipelineState):
(WebCore::GPURenderPipelineState::label):
(WebCore::GPURenderPipelineState::setLabel):
(WebCore::GPURenderPipelineState::platformRenderPipelineState):

  • platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:

(WebCore::GPUTextureDescriptor::GPUTextureDescriptor):
(WebCore::GPUTextureDescriptor::platformTextureDescriptor):

  • platform/graphics/cocoa/GPUTextureMetal.mm:

(WebCore::GPUTexture::GPUTexture):
(WebCore::GPUTexture::platformTexture):

  • platform/graphics/gpu/GPUBuffer.cpp:
  • platform/graphics/gpu/GPUBuffer.h:
  • platform/graphics/gpu/GPUCommandBuffer.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.

(WebCore::GPUCommandBuffer::create):
(WebCore::GPUCommandBuffer::~GPUCommandBuffer):
(WebCore::GPUCommandBuffer::commit):
(WebCore::GPUCommandBuffer::createRenderCommandEncoder):
(WebCore::GPUCommandBuffer::presentDrawable):

  • platform/graphics/gpu/GPUCommandBuffer.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPUCommandQueue.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.

(WebCore::GPUCommandQueue::create):
(WebCore::GPUCommandQueue::~GPUCommandQueue):
(WebCore::GPUCommandQueue::createCommandBuffer):
(WebCore::GPUCommandQueue::label):
(WebCore::GPUCommandQueue::setLabel):

  • platform/graphics/gpu/GPUCommandQueue.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
  • platform/graphics/gpu/GPUDepthStencilDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.

(WebCore::GPUDepthStencilDescriptor::create):
(WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
(WebCore::GPUDepthStencilDescriptor::depthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled):
(WebCore::GPUDepthStencilDescriptor::depthCompareFunction):
(WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction):

  • platform/graphics/gpu/GPUDepthStencilDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPUDepthStencilState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.

(WebCore::GPUDepthStencilState::create):
(WebCore::GPUDepthStencilState::~GPUDepthStencilState):
(WebCore::GPUDepthStencilState::label):
(WebCore::GPUDepthStencilState::setLabel):

  • platform/graphics/gpu/GPUDepthStencilState.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
  • platform/graphics/gpu/GPUDevice.cpp:

(WebCore::GPUDevice::createCommandQueue):
(WebCore::GPUDevice::getFramebuffer):

  • platform/graphics/gpu/GPUDevice.h:

(WebCore::GPUDevice::markLayerComposited):
(WebCore::GPUDevice::createCommandQueue): Deleted.
(WebCore::GPUDevice::getFramebuffer): Deleted.

  • platform/graphics/gpu/GPUDrawable.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.

(WebCore::GPUDrawable::create):
(WebCore::GPUDrawable::~GPUDrawable):
(WebCore::GPUDrawable::release):

  • platform/graphics/gpu/GPUDrawable.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPUEnums.h: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
  • platform/graphics/gpu/GPUFunction.h:
  • platform/graphics/gpu/GPULibrary.cpp:
  • platform/graphics/gpu/GPULibrary.h:
  • platform/graphics/gpu/GPURenderCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.cpp.

(WebCore::GPURenderCommandEncoder::create):
(WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
(WebCore::GPURenderCommandEncoder::setRenderPipelineState):
(WebCore::GPURenderCommandEncoder::setDepthStencilState):
(WebCore::GPURenderCommandEncoder::setVertexBuffer):
(WebCore::GPURenderCommandEncoder::setFragmentBuffer):
(WebCore::GPURenderCommandEncoder::drawPrimitives):
(WebCore::GPURenderCommandEncoder::endEncoding):

  • platform/graphics/gpu/GPURenderCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.

(WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
(WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor):
(WebCore::GPURenderPassAttachmentDescriptor::loadAction):
(WebCore::GPURenderPassAttachmentDescriptor::setLoadAction):
(WebCore::GPURenderPassAttachmentDescriptor::storeAction):
(WebCore::GPURenderPassAttachmentDescriptor::setStoreAction):
(WebCore::GPURenderPassAttachmentDescriptor::setTexture):

  • platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUDevice.cpp.

(WebCore::GPURenderPassColorAttachmentDescriptor::create):
(WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor):
(WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
(WebCore::GPURenderPassColorAttachmentDescriptor::clearColor):
(WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor):

  • platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.

(WebCore::GPURenderPassDepthAttachmentDescriptor::create):
(WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor):
(WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
(WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth):
(WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth):

  • platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPURenderPassDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.

(WebCore::GPURenderPassDescriptor::create):
(WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
(WebCore::GPURenderPassDescriptor::depthAttachment):

  • platform/graphics/gpu/GPURenderPassDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.

(WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat):
(WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat):

  • platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
  • platform/graphics/gpu/GPURenderPipelineDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUDevice.cpp.

(WebCore::GPURenderPipelineDescriptor::create):
(WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
(WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat):
(WebCore::GPURenderPipelineDescriptor::setVertexFunction):
(WebCore::GPURenderPipelineDescriptor::setFragmentFunction):
(WebCore::GPURenderPipelineDescriptor::colorAttachments):

  • platform/graphics/gpu/GPURenderPipelineDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
  • platform/graphics/gpu/GPURenderPipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.cpp.

(WebCore::GPURenderPipelineState::create):
(WebCore::GPURenderPipelineState::~GPURenderPipelineState):
(WebCore::GPURenderPipelineState::label):
(WebCore::GPURenderPipelineState::setLabel):

  • platform/graphics/gpu/GPURenderPipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
  • platform/graphics/gpu/GPUTexture.cpp:

(WebCore::GPUTexture::createFromDrawable):
(WebCore::GPUTexture::createFromExistingTexture): Deleted.

  • platform/graphics/gpu/GPUTexture.h:
  • platform/graphics/gpu/GPUTextureDescriptor.cpp:
  • platform/graphics/gpu/GPUTextureDescriptor.h:
Location:
trunk/Source/WebCore
Files:
5 added
20 edited
35 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r213779 r213780  
     12017-03-12  Dean Jackson  <dino@apple.com>
     2
     3        WebGPU Backend
     4        https://bugs.webkit.org/show_bug.cgi?id=169535
     5        <rdar://problem/31002364>
     6
     7        Reviewed by Jon Lee.
     8
     9        Fill in the remainder of the WebGPU backend. This is effectively
     10        a C++ representation of the Metal API.
     11
     12        * WebCore.xcodeproj/project.pbxproj:
     13        * html/canvas/WebGPUDrawable.cpp:
     14        (WebCore::WebGPUDrawable::WebGPUDrawable):
     15        * html/canvas/WebGPUDrawable.h:
     16        (WebCore::GPUDrawable::texture): Deleted.
     17        * platform/graphics/cocoa/GPUBufferMetal.mm:
     18        (WebCore::GPUBuffer::GPUBuffer):
     19        (WebCore::GPUBuffer::platformBuffer):
     20        * platform/graphics/cocoa/GPUCommandBufferMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
     21        (WebCore::GPUCommandBuffer::GPUCommandBuffer):
     22        (WebCore::GPUCommandBuffer::platformCommandBuffer):
     23        (WebCore::GPUCommandBuffer::presentDrawable):
     24        * platform/graphics/cocoa/GPUCommandQueueMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
     25        (WebCore::GPUCommandQueue::GPUCommandQueue):
     26        (WebCore::GPUCommandQueue::label):
     27        (WebCore::GPUCommandQueue::setLabel):
     28        (WebCore::GPUCommandQueue::platformCommandQueue):
     29        * platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm.
     30        (WebCore::GPUDepthStencilDescriptor::GPUDepthStencilDescriptor):
     31        (WebCore::GPUDepthStencilDescriptor::depthWriteEnabled):
     32        (WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled):
     33        (WebCore::GPUDepthStencilDescriptor::depthCompareFunction):
     34        (WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction):
     35        (WebCore::GPUDepthStencilDescriptor::platformDepthStencilDescriptor):
     36        * platform/graphics/cocoa/GPUDepthStencilStateMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
     37        (WebCore::GPUDepthStencilState::GPUDepthStencilState):
     38        (WebCore::GPUDepthStencilState::label):
     39        (WebCore::GPUDepthStencilState::setLabel):
     40        (WebCore::GPUDepthStencilState::platformDepthStencilState):
     41        * platform/graphics/cocoa/GPUDrawableMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
     42        (WebCore::GPUDrawable::GPUDrawable):
     43        (WebCore::GPUDrawable::release):
     44        (WebCore::GPUDrawable::platformDrawable):
     45        (WebCore::GPUDrawable::platformTexture):
     46        * platform/graphics/cocoa/GPUFunctionMetal.mm:
     47        (WebCore::GPUFunction::GPUFunction):
     48        (WebCore::GPUFunction::platformFunction):
     49        * platform/graphics/cocoa/GPULibraryMetal.mm:
     50        (WebCore::GPULibrary::GPULibrary):
     51        (WebCore::GPULibrary::setLabel):
     52        (WebCore::GPULibrary::platformLibrary):
     53        * platform/graphics/cocoa/GPURenderCommandEncoderMetal.mm: Added.
     54        (WebCore::GPURenderCommandEncoder::GPURenderCommandEncoder):
     55        (WebCore::GPURenderCommandEncoder::setRenderPipelineState):
     56        (WebCore::GPURenderCommandEncoder::setDepthStencilState):
     57        (WebCore::GPURenderCommandEncoder::setVertexBuffer):
     58        (WebCore::GPURenderCommandEncoder::setFragmentBuffer):
     59        (WebCore::GPURenderCommandEncoder::drawPrimitives):
     60        (WebCore::GPURenderCommandEncoder::endEncoding):
     61        (WebCore::GPURenderCommandEncoder::platformRenderCommandEncoder):
     62        * platform/graphics/cocoa/GPURenderPassAttachmentDescriptorMetal.mm: Added.
     63        (WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor):
     64        (WebCore::GPURenderPassAttachmentDescriptor::loadAction):
     65        (WebCore::GPURenderPassAttachmentDescriptor::setLoadAction):
     66        (WebCore::GPURenderPassAttachmentDescriptor::storeAction):
     67        (WebCore::GPURenderPassAttachmentDescriptor::setStoreAction):
     68        (WebCore::GPURenderPassAttachmentDescriptor::setTexture):
     69        (WebCore::GPURenderPassAttachmentDescriptor::platformRenderPassAttachmentDescriptor):
     70        * platform/graphics/cocoa/GPURenderPassColorAttachmentDescriptorMetal.mm: Added.
     71        (WebCore::GPURenderPassColorAttachmentDescriptor::create):
     72        (WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor):
     73        (WebCore::GPURenderPassColorAttachmentDescriptor::clearColor):
     74        (WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor):
     75        (WebCore::GPURenderPassColorAttachmentDescriptor::platformRenderPassColorAttachmentDescriptor):
     76        * platform/graphics/cocoa/GPURenderPassDepthAttachmentDescriptorMetal.mm: Added.
     77        (WebCore::GPURenderPassDepthAttachmentDescriptor::create):
     78        (WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor):
     79        (WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth):
     80        (WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth):
     81        (WebCore::GPURenderPassDepthAttachmentDescriptor::platformRenderPassDepthAttachmentDescriptor):
     82        * platform/graphics/cocoa/GPURenderPassDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUBufferMetal.mm.
     83        (WebCore::GPURenderPassDescriptor::GPURenderPassDescriptor):
     84        (WebCore::GPURenderPassDescriptor::colorAttachments):
     85        (WebCore::GPURenderPassDescriptor::depthAttachment):
     86        (WebCore::GPURenderPassDescriptor::platformRenderPassDescriptor):
     87        * platform/graphics/cocoa/GPURenderPipelineColorAttachmentDescriptorMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPULibraryMetal.mm.
     88        (WebCore::GPURenderPipelineColorAttachmentDescriptor::create):
     89        (WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor):
     90        (WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat):
     91        (WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat):
     92        (WebCore::GPURenderPipelineColorAttachmentDescriptor::platformRenderPipelineColorAttachmentDescriptor):
     93        * platform/graphics/cocoa/GPURenderPipelineDescriptorMetal.mm: Added.
     94        (WebCore::GPURenderPipelineDescriptor::GPURenderPipelineDescriptor):
     95        (WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat):
     96        (WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat):
     97        (WebCore::GPURenderPipelineDescriptor::setVertexFunction):
     98        (WebCore::GPURenderPipelineDescriptor::setFragmentFunction):
     99        (WebCore::GPURenderPipelineDescriptor::colorAttachments):
     100        (WebCore::GPURenderPipelineDescriptor::reset):
     101        (WebCore::GPURenderPipelineDescriptor::platformRenderPipelineDescriptor):
     102        * platform/graphics/cocoa/GPURenderPipelineStateMetal.mm: Copied from Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm.
     103        (WebCore::GPURenderPipelineState::GPURenderPipelineState):
     104        (WebCore::GPURenderPipelineState::label):
     105        (WebCore::GPURenderPipelineState::setLabel):
     106        (WebCore::GPURenderPipelineState::platformRenderPipelineState):
     107        * platform/graphics/cocoa/GPUTextureDescriptorMetal.mm:
     108        (WebCore::GPUTextureDescriptor::GPUTextureDescriptor):
     109        (WebCore::GPUTextureDescriptor::platformTextureDescriptor):
     110        * platform/graphics/cocoa/GPUTextureMetal.mm:
     111        (WebCore::GPUTexture::GPUTexture):
     112        (WebCore::GPUTexture::platformTexture):
     113        * platform/graphics/gpu/GPUBuffer.cpp:
     114        * platform/graphics/gpu/GPUBuffer.h:
     115        * platform/graphics/gpu/GPUCommandBuffer.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
     116        (WebCore::GPUCommandBuffer::create):
     117        (WebCore::GPUCommandBuffer::~GPUCommandBuffer):
     118        (WebCore::GPUCommandBuffer::commit):
     119        (WebCore::GPUCommandBuffer::createRenderCommandEncoder):
     120        (WebCore::GPUCommandBuffer::presentDrawable):
     121        * platform/graphics/gpu/GPUCommandBuffer.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     122        * platform/graphics/gpu/GPUCommandQueue.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
     123        (WebCore::GPUCommandQueue::create):
     124        (WebCore::GPUCommandQueue::~GPUCommandQueue):
     125        (WebCore::GPUCommandQueue::createCommandBuffer):
     126        (WebCore::GPUCommandQueue::label):
     127        (WebCore::GPUCommandQueue::setLabel):
     128        * platform/graphics/gpu/GPUCommandQueue.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
     129        * platform/graphics/gpu/GPUDepthStencilDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
     130        (WebCore::GPUDepthStencilDescriptor::create):
     131        (WebCore::GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor):
     132        (WebCore::GPUDepthStencilDescriptor::depthWriteEnabled):
     133        (WebCore::GPUDepthStencilDescriptor::setDepthWriteEnabled):
     134        (WebCore::GPUDepthStencilDescriptor::depthCompareFunction):
     135        (WebCore::GPUDepthStencilDescriptor::setDepthCompareFunction):
     136        * platform/graphics/gpu/GPUDepthStencilDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     137        * platform/graphics/gpu/GPUDepthStencilState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
     138        (WebCore::GPUDepthStencilState::create):
     139        (WebCore::GPUDepthStencilState::~GPUDepthStencilState):
     140        (WebCore::GPUDepthStencilState::label):
     141        (WebCore::GPUDepthStencilState::setLabel):
     142        * platform/graphics/gpu/GPUDepthStencilState.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
     143        * platform/graphics/gpu/GPUDevice.cpp:
     144        (WebCore::GPUDevice::createCommandQueue):
     145        (WebCore::GPUDevice::getFramebuffer):
     146        * platform/graphics/gpu/GPUDevice.h:
     147        (WebCore::GPUDevice::markLayerComposited):
     148        (WebCore::GPUDevice::createCommandQueue): Deleted.
     149        (WebCore::GPUDevice::getFramebuffer): Deleted.
     150        * platform/graphics/gpu/GPUDrawable.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
     151        (WebCore::GPUDrawable::create):
     152        (WebCore::GPUDrawable::~GPUDrawable):
     153        (WebCore::GPUDrawable::release):
     154        * platform/graphics/gpu/GPUDrawable.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     155        * platform/graphics/gpu/GPUEnums.h: Copied from Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm.
     156        * platform/graphics/gpu/GPUFunction.h:
     157        * platform/graphics/gpu/GPULibrary.cpp:
     158        * platform/graphics/gpu/GPULibrary.h:
     159        * platform/graphics/gpu/GPURenderCommandEncoder.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.cpp.
     160        (WebCore::GPURenderCommandEncoder::create):
     161        (WebCore::GPURenderCommandEncoder::~GPURenderCommandEncoder):
     162        (WebCore::GPURenderCommandEncoder::setRenderPipelineState):
     163        (WebCore::GPURenderCommandEncoder::setDepthStencilState):
     164        (WebCore::GPURenderCommandEncoder::setVertexBuffer):
     165        (WebCore::GPURenderCommandEncoder::setFragmentBuffer):
     166        (WebCore::GPURenderCommandEncoder::drawPrimitives):
     167        (WebCore::GPURenderCommandEncoder::endEncoding):
     168        * platform/graphics/gpu/GPURenderCommandEncoder.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     169        * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
     170        (WebCore::GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor):
     171        (WebCore::GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor):
     172        (WebCore::GPURenderPassAttachmentDescriptor::loadAction):
     173        (WebCore::GPURenderPassAttachmentDescriptor::setLoadAction):
     174        (WebCore::GPURenderPassAttachmentDescriptor::storeAction):
     175        (WebCore::GPURenderPassAttachmentDescriptor::setStoreAction):
     176        (WebCore::GPURenderPassAttachmentDescriptor::setTexture):
     177        * platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     178        * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUDevice.cpp.
     179        (WebCore::GPURenderPassColorAttachmentDescriptor::create):
     180        (WebCore::GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor):
     181        (WebCore::GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor):
     182        (WebCore::GPURenderPassColorAttachmentDescriptor::clearColor):
     183        (WebCore::GPURenderPassColorAttachmentDescriptor::setClearColor):
     184        * platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     185        * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
     186        (WebCore::GPURenderPassDepthAttachmentDescriptor::create):
     187        (WebCore::GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor):
     188        (WebCore::GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor):
     189        (WebCore::GPURenderPassDepthAttachmentDescriptor::clearDepth):
     190        (WebCore::GPURenderPassDepthAttachmentDescriptor::setClearDepth):
     191        * platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     192        * platform/graphics/gpu/GPURenderPassDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp.
     193        (WebCore::GPURenderPassDescriptor::create):
     194        (WebCore::GPURenderPassDescriptor::~GPURenderPassDescriptor):
     195        (WebCore::GPURenderPassDescriptor::depthAttachment):
     196        * platform/graphics/gpu/GPURenderPassDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     197        * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.cpp.
     198        (WebCore::GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor):
     199        (WebCore::GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor):
     200        (WebCore::GPURenderPipelineColorAttachmentDescriptor::pixelFormat):
     201        (WebCore::GPURenderPipelineColorAttachmentDescriptor::setPixelFormat):
     202        * platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPUTexture.h.
     203        * platform/graphics/gpu/GPURenderPipelineDescriptor.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUDevice.cpp.
     204        (WebCore::GPURenderPipelineDescriptor::create):
     205        (WebCore::GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor):
     206        (WebCore::GPURenderPipelineDescriptor::depthAttachmentPixelFormat):
     207        (WebCore::GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat):
     208        (WebCore::GPURenderPipelineDescriptor::setVertexFunction):
     209        (WebCore::GPURenderPipelineDescriptor::setFragmentFunction):
     210        (WebCore::GPURenderPipelineDescriptor::colorAttachments):
     211        * platform/graphics/gpu/GPURenderPipelineDescriptor.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
     212        * platform/graphics/gpu/GPURenderPipelineState.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.cpp.
     213        (WebCore::GPURenderPipelineState::create):
     214        (WebCore::GPURenderPipelineState::~GPURenderPipelineState):
     215        (WebCore::GPURenderPipelineState::label):
     216        (WebCore::GPURenderPipelineState::setLabel):
     217        * platform/graphics/gpu/GPURenderPipelineState.h: Copied from Source/WebCore/platform/graphics/gpu/GPULibrary.h.
     218        * platform/graphics/gpu/GPUTexture.cpp:
     219        (WebCore::GPUTexture::createFromDrawable):
     220        (WebCore::GPUTexture::createFromExistingTexture): Deleted.
     221        * platform/graphics/gpu/GPUTexture.h:
     222        * platform/graphics/gpu/GPUTextureDescriptor.cpp:
     223        * platform/graphics/gpu/GPUTextureDescriptor.h:
     224
    12252017-03-12  Zalan Bujtas  <zalan@apple.com>
    2226
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r213762 r213780  
    13811381                316BDBB71E7357CB00DE0D5A /* GPUTextureDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBB51E7357CB00DE0D5A /* GPUTextureDescriptor.cpp */; };
    13821382                316BDBB81E7357CB00DE0D5A /* GPUTextureDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBB61E7357CB00DE0D5A /* GPUTextureDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1383                316BDBBB1E73880600DE0D5A /* GPUCommandQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBB91E73880600DE0D5A /* GPUCommandQueue.cpp */; };
     1384                316BDBBC1E73880600DE0D5A /* GPUCommandQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBBA1E73880600DE0D5A /* GPUCommandQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1385                316BDBBE1E73881300DE0D5A /* GPUCommandQueueMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBBD1E73881300DE0D5A /* GPUCommandQueueMetal.mm */; };
     1386                316BDBC71E75F08200DE0D5A /* GPUCommandBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBC41E75EE2400DE0D5A /* GPUCommandBuffer.cpp */; };
     1387                316BDBC81E75F08D00DE0D5A /* GPUCommandBufferMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBC61E75EE3D00DE0D5A /* GPUCommandBufferMetal.mm */; };
     1388                316BDBCC1E75F17B00DE0D5A /* GPUDrawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBCA1E75F17600DE0D5A /* GPUDrawable.cpp */; };
     1389                316BDBCD1E75F18400DE0D5A /* GPUDrawable.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBCB1E75F17600DE0D5A /* GPUDrawable.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1390                316BDBCE1E75F18A00DE0D5A /* GPUCommandBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBC51E75EE2400DE0D5A /* GPUCommandBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1391                316BDBCF1E75F19900DE0D5A /* GPUDrawableMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBC91E75F16200DE0D5A /* GPUDrawableMetal.mm */; };
     1392                316BDBD21E75F7B200DE0D5A /* GPURenderPassDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBD01E75F7AE00DE0D5A /* GPURenderPassDescriptor.cpp */; };
     1393                316BDBD31E75F7B600DE0D5A /* GPURenderPassDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBD11E75F7AE00DE0D5A /* GPURenderPassDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1394                316BDBD51E75F7CF00DE0D5A /* GPURenderPassDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBD41E75F7CA00DE0D5A /* GPURenderPassDescriptorMetal.mm */; };
     1395                316BDBD71E7612C800DE0D5A /* GPURenderPassColorAttachmentDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBD61E7612C400DE0D5A /* GPURenderPassColorAttachmentDescriptorMetal.mm */; };
     1396                316BDBDA1E7612E000DE0D5A /* GPURenderPassColorAttachmentDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBD81E7612DB00DE0D5A /* GPURenderPassColorAttachmentDescriptor.cpp */; };
     1397                316BDBDB1E7612E200DE0D5A /* GPURenderPassColorAttachmentDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBD91E7612DB00DE0D5A /* GPURenderPassColorAttachmentDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1398                316BDBDE1E76137200DE0D5A /* GPURenderPassAttachmentDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBDC1E76136C00DE0D5A /* GPURenderPassAttachmentDescriptor.cpp */; };
     1399                316BDBDF1E76137500DE0D5A /* GPURenderPassAttachmentDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBDD1E76136C00DE0D5A /* GPURenderPassAttachmentDescriptor.h */; };
     1400                316BDBE11E761CB900DE0D5A /* GPURenderPassAttachmentDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBE01E761CB500DE0D5A /* GPURenderPassAttachmentDescriptorMetal.mm */; };
     1401                316BDBE41E761F0500DE0D5A /* GPURenderPassDepthAttachmentDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBE31E761EFF00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1402                316BDBE51E761F0A00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBE21E761EFF00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.cpp */; };
     1403                316BDBE71E761F2E00DE0D5A /* GPURenderPassDepthAttachmentDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBE61E761F2700DE0D5A /* GPURenderPassDepthAttachmentDescriptorMetal.mm */; };
     1404                316BDBEA1E76244900DE0D5A /* GPURenderCommandEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBE81E76244300DE0D5A /* GPURenderCommandEncoder.cpp */; };
     1405                316BDBEB1E76244D00DE0D5A /* GPURenderCommandEncoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBE91E76244400DE0D5A /* GPURenderCommandEncoder.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1406                316BDBED1E76248200DE0D5A /* GPURenderCommandEncoderMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBEC1E76246B00DE0D5A /* GPURenderCommandEncoderMetal.mm */; };
     1407                316BDBF01E76292000DE0D5A /* GPUDepthStencilState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBEF1E76291B00DE0D5A /* GPUDepthStencilState.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1408                316BDBF11E76292500DE0D5A /* GPUDepthStencilState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBEE1E76291B00DE0D5A /* GPUDepthStencilState.cpp */; };
     1409                316BDBF31E76293C00DE0D5A /* GPUDepthStencilStateMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBF21E76293700DE0D5A /* GPUDepthStencilStateMetal.mm */; };
     1410                316BDBF61E762AD100DE0D5A /* GPUDepthStencilDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBF41E762ACD00DE0D5A /* GPUDepthStencilDescriptor.cpp */; };
     1411                316BDBF71E762AD500DE0D5A /* GPUDepthStencilDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBF51E762ACD00DE0D5A /* GPUDepthStencilDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1412                316BDBF91E762BF400DE0D5A /* GPUDepthStencilDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBF81E762BEF00DE0D5A /* GPUDepthStencilDescriptorMetal.mm */; };
     1413                316BDBFB1E762D0400DE0D5A /* GPUEnums.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBFA1E762D0400DE0D5A /* GPUEnums.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1414                316BDC001E762F5D00DE0D5A /* GPURenderPipelineDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBFC1E762F5700DE0D5A /* GPURenderPipelineDescriptor.cpp */; };
     1415                316BDC011E762F6100DE0D5A /* GPURenderPipelineState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDBFE1E762F5700DE0D5A /* GPURenderPipelineState.cpp */; };
     1416                316BDC021E762F6400DE0D5A /* GPURenderPipelineDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBFD1E762F5700DE0D5A /* GPURenderPipelineDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1417                316BDC031E762F6900DE0D5A /* GPURenderPipelineState.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDBFF1E762F5700DE0D5A /* GPURenderPipelineState.h */; settings = {ATTRIBUTES = (Private, ); }; };
     1418                316BDC061E762F8300DE0D5A /* GPURenderPipelineDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDC041E762F7E00DE0D5A /* GPURenderPipelineDescriptorMetal.mm */; };
     1419                316BDC071E762F8600DE0D5A /* GPURenderPipelineStateMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDC051E762F7E00DE0D5A /* GPURenderPipelineStateMetal.mm */; };
     1420                316BDC0B1E76344E00DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 316BDC0A1E76343600DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm */; };
     1421                316BDC0C1E7634CF00DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316BDC081E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp */; };
     1422                316BDC0D1E7634D200DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 316BDC091E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
    13831423                316FE0710E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */; };
    13841424                316FE0720E6CCBEE00BF6088 /* JSCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */; };
     
    88158855                316BDBB51E7357CB00DE0D5A /* GPUTextureDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUTextureDescriptor.cpp; sourceTree = "<group>"; };
    88168856                316BDBB61E7357CB00DE0D5A /* GPUTextureDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUTextureDescriptor.h; sourceTree = "<group>"; };
     8857                316BDBB91E73880600DE0D5A /* GPUCommandQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUCommandQueue.cpp; sourceTree = "<group>"; };
     8858                316BDBBA1E73880600DE0D5A /* GPUCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUCommandQueue.h; sourceTree = "<group>"; };
     8859                316BDBBD1E73881300DE0D5A /* GPUCommandQueueMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUCommandQueueMetal.mm; sourceTree = "<group>"; };
     8860                316BDBC41E75EE2400DE0D5A /* GPUCommandBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUCommandBuffer.cpp; sourceTree = "<group>"; };
     8861                316BDBC51E75EE2400DE0D5A /* GPUCommandBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUCommandBuffer.h; sourceTree = "<group>"; };
     8862                316BDBC61E75EE3D00DE0D5A /* GPUCommandBufferMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUCommandBufferMetal.mm; sourceTree = "<group>"; };
     8863                316BDBC91E75F16200DE0D5A /* GPUDrawableMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDrawableMetal.mm; sourceTree = "<group>"; };
     8864                316BDBCA1E75F17600DE0D5A /* GPUDrawable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDrawable.cpp; sourceTree = "<group>"; };
     8865                316BDBCB1E75F17600DE0D5A /* GPUDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUDrawable.h; sourceTree = "<group>"; };
     8866                316BDBD01E75F7AE00DE0D5A /* GPURenderPassDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPassDescriptor.cpp; sourceTree = "<group>"; };
     8867                316BDBD11E75F7AE00DE0D5A /* GPURenderPassDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPassDescriptor.h; sourceTree = "<group>"; };
     8868                316BDBD41E75F7CA00DE0D5A /* GPURenderPassDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPassDescriptorMetal.mm; sourceTree = "<group>"; };
     8869                316BDBD61E7612C400DE0D5A /* GPURenderPassColorAttachmentDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPassColorAttachmentDescriptorMetal.mm; sourceTree = "<group>"; };
     8870                316BDBD81E7612DB00DE0D5A /* GPURenderPassColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPassColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     8871                316BDBD91E7612DB00DE0D5A /* GPURenderPassColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPassColorAttachmentDescriptor.h; sourceTree = "<group>"; };
     8872                316BDBDC1E76136C00DE0D5A /* GPURenderPassAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPassAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     8873                316BDBDD1E76136C00DE0D5A /* GPURenderPassAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPassAttachmentDescriptor.h; sourceTree = "<group>"; };
     8874                316BDBE01E761CB500DE0D5A /* GPURenderPassAttachmentDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPassAttachmentDescriptorMetal.mm; sourceTree = "<group>"; };
     8875                316BDBE21E761EFF00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPassDepthAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     8876                316BDBE31E761EFF00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPassDepthAttachmentDescriptor.h; sourceTree = "<group>"; };
     8877                316BDBE61E761F2700DE0D5A /* GPURenderPassDepthAttachmentDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPassDepthAttachmentDescriptorMetal.mm; sourceTree = "<group>"; };
     8878                316BDBE81E76244300DE0D5A /* GPURenderCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderCommandEncoder.cpp; sourceTree = "<group>"; };
     8879                316BDBE91E76244400DE0D5A /* GPURenderCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderCommandEncoder.h; sourceTree = "<group>"; };
     8880                316BDBEC1E76246B00DE0D5A /* GPURenderCommandEncoderMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderCommandEncoderMetal.mm; sourceTree = "<group>"; };
     8881                316BDBEE1E76291B00DE0D5A /* GPUDepthStencilState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDepthStencilState.cpp; sourceTree = "<group>"; };
     8882                316BDBEF1E76291B00DE0D5A /* GPUDepthStencilState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUDepthStencilState.h; sourceTree = "<group>"; };
     8883                316BDBF21E76293700DE0D5A /* GPUDepthStencilStateMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDepthStencilStateMetal.mm; sourceTree = "<group>"; };
     8884                316BDBF41E762ACD00DE0D5A /* GPUDepthStencilDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPUDepthStencilDescriptor.cpp; sourceTree = "<group>"; };
     8885                316BDBF51E762ACD00DE0D5A /* GPUDepthStencilDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUDepthStencilDescriptor.h; sourceTree = "<group>"; };
     8886                316BDBF81E762BEF00DE0D5A /* GPUDepthStencilDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUDepthStencilDescriptorMetal.mm; sourceTree = "<group>"; };
     8887                316BDBFA1E762D0400DE0D5A /* GPUEnums.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPUEnums.h; sourceTree = "<group>"; };
     8888                316BDBFC1E762F5700DE0D5A /* GPURenderPipelineDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPipelineDescriptor.cpp; sourceTree = "<group>"; };
     8889                316BDBFD1E762F5700DE0D5A /* GPURenderPipelineDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPipelineDescriptor.h; sourceTree = "<group>"; };
     8890                316BDBFE1E762F5700DE0D5A /* GPURenderPipelineState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPipelineState.cpp; sourceTree = "<group>"; };
     8891                316BDBFF1E762F5700DE0D5A /* GPURenderPipelineState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPipelineState.h; sourceTree = "<group>"; };
     8892                316BDC041E762F7E00DE0D5A /* GPURenderPipelineDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPipelineDescriptorMetal.mm; sourceTree = "<group>"; };
     8893                316BDC051E762F7E00DE0D5A /* GPURenderPipelineStateMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPipelineStateMetal.mm; sourceTree = "<group>"; };
     8894                316BDC081E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GPURenderPipelineColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     8895                316BDC091E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GPURenderPipelineColorAttachmentDescriptor.h; sourceTree = "<group>"; };
     8896                316BDC0A1E76343600DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPURenderPipelineColorAttachmentDescriptorMetal.mm; sourceTree = "<group>"; };
    88178897                316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframeRule.cpp; sourceTree = "<group>"; };
    88188898                316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSKeyframeRule.h; sourceTree = "<group>"; };
     
    89058985                31A089021E737B4D003B6609 /* WebGPUTextureDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGPUTextureDescriptor.h; sourceTree = "<group>"; };
    89068986                31A089031E737B4D003B6609 /* WebGPUTextureDescriptor.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGPUTextureDescriptor.idl; sourceTree = "<group>"; };
    8907                 31A0891B1E738D59003B6609 /* JSWebGPUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUBuffer.cpp; path = JSWebGPUBuffer.cpp; sourceTree = "<group>"; };
    8908                 31A0891D1E738D59003B6609 /* JSWebGPUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUBuffer.h; path = JSWebGPUBuffer.h; sourceTree = "<group>"; };
    8909                 31A0891E1E738D59003B6609 /* JSWebGPUCommandBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUCommandBuffer.cpp; path = JSWebGPUCommandBuffer.cpp; sourceTree = "<group>"; };
    8910                 31A089201E738D59003B6609 /* JSWebGPUCommandBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUCommandBuffer.h; path = JSWebGPUCommandBuffer.h; sourceTree = "<group>"; };
    8911                 31A089211E738D59003B6609 /* JSWebGPUCommandQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUCommandQueue.cpp; path = JSWebGPUCommandQueue.cpp; sourceTree = "<group>"; };
    8912                 31A089231E738D59003B6609 /* JSWebGPUCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUCommandQueue.h; path = JSWebGPUCommandQueue.h; sourceTree = "<group>"; };
    8913                 31A089241E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUDepthStencilDescriptor.cpp; path = JSWebGPUDepthStencilDescriptor.cpp; sourceTree = "<group>"; };
    8914                 31A089261E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUDepthStencilDescriptor.h; path = JSWebGPUDepthStencilDescriptor.h; sourceTree = "<group>"; };
    8915                 31A089271E738D59003B6609 /* JSWebGPUDepthStencilState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUDepthStencilState.cpp; path = JSWebGPUDepthStencilState.cpp; sourceTree = "<group>"; };
    8916                 31A089291E738D59003B6609 /* JSWebGPUDepthStencilState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUDepthStencilState.h; path = JSWebGPUDepthStencilState.h; sourceTree = "<group>"; };
    8917                 31A0892A1E738D59003B6609 /* JSWebGPUDrawable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUDrawable.cpp; path = JSWebGPUDrawable.cpp; sourceTree = "<group>"; };
    8918                 31A0892C1E738D59003B6609 /* JSWebGPUDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUDrawable.h; path = JSWebGPUDrawable.h; sourceTree = "<group>"; };
    8919                 31A0892D1E738D59003B6609 /* JSWebGPUFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUFunction.cpp; path = JSWebGPUFunction.cpp; sourceTree = "<group>"; };
    8920                 31A0892F1E738D59003B6609 /* JSWebGPUFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUFunction.h; path = JSWebGPUFunction.h; sourceTree = "<group>"; };
    8921                 31A089301E738D59003B6609 /* JSWebGPULibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPULibrary.cpp; path = JSWebGPULibrary.cpp; sourceTree = "<group>"; };
    8922                 31A089321E738D59003B6609 /* JSWebGPULibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPULibrary.h; path = JSWebGPULibrary.h; sourceTree = "<group>"; };
    8923                 31A089331E738D59003B6609 /* JSWebGPURenderCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderCommandEncoder.cpp; path = JSWebGPURenderCommandEncoder.cpp; sourceTree = "<group>"; };
    8924                 31A089351E738D59003B6609 /* JSWebGPURenderCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderCommandEncoder.h; path = JSWebGPURenderCommandEncoder.h; sourceTree = "<group>"; };
    8925                 31A089361E738D59003B6609 /* JSWebGPURenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderingContext.cpp; path = JSWebGPURenderingContext.cpp; sourceTree = "<group>"; };
    8926                 31A089381E738D59003B6609 /* JSWebGPURenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderingContext.h; path = JSWebGPURenderingContext.h; sourceTree = "<group>"; };
    8927                 31A089391E738D59003B6609 /* JSWebGPURenderPassAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPassAttachmentDescriptor.cpp; path = JSWebGPURenderPassAttachmentDescriptor.cpp; sourceTree = "<group>"; };
    8928                 31A0893B1E738D59003B6609 /* JSWebGPURenderPassAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPassAttachmentDescriptor.h; path = JSWebGPURenderPassAttachmentDescriptor.h; sourceTree = "<group>"; };
    8929                 31A0893C1E738D59003B6609 /* JSWebGPURenderPassColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPassColorAttachmentDescriptor.cpp; path = JSWebGPURenderPassColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
    8930                 31A0893E1E738D59003B6609 /* JSWebGPURenderPassColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPassColorAttachmentDescriptor.h; path = JSWebGPURenderPassColorAttachmentDescriptor.h; sourceTree = "<group>"; };
    8931                 31A0893F1E738D59003B6609 /* JSWebGPURenderPassDepthAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPassDepthAttachmentDescriptor.cpp; path = JSWebGPURenderPassDepthAttachmentDescriptor.cpp; sourceTree = "<group>"; };
    8932                 31A089411E738D59003B6609 /* JSWebGPURenderPassDepthAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPassDepthAttachmentDescriptor.h; path = JSWebGPURenderPassDepthAttachmentDescriptor.h; sourceTree = "<group>"; };
    8933                 31A089421E738D59003B6609 /* JSWebGPURenderPassDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPassDescriptor.cpp; path = JSWebGPURenderPassDescriptor.cpp; sourceTree = "<group>"; };
    8934                 31A089441E738D59003B6609 /* JSWebGPURenderPassDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPassDescriptor.h; path = JSWebGPURenderPassDescriptor.h; sourceTree = "<group>"; };
    8935                 31A089451E738D59003B6609 /* JSWebGPURenderPipelineColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPipelineColorAttachmentDescriptor.cpp; path = JSWebGPURenderPipelineColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
    8936                 31A089471E738D59003B6609 /* JSWebGPURenderPipelineColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPipelineColorAttachmentDescriptor.h; path = JSWebGPURenderPipelineColorAttachmentDescriptor.h; sourceTree = "<group>"; };
    8937                 31A089481E738D59003B6609 /* JSWebGPURenderPipelineDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPipelineDescriptor.cpp; path = JSWebGPURenderPipelineDescriptor.cpp; sourceTree = "<group>"; };
    8938                 31A0894A1E738D59003B6609 /* JSWebGPURenderPipelineDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPipelineDescriptor.h; path = JSWebGPURenderPipelineDescriptor.h; sourceTree = "<group>"; };
    8939                 31A0894B1E738D59003B6609 /* JSWebGPURenderPipelineState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPURenderPipelineState.cpp; path = JSWebGPURenderPipelineState.cpp; sourceTree = "<group>"; };
    8940                 31A0894D1E738D59003B6609 /* JSWebGPURenderPipelineState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPURenderPipelineState.h; path = JSWebGPURenderPipelineState.h; sourceTree = "<group>"; };
    8941                 31A0894E1E738D59003B6609 /* JSWebGPUTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUTexture.cpp; path = JSWebGPUTexture.cpp; sourceTree = "<group>"; };
    8942                 31A089501E738D59003B6609 /* JSWebGPUTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUTexture.h; path = JSWebGPUTexture.h; sourceTree = "<group>"; };
    8943                 31A089511E738D59003B6609 /* JSWebGPUTextureDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSWebGPUTextureDescriptor.cpp; path = JSWebGPUTextureDescriptor.cpp; sourceTree = "<group>"; };
    8944                 31A089531E738D59003B6609 /* JSWebGPUTextureDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSWebGPUTextureDescriptor.h; path = JSWebGPUTextureDescriptor.h; sourceTree = "<group>"; };
     8987                31A0891B1E738D59003B6609 /* JSWebGPUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUBuffer.cpp; sourceTree = "<group>"; };
     8988                31A0891D1E738D59003B6609 /* JSWebGPUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUBuffer.h; sourceTree = "<group>"; };
     8989                31A0891E1E738D59003B6609 /* JSWebGPUCommandBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUCommandBuffer.cpp; sourceTree = "<group>"; };
     8990                31A089201E738D59003B6609 /* JSWebGPUCommandBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUCommandBuffer.h; sourceTree = "<group>"; };
     8991                31A089211E738D59003B6609 /* JSWebGPUCommandQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUCommandQueue.cpp; sourceTree = "<group>"; };
     8992                31A089231E738D59003B6609 /* JSWebGPUCommandQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUCommandQueue.h; sourceTree = "<group>"; };
     8993                31A089241E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUDepthStencilDescriptor.cpp; sourceTree = "<group>"; };
     8994                31A089261E738D59003B6609 /* JSWebGPUDepthStencilDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUDepthStencilDescriptor.h; sourceTree = "<group>"; };
     8995                31A089271E738D59003B6609 /* JSWebGPUDepthStencilState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUDepthStencilState.cpp; sourceTree = "<group>"; };
     8996                31A089291E738D59003B6609 /* JSWebGPUDepthStencilState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUDepthStencilState.h; sourceTree = "<group>"; };
     8997                31A0892A1E738D59003B6609 /* JSWebGPUDrawable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUDrawable.cpp; sourceTree = "<group>"; };
     8998                31A0892C1E738D59003B6609 /* JSWebGPUDrawable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUDrawable.h; sourceTree = "<group>"; };
     8999                31A0892D1E738D59003B6609 /* JSWebGPUFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUFunction.cpp; sourceTree = "<group>"; };
     9000                31A0892F1E738D59003B6609 /* JSWebGPUFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUFunction.h; sourceTree = "<group>"; };
     9001                31A089301E738D59003B6609 /* JSWebGPULibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPULibrary.cpp; sourceTree = "<group>"; };
     9002                31A089321E738D59003B6609 /* JSWebGPULibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPULibrary.h; sourceTree = "<group>"; };
     9003                31A089331E738D59003B6609 /* JSWebGPURenderCommandEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderCommandEncoder.cpp; sourceTree = "<group>"; };
     9004                31A089351E738D59003B6609 /* JSWebGPURenderCommandEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderCommandEncoder.h; sourceTree = "<group>"; };
     9005                31A089361E738D59003B6609 /* JSWebGPURenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderingContext.cpp; sourceTree = "<group>"; };
     9006                31A089381E738D59003B6609 /* JSWebGPURenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderingContext.h; sourceTree = "<group>"; };
     9007                31A089391E738D59003B6609 /* JSWebGPURenderPassAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPassAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     9008                31A0893B1E738D59003B6609 /* JSWebGPURenderPassAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPassAttachmentDescriptor.h; sourceTree = "<group>"; };
     9009                31A0893C1E738D59003B6609 /* JSWebGPURenderPassColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPassColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     9010                31A0893E1E738D59003B6609 /* JSWebGPURenderPassColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPassColorAttachmentDescriptor.h; sourceTree = "<group>"; };
     9011                31A0893F1E738D59003B6609 /* JSWebGPURenderPassDepthAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPassDepthAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     9012                31A089411E738D59003B6609 /* JSWebGPURenderPassDepthAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPassDepthAttachmentDescriptor.h; sourceTree = "<group>"; };
     9013                31A089421E738D59003B6609 /* JSWebGPURenderPassDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPassDescriptor.cpp; sourceTree = "<group>"; };
     9014                31A089441E738D59003B6609 /* JSWebGPURenderPassDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPassDescriptor.h; sourceTree = "<group>"; };
     9015                31A089451E738D59003B6609 /* JSWebGPURenderPipelineColorAttachmentDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPipelineColorAttachmentDescriptor.cpp; sourceTree = "<group>"; };
     9016                31A089471E738D59003B6609 /* JSWebGPURenderPipelineColorAttachmentDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPipelineColorAttachmentDescriptor.h; sourceTree = "<group>"; };
     9017                31A089481E738D59003B6609 /* JSWebGPURenderPipelineDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPipelineDescriptor.cpp; sourceTree = "<group>"; };
     9018                31A0894A1E738D59003B6609 /* JSWebGPURenderPipelineDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPipelineDescriptor.h; sourceTree = "<group>"; };
     9019                31A0894B1E738D59003B6609 /* JSWebGPURenderPipelineState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPURenderPipelineState.cpp; sourceTree = "<group>"; };
     9020                31A0894D1E738D59003B6609 /* JSWebGPURenderPipelineState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPURenderPipelineState.h; sourceTree = "<group>"; };
     9021                31A0894E1E738D59003B6609 /* JSWebGPUTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUTexture.cpp; sourceTree = "<group>"; };
     9022                31A089501E738D59003B6609 /* JSWebGPUTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUTexture.h; sourceTree = "<group>"; };
     9023                31A089511E738D59003B6609 /* JSWebGPUTextureDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGPUTextureDescriptor.cpp; sourceTree = "<group>"; };
     9024                31A089531E738D59003B6609 /* JSWebGPUTextureDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGPUTextureDescriptor.h; sourceTree = "<group>"; };
    89459025                31A795C11888B72400382F90 /* ANGLEInstancedArrays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEInstancedArrays.cpp; sourceTree = "<group>"; };
    89469026                31A795C21888B72400382F90 /* ANGLEInstancedArrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEInstancedArrays.h; sourceTree = "<group>"; };
     
    1779917879                                316BDBA71E71FA9300DE0D5A /* GPUBuffer.cpp */,
    1780017880                                316BDBA81E71FA9300DE0D5A /* GPUBuffer.h */,
     17881                                316BDBC41E75EE2400DE0D5A /* GPUCommandBuffer.cpp */,
     17882                                316BDBC51E75EE2400DE0D5A /* GPUCommandBuffer.h */,
     17883                                316BDBB91E73880600DE0D5A /* GPUCommandQueue.cpp */,
     17884                                316BDBBA1E73880600DE0D5A /* GPUCommandQueue.h */,
     17885                                316BDBF41E762ACD00DE0D5A /* GPUDepthStencilDescriptor.cpp */,
     17886                                316BDBF51E762ACD00DE0D5A /* GPUDepthStencilDescriptor.h */,
     17887                                316BDBEE1E76291B00DE0D5A /* GPUDepthStencilState.cpp */,
     17888                                316BDBEF1E76291B00DE0D5A /* GPUDepthStencilState.h */,
    1780117889                                316BDB841E6E0A2100DE0D5A /* GPUDevice.cpp */,
    1780217890                                316BDB851E6E0A2100DE0D5A /* GPUDevice.h */,
     17891                                316BDBCA1E75F17600DE0D5A /* GPUDrawable.cpp */,
     17892                                316BDBCB1E75F17600DE0D5A /* GPUDrawable.h */,
     17893                                316BDBFA1E762D0400DE0D5A /* GPUEnums.h */,
    1780317894                                316BDB921E70C89700DE0D5A /* GPUFunction.cpp */,
    1780417895                                316BDB931E70C89700DE0D5A /* GPUFunction.h */,
    1780517896                                316BDB981E70CBBF00DE0D5A /* GPULibrary.cpp */,
    1780617897                                316BDB991E70CBBF00DE0D5A /* GPULibrary.h */,
     17898                                316BDBE81E76244300DE0D5A /* GPURenderCommandEncoder.cpp */,
     17899                                316BDBE91E76244400DE0D5A /* GPURenderCommandEncoder.h */,
     17900                                316BDBDC1E76136C00DE0D5A /* GPURenderPassAttachmentDescriptor.cpp */,
     17901                                316BDBDD1E76136C00DE0D5A /* GPURenderPassAttachmentDescriptor.h */,
     17902                                316BDBD81E7612DB00DE0D5A /* GPURenderPassColorAttachmentDescriptor.cpp */,
     17903                                316BDBD91E7612DB00DE0D5A /* GPURenderPassColorAttachmentDescriptor.h */,
     17904                                316BDBE21E761EFF00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.cpp */,
     17905                                316BDBE31E761EFF00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.h */,
     17906                                316BDBD01E75F7AE00DE0D5A /* GPURenderPassDescriptor.cpp */,
     17907                                316BDBD11E75F7AE00DE0D5A /* GPURenderPassDescriptor.h */,
     17908                                316BDC081E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp */,
     17909                                316BDC091E76342700DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h */,
     17910                                316BDBFC1E762F5700DE0D5A /* GPURenderPipelineDescriptor.cpp */,
     17911                                316BDBFD1E762F5700DE0D5A /* GPURenderPipelineDescriptor.h */,
     17912                                316BDBFE1E762F5700DE0D5A /* GPURenderPipelineState.cpp */,
     17913                                316BDBFF1E762F5700DE0D5A /* GPURenderPipelineState.h */,
     17914                                316BDBAF1E7354BB00DE0D5A /* GPUTexture.cpp */,
     17915                                316BDBB01E7354BB00DE0D5A /* GPUTexture.h */,
    1780717916                                316BDBB51E7357CB00DE0D5A /* GPUTextureDescriptor.cpp */,
    1780817917                                316BDBB61E7357CB00DE0D5A /* GPUTextureDescriptor.h */,
    17809                                 316BDBAF1E7354BB00DE0D5A /* GPUTexture.cpp */,
    17810                                 316BDBB01E7354BB00DE0D5A /* GPUTexture.h */,
    1781117918                                498770D71242C535002226BA /* Texture.cpp */,
    1781217919                                498770D81242C535002226BA /* Texture.h */,
     
    2294123048                                B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */,
    2294223049                                316BDBA51E71FA6F00DE0D5A /* GPUBufferMetal.mm */,
     23050                                316BDBC61E75EE3D00DE0D5A /* GPUCommandBufferMetal.mm */,
     23051                                316BDBBD1E73881300DE0D5A /* GPUCommandQueueMetal.mm */,
    2294323052                                316BDB881E6E141C00DE0D5A /* GPUDeviceMetal.mm */,
     23053                                316BDBF81E762BEF00DE0D5A /* GPUDepthStencilDescriptorMetal.mm */,
     23054                                316BDBF21E76293700DE0D5A /* GPUDepthStencilStateMetal.mm */,
     23055                                316BDBC91E75F16200DE0D5A /* GPUDrawableMetal.mm */,
    2294423056                                316BDB961E70CA2400DE0D5A /* GPUFunctionMetal.mm */,
    2294523057                                316BDB9C1E70CD9000DE0D5A /* GPULibraryMetal.mm */,
     23058                                316BDBEC1E76246B00DE0D5A /* GPURenderCommandEncoderMetal.mm */,
     23059                                316BDBE01E761CB500DE0D5A /* GPURenderPassAttachmentDescriptorMetal.mm */,
     23060                                316BDBD61E7612C400DE0D5A /* GPURenderPassColorAttachmentDescriptorMetal.mm */,
     23061                                316BDBE61E761F2700DE0D5A /* GPURenderPassDepthAttachmentDescriptorMetal.mm */,
     23062                                316BDBD41E75F7CA00DE0D5A /* GPURenderPassDescriptorMetal.mm */,
     23063                                316BDC0A1E76343600DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm */,
     23064                                316BDC041E762F7E00DE0D5A /* GPURenderPipelineDescriptorMetal.mm */,
     23065                                316BDC051E762F7E00DE0D5A /* GPURenderPipelineStateMetal.mm */,
    2294623066                                316BDBB31E7357B000DE0D5A /* GPUTextureDescriptorMetal.mm */,
    2294723067                                316BDBAD1E73549C00DE0D5A /* GPUTextureMetal.mm */,
     
    2295523075                                2D3EF4461917915C00034184 /* WebCoreCALayerExtras.h */,
    2295623076                                2D3EF4471917915C00034184 /* WebCoreCALayerExtras.mm */,
     23077                                316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */,
    2295723078                                316BDB891E6E153000DE0D5A /* WebGPULayer.mm */,
    22958                                 316BDB8A1E6E153000DE0D5A /* WebGPULayer.h */,
    2295923079                        );
    2296023080                        path = cocoa;
     
    2614426264                                07B7116D1D899E63009F0FFB /* CaptureDevice.h in Headers */,
    2614526265                                07B7116F1D899E63009F0FFB /* CaptureDeviceManager.h in Headers */,
     26266                                316BDBE41E761F0500DE0D5A /* GPURenderPassDepthAttachmentDescriptor.h in Headers */,
    2614626267                                99CC0B4F18BE9849006CEBCC /* CapturingInputCursor.h in Headers */,
    2614726268                                CDC734151977896D0046BFC5 /* CARingBuffer.h in Headers */,
     
    2624126362                                065AD4F70B0C2EDA005A2B1D /* ContextMenuController.h in Headers */,
    2624226363                                06027CAD0B1CBFC000884B2D /* ContextMenuItem.h in Headers */,
     26364                                316BDBCD1E75F18400DE0D5A /* GPUDrawable.h in Headers */,
    2624326365                                7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */,
    2624426366                                759CB837192DA9190012BC64 /* ControlStates.h in Headers */,
     
    2633626458                                FBB0C5B817BBD629003D3677 /* CSSFilterImageValue.h in Headers */,
    2633726459                                BC64B4D60CB4298A005F2B62 /* CSSFontFace.h in Headers */,
     26460                                316BDBD31E75F7B600DE0D5A /* GPURenderPassDescriptor.h in Headers */,
    2633826461                                409EBDB116B7EE7100CBA3FC /* CSSFontFaceLoadEvent.h in Headers */,
    2633926462                                A80E6CFD0A1989CA007FB8C5 /* CSSFontFaceRule.h in Headers */,
     
    2636326486                                BC772E131331620C001EC9CE /* CSSLineBoxContainValue.h in Headers */,
    2636426487                                946D374A1D6D06280077084F /* CSSMarkup.h in Headers */,
     26488                                316BDBF01E76292000DE0D5A /* GPUDepthStencilState.h in Headers */,
    2636526489                                A80E6D030A1989CA007FB8C5 /* CSSMediaRule.h in Headers */,
    2636626490                                314BE3A11B30F6B700141982 /* CSSNamedImageValue.h in Headers */,
     
    2638226506                                E1ED8AC30CC49BE000BFC557 /* CSSPrimitiveValueMappings.h in Headers */,
    2638326507                                A80E6CFF0A1989CA007FB8C5 /* CSSProperty.h in Headers */,
     26508                                316BDBDF1E76137500DE0D5A /* GPURenderPassAttachmentDescriptor.h in Headers */,
    2638426509                                78D02BC6154A18DF00B62D05 /* CSSPropertyAnimation.h in Headers */,
    2638526510                                656580F409D12B20000E61D7 /* CSSPropertyNames.h in Headers */,
     
    2658326708                                89F60B11157F686E0075E157 /* DOMWindowQuota.h in Headers */,
    2658426709                                11E067EE1E6246E500162D16 /* SimpleLineLayoutCoverage.h in Headers */,
     26710                                316BDBCE1E75F18A00DE0D5A /* GPUCommandBuffer.h in Headers */,
    2658526711                                AA2A5AD616A4861600975A25 /* DOMWindowSpeechSynthesis.h in Headers */,
    2658626712                                A8CCBB49151F831600AB7CE9 /* DOMWindowWebDatabase.h in Headers */,
    2658726713                                BC53DA2E1143121E000D817E /* DOMWrapperWorld.h in Headers */,
     26714                                316BDC031E762F6900DE0D5A /* GPURenderPipelineState.h in Headers */,
    2658826715                                93A806151E03B51C008A1F26 /* DoubleRange.h in Headers */,
    2658926716                                FD1762E4176686EA00D836A8 /* DownSampler.h in Headers */,
     
    2705327180                                B27535710B053814002CE64F /* ImageSource.h in Headers */,
    2705427181                                4B3480940EEF50D400AC1B41 /* ImageSourceCG.h in Headers */,
     27182                                316BDBFB1E762D0400DE0D5A /* GPUEnums.h in Headers */,
    2705527183                                26F756B31B3B66F70005DD79 /* ImmutableNFA.h in Headers */,
    2705627184                                26F756B51B3B68F20005DD79 /* ImmutableNFANodeBuilder.h in Headers */,
     
    2722527353                                9BD4E9171C462872005065BC /* JSCustomElementInterface.h in Headers */,
    2722627354                                9BE6710C1D5AEB2500345514 /* JSCustomElementRegistry.h in Headers */,
     27355                                316BDBF71E762AD500DE0D5A /* GPUDepthStencilDescriptor.h in Headers */,
    2722727356                                E4778B80115A581A00B5D372 /* JSCustomEvent.h in Headers */,
    2722827357                                E10B937C0B73C00A003ED890 /* JSCustomXPathNSResolver.h in Headers */,
     
    2732827457                                E0FEF372B37C53EAC1C1FBEE /* JSEventSource.h in Headers */,
    2732927458                                5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */,
     27459                                316BDC021E762F6400DE0D5A /* GPURenderPipelineDescriptor.h in Headers */,
    2733027460                                46B63F6C1C6E8D19002E914B /* JSEventTargetCustom.h in Headers */,
    2733127461                                3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */,
     
    2769727827                                B2FA3DB50AB75A6F000E5AC4 /* JSSVGPathElement.h in Headers */,
    2769827828                                B2FA3DB70AB75A6F000E5AC4 /* JSSVGPathSeg.h in Headers */,
     27829                                316BDC0D1E7634D200DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.h in Headers */,
    2769927830                                B2FA3DB90AB75A6F000E5AC4 /* JSSVGPathSegArcAbs.h in Headers */,
    2770027831                                B2FA3DBB0AB75A6F000E5AC4 /* JSSVGPathSegArcRel.h in Headers */,
     
    2850228633                                43C092BC12D9E4EE00A989C3 /* RenderSVGForeignObject.h in Headers */,
    2850328634                                436708C512D9CA4B00044234 /* RenderSVGGradientStop.h in Headers */,
     28635                                316BDBDB1E7612E200DE0D5A /* GPURenderPassColorAttachmentDescriptor.h in Headers */,
    2850428636                                436708C712D9CA4B00044234 /* RenderSVGHiddenContainer.h in Headers */,
    2850528637                                436708C912D9CA4B00044234 /* RenderSVGImage.h in Headers */,
     
    2855328685                                A871DFE40A15376B00B12A68 /* RenderWidget.h in Headers */,
    2855428686                                A89CCC530F44E98100B5DA10 /* ReplaceNodeWithSpanCommand.h in Headers */,
     28687                                316BDBBC1E73880600DE0D5A /* GPUCommandQueue.h in Headers */,
    2855528688                                2DF512CE1D873E47001D6780 /* ReplaceRangeWithTextCommand.h in Headers */,
    2855628689                                93309E0A099E64920056E581 /* ReplaceSelectionCommand.h in Headers */,
     
    2865528788                                08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */,
    2865628789                                E3E4E2A81E3B17100023BB8A /* ScriptElementCachedScriptFetcher.h in Headers */,
     28790                                316BDBEB1E76244D00DE0D5A /* GPURenderCommandEncoder.h in Headers */,
    2865728791                                E11C9D9B0EB3681200E409DB /* ScriptExecutionContext.h in Headers */,
    2865828792                                41F066E40F64BCF600A07EAC /* ScriptGlobalObject.h in Headers */,
     
    3010930243                                FD31602412B0267600C1A359 /* BiquadDSPKernel.cpp in Sources */,
    3011030244                                FDC54F041399B0DA008D9117 /* BiquadFilterNode.cpp in Sources */,
     30245                                316BDBDA1E7612E000DE0D5A /* GPURenderPassColorAttachmentDescriptor.cpp in Sources */,
    3011130246                                FD31602612B0267600C1A359 /* BiquadProcessor.cpp in Sources */,
    3011230247                                A89943290B42338800D7C802 /* BitmapImage.cpp in Sources */,
     
    3017930314                                97BC69DC1505F076001B74AC /* ChangeVersionWrapper.cpp in Sources */,
    3018030315                                FD315FFE12B0267600C1A359 /* ChannelMergerNode.cpp in Sources */,
     30316                                316BDC071E762F8600DE0D5A /* GPURenderPipelineStateMetal.mm in Sources */,
    3018130317                                FD31600112B0267600C1A359 /* ChannelSplitterNode.cpp in Sources */,
    3018230318                                6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */,
     
    3033230468                                BC23E4E10DAACE0F009FDC91 /* CSSGradientValue.cpp in Sources */,
    3033330469                                E11003301C9AC3DE00412DD0 /* CSSGridAutoRepeatValue.cpp in Sources */,
     30470                                316BDBED1E76248200DE0D5A /* GPURenderCommandEncoderMetal.mm in Sources */,
    3033430471                                CD7DBB2818CA19A400C11066 /* CSSGridLineNamesValue.cpp in Sources */,
    3033530472                                CD3E252318046BCD00E27F56 /* CSSGridTemplateAreasValue.cpp in Sources */,
     
    3054130678                                9BAB6C6D12550631001626D4 /* EditingStyle.cpp in Sources */,
    3054230679                                4B3043CC0AE0373B00A82647 /* Editor.cpp in Sources */,
     30680                                316BDBF11E76292500DE0D5A /* GPUDepthStencilState.cpp in Sources */,
    3054330681                                9B55EEE91B3E8898005342BC /* EditorCocoa.mm in Sources */,
    3054430682                                93A38B4B0D0E5808006872C2 /* EditorCommand.cpp in Sources */,
     
    3057830716                                44DAB5B115A623580097C1E4 /* Extensions3DOpenGLCommon.cpp in Sources */,
    3057930717                                E47E276816036EDC00EE2AFB /* ExtensionStyleSheets.cpp in Sources */,
     30718                                316BDBD21E75F7B200DE0D5A /* GPURenderPassDescriptor.cpp in Sources */,
    3058030719                                72F1ADA21A3904DC00014E18 /* EXTFragDepth.cpp in Sources */,
    3058130720                                5C4304B0191AC908000E2BC0 /* EXTShaderTextureLOD.cpp in Sources */,
     
    3080630945                                A8EA79FC0A1916DF00A8EF5F /* HTMLLIElement.cpp in Sources */,
    3080730946                                A871DC210A15205700B12A68 /* HTMLLinkElement.cpp in Sources */,
     30947                                316BDBE11E761CB900DE0D5A /* GPURenderPassAttachmentDescriptorMetal.mm in Sources */,
    3080830948                                A8EA7D320A19385500A8EF5F /* HTMLMapElement.cpp in Sources */,
    3080930949                                A8EA7CAC0A192B9C00A8EF5F /* HTMLMarqueeElement.cpp in Sources */,
     
    3092631066                                C3CF17A415B0063F00276D39 /* IdTargetObserver.cpp in Sources */,
    3092731067                                C3CF17A615B0063F00276D39 /* IdTargetObserverRegistry.cpp in Sources */,
     31068                                316BDC001E762F5D00DE0D5A /* GPURenderPipelineDescriptor.cpp in Sources */,
    3092831069                                B275356F0B053814002CE64F /* Image.cpp in Sources */,
    3092931070                                43D2597713C816F400608559 /* ImageBuffer.cpp in Sources */,
     
    3104031181                                1AE96A8C1D1A0DDD00B86768 /* JSApplePayPaymentMethodSelectedEvent.cpp in Sources */,
    3104131182                                7C6523191E00DBB500677F22 /* JSApplePayPaymentPass.cpp in Sources */,
     31183                                316BDBCC1E75F17B00DE0D5A /* GPUDrawable.cpp in Sources */,
    3104231184                                7C6579F11E00856600E3A27A /* JSApplePayPaymentRequest.cpp in Sources */,
    3104331185                                1AE96A8E1D1A0DDD00B86768 /* JSApplePaySession.cpp in Sources */,
     
    3116631308                                E1C36CBD0EB08062007410BC /* JSDOMGlobalObject.cpp in Sources */,
    3116731309                                7C2BDD3D17C7F98C0038FF15 /* JSDOMGlobalObjectTask.cpp in Sources */,
     31310                                316BDBCF1E75F19900DE0D5A /* GPUDrawableMetal.mm in Sources */,
    3116831311                                65DF31F709D1CC60000BE325 /* JSDOMImplementation.cpp in Sources */,
    3116931312                                4138F8571D253F08001CB61E /* JSDOMIterator.cpp in Sources */,
     
    3120031343                                BC2ED5550C6B9BD300920BFF /* JSElementCustom.cpp in Sources */,
    3120131344                                2ECF7ADC10162B3800427DE7 /* JSErrorEvent.cpp in Sources */,
     31345                                316BDBF91E762BF400DE0D5A /* GPUDepthStencilDescriptorMetal.mm in Sources */,
    3120231346                                F3D461481161D53200CA0D09 /* JSErrorHandler.cpp in Sources */,
    3120331347                                14E8378409F85D1C00B85AE4 /* JSEvent.cpp in Sources */,
     
    3138431528                                2D9BF74A1DBFDDFF007A7D99 /* JSMediaKeySessionCustom.cpp in Sources */,
    3138531529                                CDF4B71D1E01E11A00E235A2 /* JSMediaKeySessionType.cpp in Sources */,
     31530                                316BDBE51E761F0A00DE0D5A /* GPURenderPassDepthAttachmentDescriptor.cpp in Sources */,
    3138631531                                CDF4B72B1E03C63E00E235A2 /* JSMediaKeysRequirement.cpp in Sources */,
    3138731532                                2D9BF7241DBFDAD0007A7D99 /* JSMediaKeyStatusMap.cpp in Sources */,
     
    3144731592                                1A0D57400A5C7867007EDD4C /* JSOverflowEvent.cpp in Sources */,
    3144831593                                E1284BB210449FFA00EAEB52 /* JSPageTransitionEvent.cpp in Sources */,
     31594                                316BDC061E762F8300DE0D5A /* GPURenderPipelineDescriptorMetal.mm in Sources */,
    3144931595                                FDA15EB112B03EE1003A583A /* JSPannerNode.cpp in Sources */,
    3145031596                                E51A81DF17298D7700BFCA61 /* JSPerformance.cpp in Sources */,
     
    3183631982                                0F87166F1C869D83004FF0DE /* LengthPoint.cpp in Sources */,
    3183731983                                0FEF20CE1BD4A24100128E5D /* LengthSize.cpp in Sources */,
     31984                                316BDC0B1E76344E00DE0D5A /* GPURenderPipelineColorAttachmentDescriptorMetal.mm in Sources */,
    3183831985                                415080361E3F00AD0051D75D /* LibWebRTCAudioModule.cpp in Sources */,
    3183931986                                5CDD83641E4325A000621E92 /* LibWebRTCDataChannelHandler.cpp in Sources */,
     
    3189732044                                FA654A6B1108ABED002626F1 /* MathMLUnderOverElement.cpp in Sources */,
    3189832045                                439046E912DA25E812AF80AC /* MathOperator.cpp in Sources */,
     32046                                316BDBD51E75F7CF00DE0D5A /* GPURenderPassDescriptorMetal.mm in Sources */,
    3189932047                                49D5DC2B0F423A73008F20FD /* Matrix3DTransformOperation.cpp in Sources */,
    3190032048                                49E911C60EF86D47009D0CAF /* MatrixTransformOperation.cpp in Sources */,
     
    3206832216                                52F52E1114A0134F00ACC397 /* NSScrollerImpDetails.mm in Sources */,
    3206932217                                F55B3DC71251F12D003EF269 /* NumberInputType.cpp in Sources */,
     32218                                316BDBE71E761F2E00DE0D5A /* GPURenderPassDepthAttachmentDescriptorMetal.mm in Sources */,
    3207032219                                1A569D130D7E2B82007C3983 /* objc_class.mm in Sources */,
    3207132220                                1A569D160D7E2B82007C3983 /* objc_instance.mm in Sources */,
     
    3228532434                                439046D712DA25E800AF80A2 /* RenderMathMLBlock.cpp in Sources */,
    3228632435                                439046D912DA25E800AF80A2 /* RenderMathMLFenced.cpp in Sources */,
     32436                                316BDBC81E75F08D00DE0D5A /* GPUCommandBufferMetal.mm in Sources */,
    3228732437                                439046D912DA25E800AF81B3 /* RenderMathMLFencedOperator.cpp in Sources */,
    3228832438                                439046DB12DA25E800AF80A2 /* RenderMathMLFraction.cpp in Sources */,
     
    3245432604                                8A413AE11207BBA50082016E /* ScriptRunner.cpp in Sources */,
    3245532605                                4127D5370F8AAB1D00E424F5 /* ScriptState.cpp in Sources */,
     32606                                316BDBEA1E76244900DE0D5A /* GPURenderCommandEncoder.cpp in Sources */,
    3245632607                                BC8AE34E12EA096A00EB3AE6 /* ScrollableArea.cpp in Sources */,
    3245732608                                5D925B670F64D4DD00B847F0 /* ScrollAlignment.cpp in Sources */,
     
    3255832709                                9444CBD51D860C8B0073A074 /* SizesAttributeParser.cpp in Sources */,
    3255932710                                9444CBD31D860C8B0073A074 /* SizesCalcParser.cpp in Sources */,
     32711                                316BDC011E762F6100DE0D5A /* GPURenderPipelineState.cpp in Sources */,
    3256032712                                49E911CC0EF86D47009D0CAF /* SkewTransformOperation.cpp in Sources */,
    3256132713                                4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */,
     
    3257132723                                E45390470EAFD637003695C8 /* SoundIOS.mm in Sources */,
    3257232724                                4B3043C90AE0371D00A82647 /* SoundMac.mm in Sources */,
     32725                                316BDBF31E76293C00DE0D5A /* GPUDepthStencilStateMetal.mm in Sources */,
    3257332726                                84A81F3D0FC7DFF000955300 /* SourceAlpha.cpp in Sources */,
    3257432727                                CD3A496117A9D01B00274E42 /* SourceBuffer.cpp in Sources */,
     
    3259532748                                7E474E2012494DC900235364 /* SQLiteDatabaseTracker.cpp in Sources */,
    3259632749                                B5A684240FFABEAA00D24689 /* SQLiteFileSystem.cpp in Sources */,
     32750                                316BDBDE1E76137200DE0D5A /* GPURenderPassAttachmentDescriptor.cpp in Sources */,
    3259732751                                512BDB4A1C456FF5006494DF /* SQLiteIDBBackingStore.cpp in Sources */,
    3259832752                                511EC12F1C50ABF50032F983 /* SQLiteIDBCursor.cpp in Sources */,
     
    3265432808                                E4946EAE156E64DD00D3297F /* StyleRuleImport.cpp in Sources */,
    3265532809                                E461D65D1BB0C7F000CB5645 /* StyleScope.cpp in Sources */,
     32810                                316BDBC71E75F08200DE0D5A /* GPUCommandBuffer.cpp in Sources */,
    3265632811                                F47A5E3F195B8E4800483100 /* StyleScrollSnapPoints.cpp in Sources */,
    3265732812                                E47A3AC31C5EABBE00CCBFA7 /* StyleSharingResolver.cpp in Sources */,
     
    3270332858                                832B843619D8E57400B26055 /* SVGAnimateElementBase.cpp in Sources */,
    3270432859                                B22279920D00BF220071B782 /* SVGAnimateMotionElement.cpp in Sources */,
     32860                                316BDBD71E7612C800DE0D5A /* GPURenderPassColorAttachmentDescriptorMetal.mm in Sources */,
    3270532861                                B22279940D00BF220071B782 /* SVGAnimateTransformElement.cpp in Sources */,
    3270632862                                B22279970D00BF220071B782 /* SVGAnimationElement.cpp in Sources */,
     
    3278232938                                B2A1F2B00CEF0ABF00442F6A /* SVGMissingGlyphElement.cpp in Sources */,
    3278332939                                B2227A4D0D00BF220071B782 /* SVGMPathElement.cpp in Sources */,
     32940                                316BDBF61E762AD100DE0D5A /* GPUDepthStencilDescriptor.cpp in Sources */,
    3278432941                                A833C7CA0A2CF06B00D57664 /* SVGNames.cpp in Sources */,
    3278532942                                7C39C3731DDBB8C100FEFB29 /* SVGNumberListValues.cpp in Sources */,
     
    3281832975                                B2227AB70D00BF220071B782 /* SVGStyleElement.cpp in Sources */,
    3281932976                                B2227ABA0D00BF220071B782 /* SVGSVGElement.cpp in Sources */,
     32977                                316BDBBB1E73880600DE0D5A /* GPUCommandQueue.cpp in Sources */,
    3282032978                                B2227ABD0D00BF220071B782 /* SVGSwitchElement.cpp in Sources */,
    3282132979                                B2227AC00D00BF220071B782 /* SVGSymbolElement.cpp in Sources */,
     
    3284833006                                CDA07FBD18E0A16A004699FA /* SystemSleepListener.cpp in Sources */,
    3284933007                                CDA07FC118E0A22B004699FA /* SystemSleepListenerMac.mm in Sources */,
     33008                                316BDBBE1E73881300DE0D5A /* GPUCommandQueueMetal.mm in Sources */,
    3285033009                                5D5975B419635F1100D00878 /* SystemVersion.mm in Sources */,
    3285133010                                463EB6221B8789E00096ED51 /* TagCollection.cpp in Sources */,
     
    3301133170                                7A93868518DCC14500B8263D /* VTTScanner.cpp in Sources */,
    3301233171                                A14832B1187F61E100DA63A6 /* WAKAppKitStubs.m in Sources */,
     33172                                316BDC0C1E7634CF00DE0D5A /* GPURenderPipelineColorAttachmentDescriptor.cpp in Sources */,
    3301333173                                A14832B3187F629100DA63A6 /* WAKClipView.m in Sources */,
    3301433174                                A14832B5187F62FC00DA63A6 /* WAKResponder.m in Sources */,
  • trunk/Source/WebCore/html/canvas/WebGPUDrawable.cpp

    r213762 r213780  
    2929#if ENABLE(WEBGPU)
    3030
    31 /* FIXME: WebGPU - Not implemented yet.
    3231#include "GPUDrawable.h"
    33  */
    3432#include "GPUTexture.h"
    3533#include "WebGPURenderingContext.h"
     
    5048        return;
    5149
    52     RefPtr<GPUTexture> drawableTexture = GPUTexture::createFromExistingTexture(m_drawable->texture());
     50    RefPtr<GPUTexture> drawableTexture = GPUTexture::createFromDrawable(m_drawable.get());
    5351    m_texture = WebGPUTexture::createFromDrawableTexture(context, drawableTexture);
    5452}
  • trunk/Source/WebCore/html/canvas/WebGPUDrawable.h

    r213762 r213780  
    3232namespace WebCore {
    3333
    34 // FIXME: WebGPU - Stub implementation - not implemented yet.
    35 // class GPUDrawable;
    36 class GPUDrawable : public RefCounted<GPUDrawable> {
    37 public:
    38     GPUTexture* texture() { return nullptr; }
    39 };
    40 // FIXME: WebGPU - End stub.
     34class GPUDrawable;
    4135class WebGPUTexture;
    4236
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUBufferMetal.mm

    r213684 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUBuffer.h"
     26#import "config.h"
     27#import "GPUBuffer.h"
    2828
    2929#if ENABLE(WEBGPU)
     
    4343        return;
    4444
    45     m_buffer = (MTLBuffer*)[device->platformDevice() newBufferWithBytes:data->baseAddress() length:data->byteLength() options:MTLResourceOptionCPUCacheModeDefault];
     45    m_buffer = adoptNS((MTLBuffer *)[device->platformDevice() newBufferWithBytes:data->baseAddress() length:data->byteLength() options:MTLResourceOptionCPUCacheModeDefault]);
    4646}
    4747
     
    6666}
    6767
    68 MTLBuffer* GPUBuffer::platformBuffer()
     68MTLBuffer *GPUBuffer::platformBuffer()
    6969{
    7070    return m_buffer.get();
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandBufferMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUFunction.h"
     26#import "config.h"
     27#import "GPUCommandBuffer.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPULibrary.h"
     31#import "GPUCommandQueue.h"
     32#import "GPUDevice.h"
     33#import "GPUDrawable.h"
    3234#import "Logging.h"
     35
    3336#import <Metal/Metal.h>
    3437
    3538namespace WebCore {
    3639
    37 GPUFunction::GPUFunction(GPULibrary* library, const String& name)
     40GPUCommandBuffer::GPUCommandBuffer(GPUCommandQueue* queue)
    3841{
    39     LOG(WebGPU, "GPUFunction::GPUFunction()");
     42    LOG(WebGPU, "GPUCommandBuffer::GPUCommandBuffer()");
    4043
    41     if (!library || !library->platformLibrary())
     44    if (!queue || !queue->platformCommandQueue())
    4245        return;
    4346
    44     m_function = (MTLFunction*)[library->platformLibrary() newFunctionWithName:name];
     47    m_commandBuffer = (MTLCommandBuffer *)[queue->platformCommandQueue() commandBuffer];
    4548}
    4649
    47 String GPUFunction::name() const
     50MTLCommandBuffer *GPUCommandBuffer::platformCommandBuffer()
    4851{
    49     if (!m_function)
    50         return emptyString();
    51    
    52     return [m_function name];
     52    return m_commandBuffer.get();
    5353}
    5454
    55 MTLFunction* GPUFunction::platformFunction()
     55void GPUCommandBuffer::presentDrawable(GPUDrawable* drawable)
    5656{
    57     return m_function.get();
     57    if (!m_commandBuffer || !drawable->platformDrawable())
     58        return;
     59
     60    [m_commandBuffer presentDrawable:static_cast<id<MTLDrawable>>(drawable->platformDrawable())];
     61    drawable->release();
    5862}
    5963
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUCommandQueueMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUFunction.h"
     26#import "config.h"
     27#import "GPUCommandQueue.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPULibrary.h"
     31#import "GPUDevice.h"
    3232#import "Logging.h"
     33
    3334#import <Metal/Metal.h>
    3435
    3536namespace WebCore {
    3637
    37 GPUFunction::GPUFunction(GPULibrary* library, const String& name)
     38GPUCommandQueue::GPUCommandQueue(GPUDevice* device)
    3839{
    39     LOG(WebGPU, "GPUFunction::GPUFunction()");
     40    LOG(WebGPU, "GPUCommandQueue::GPUCommandQueue()");
    4041
    41     if (!library || !library->platformLibrary())
     42    if (!device || !device->platformDevice())
    4243        return;
    4344
    44     m_function = (MTLFunction*)[library->platformLibrary() newFunctionWithName:name];
     45    m_commandQueue = adoptNS((MTLCommandQueue *)[device->platformDevice() newCommandQueue]);
    4546}
    4647
    47 String GPUFunction::name() const
     48String GPUCommandQueue::label() const
    4849{
    49     if (!m_function)
     50    if (!m_commandQueue)
    5051        return emptyString();
    51    
    52     return [m_function name];
     52
     53    return [m_commandQueue label];
    5354}
    5455
    55 MTLFunction* GPUFunction::platformFunction()
     56void GPUCommandQueue::setLabel(const String& label)
    5657{
    57     return m_function.get();
     58    ASSERT(m_commandQueue);
     59    [m_commandQueue setLabel:label];
     60}
     61   
     62MTLCommandQueue *GPUCommandQueue::platformCommandQueue()
     63{
     64    return m_commandQueue.get();
    5865}
    5966
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUDepthStencilDescriptorMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPULibrary.h"
     26#import "config.h"
     27#import "GPUDepthStencilDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
     31#import "GPUEnums.h"
    3232#import "Logging.h"
    3333
     
    3636namespace WebCore {
    3737
    38 GPULibrary::GPULibrary(GPUDevice* device, const String& sourceCode)
     38GPUDepthStencilDescriptor::GPUDepthStencilDescriptor()
    3939{
    40     LOG(WebGPU, "GPULibrary::GPULibrary()");
     40    LOG(WebGPU, "GPUDepthStencilDescriptor::GPUDepthStencilDescriptor()");
    4141
    42     if (!device || !device->platformDevice())
    43         return;
    44 
    45     NSError *error = [NSError errorWithDomain:@"com.apple.WebKit.GPU" code:1 userInfo:nil];
    46     m_library = (MTLLibrary*)[device->platformDevice() newLibraryWithSource:sourceCode options:nil error:&error];
    47     if (!m_library)
    48         LOG(WebGPU, "Compilation error: %s", [[error localizedDescription] UTF8String]);
     42    m_depthStencilDescriptor = adoptNS((MTLDepthStencilDescriptor *)[MTLDepthStencilDescriptor new]);
    4943}
    5044
    51 String GPULibrary::label() const
     45bool GPUDepthStencilDescriptor::depthWriteEnabled() const
    5246{
    53     if (!m_library)
    54         return emptyString();
     47    if (!m_depthStencilDescriptor)
     48        return false;
    5549
    56     return [m_library label];
     50    return [m_depthStencilDescriptor isDepthWriteEnabled];
    5751}
    5852
    59 void GPULibrary::setLabel(const String& label)
     53void GPUDepthStencilDescriptor::setDepthWriteEnabled(bool newDepthWriteEnabled)
    6054{
    61     if (!m_library)
    62         return;
    63 
    64     [m_library setLabel:label];
     55    ASSERT(m_depthStencilDescriptor);
     56    [m_depthStencilDescriptor setDepthWriteEnabled:newDepthWriteEnabled];
    6557}
    6658
    67 Vector<String> GPULibrary::functionNames()
     59GPUCompareFunction GPUDepthStencilDescriptor::depthCompareFunction() const
    6860{
    69     if (!m_library)
    70         return Vector<String>();
     61    if (!m_depthStencilDescriptor)
     62        return GPUCompareFunction::Never;
    7163
    72     Vector<String> names;
    73 
    74     NSArray<NSString*> *functionNames = [m_library functionNames];
    75     for (NSString *string in functionNames)
    76         names.append(string);
    77    
    78     return names;
     64    return static_cast<GPUCompareFunction>([m_depthStencilDescriptor depthCompareFunction]);
    7965}
    8066
    81 MTLLibrary* GPULibrary::platformLibrary()
     67void GPUDepthStencilDescriptor::setDepthCompareFunction(GPUCompareFunction newFunction)
    8268{
    83     return m_library.get();
     69    ASSERT(m_depthStencilDescriptor);
     70    [m_depthStencilDescriptor setDepthCompareFunction:static_cast<MTLCompareFunction>(newFunction)];
     71}
     72
     73MTLDepthStencilDescriptor *GPUDepthStencilDescriptor::platformDepthStencilDescriptor()
     74{
     75    return m_depthStencilDescriptor.get();
    8476}
    8577
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUDepthStencilStateMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUFunction.h"
     26#import "config.h"
     27#import "GPUDepthStencilState.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPULibrary.h"
     31#import "GPUDepthStencilDescriptor.h"
     32#import "GPUDevice.h"
    3233#import "Logging.h"
     34
    3335#import <Metal/Metal.h>
    3436
    3537namespace WebCore {
    3638
    37 GPUFunction::GPUFunction(GPULibrary* library, const String& name)
     39GPUDepthStencilState::GPUDepthStencilState(GPUDevice* device, GPUDepthStencilDescriptor* descriptor)
    3840{
    39     LOG(WebGPU, "GPUFunction::GPUFunction()");
     41    LOG(WebGPU, "GPUDepthStencilState::GPUDepthStencilState()");
    4042
    41     if (!library || !library->platformLibrary())
     43    if (!device || !device->platformDevice() || !descriptor || !descriptor->platformDepthStencilDescriptor())
    4244        return;
    4345
    44     m_function = (MTLFunction*)[library->platformLibrary() newFunctionWithName:name];
     46    m_depthStencilState = adoptNS((MTLDepthStencilState *)[device->platformDevice() newDepthStencilStateWithDescriptor:descriptor->platformDepthStencilDescriptor()]);
    4547}
    4648
    47 String GPUFunction::name() const
     49String GPUDepthStencilState::label() const
    4850{
    49     if (!m_function)
     51    if (!m_depthStencilState)
    5052        return emptyString();
    51    
    52     return [m_function name];
     53
     54    return [m_depthStencilState label];
    5355}
    5456
    55 MTLFunction* GPUFunction::platformFunction()
     57void GPUDepthStencilState::setLabel(const String& label)
    5658{
    57     return m_function.get();
     59    ASSERT(m_depthStencilState);
     60    [m_depthStencilState setLabel:label];
     61}
     62   
     63MTLDepthStencilState *GPUDepthStencilState::platformDepthStencilState()
     64{
     65    return m_depthStencilState.get();
    5866}
    5967
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUDrawableMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUFunction.h"
     26#import "config.h"
     27#import "GPUDrawable.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPULibrary.h"
     31#import "GPUDevice.h"
    3232#import "Logging.h"
     33
    3334#import <Metal/Metal.h>
     35#import <QuartzCore/QuartzCore.h>
    3436
    3537namespace WebCore {
    3638
    37 GPUFunction::GPUFunction(GPULibrary* library, const String& name)
     39GPUDrawable::GPUDrawable(GPUDevice* device)
    3840{
    39     LOG(WebGPU, "GPUFunction::GPUFunction()");
     41    LOG(WebGPU, "GPUDrawable::GPUDrawable()");
    4042
    41     if (!library || !library->platformLibrary())
     43    if (!device || !device->platformDevice())
    4244        return;
    4345
    44     m_function = (MTLFunction*)[library->platformLibrary() newFunctionWithName:name];
     46    m_drawable = (MTLDrawable *)[static_cast<CAMetalLayer*>(device->platformLayer()) nextDrawable];
    4547}
    4648
    47 String GPUFunction::name() const
     49void GPUDrawable::release()
    4850{
    49     if (!m_function)
    50         return emptyString();
     51    LOG(WebGPU, "MetalDrawable::release()");
     52    m_drawable = nullptr;
     53}
    5154   
    52     return [m_function name];
     55MTLDrawable *GPUDrawable::platformDrawable()
     56{
     57    return m_drawable.get();
    5358}
    5459
    55 MTLFunction* GPUFunction::platformFunction()
     60MTLTexture *GPUDrawable::platformTexture()
    5661{
    57     return m_function.get();
     62    if (!m_drawable)
     63        return nullptr;
     64    return (MTLTexture *)[(id<CAMetalDrawable>)m_drawable.get() texture];
    5865}
    5966
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUFunctionMetal.mm

    r213650 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUFunction.h"
     26#import "config.h"
     27#import "GPUFunction.h"
    2828
    2929#if ENABLE(WEBGPU)
     
    4242        return;
    4343
    44     m_function = (MTLFunction*)[library->platformLibrary() newFunctionWithName:name];
     44    m_function = adoptNS((MTLFunction *)[library->platformLibrary() newFunctionWithName:name]);
    4545}
    4646
     
    5353}
    5454
    55 MTLFunction* GPUFunction::platformFunction()
     55MTLFunction *GPUFunction::platformFunction()
    5656{
    5757    return m_function.get();
  • trunk/Source/WebCore/platform/graphics/cocoa/GPULibraryMetal.mm

    r213684 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPULibrary.h"
     26#import "config.h"
     27#import "GPULibrary.h"
    2828
    2929#if ENABLE(WEBGPU)
     
    4444
    4545    NSError *error = [NSError errorWithDomain:@"com.apple.WebKit.GPU" code:1 userInfo:nil];
    46     m_library = (MTLLibrary*)[device->platformDevice() newLibraryWithSource:sourceCode options:nil error:&error];
     46    m_library = adoptNS((MTLLibrary *)[device->platformDevice() newLibraryWithSource:sourceCode options:nil error:&error]);
    4747    if (!m_library)
    4848        LOG(WebGPU, "Compilation error: %s", [[error localizedDescription] UTF8String]);
     
    5959void GPULibrary::setLabel(const String& label)
    6060{
    61     if (!m_library)
    62         return;
    63 
     61    ASSERT(m_library);
    6462    [m_library setLabel:label];
    6563}
     
    7977}
    8078
    81 MTLLibrary* GPULibrary::platformLibrary()
     79MTLLibrary *GPULibrary::platformLibrary()
    8280{
    8381    return m_library.get();
  • trunk/Source/WebCore/platform/graphics/cocoa/GPURenderPassDescriptorMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUBuffer.h"
     26#import "config.h"
     27#import "GPURenderPassDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
     31#import "GPURenderPassColorAttachmentDescriptor.h"
     32#import "GPURenderPassDepthAttachmentDescriptor.h"
    3233#import "Logging.h"
    3334
     
    3637namespace WebCore {
    3738
    38 GPUBuffer::GPUBuffer(GPUDevice* device, ArrayBufferView* data)
     39GPURenderPassDescriptor::GPURenderPassDescriptor()
    3940{
    40     LOG(WebGPU, "GPUBuffer::GPUBuffer()");
     41    LOG(WebGPU, "GPURenderPassDescriptor::GPURenderPassDescriptor()");
    4142
    42     if (!device || !device->platformDevice() || !data)
    43         return;
    44 
    45     m_buffer = (MTLBuffer*)[device->platformDevice() newBufferWithBytes:data->baseAddress() length:data->byteLength() options:MTLResourceOptionCPUCacheModeDefault];
     43    m_renderPassDescriptor = adoptNS((MTLRenderPassDescriptor *)[MTLRenderPassDescriptor new]);
    4644}
    4745
    48 unsigned long GPUBuffer::length() const
     46Vector<RefPtr<GPURenderPassColorAttachmentDescriptor>> GPURenderPassDescriptor::colorAttachments()
    4947{
    50     if (!m_buffer)
    51         return 0;
     48    if (!m_renderPassDescriptor)
     49        return Vector<RefPtr<GPURenderPassColorAttachmentDescriptor>>();
    5250
    53     return [m_buffer length];
     51    Vector<RefPtr<GPURenderPassColorAttachmentDescriptor>> platformColorAttachments;
     52    platformColorAttachments.append(GPURenderPassColorAttachmentDescriptor::create([[m_renderPassDescriptor colorAttachments] objectAtIndexedSubscript:0]));
     53    return platformColorAttachments;
    5454}
    5555
    56 RefPtr<ArrayBuffer> GPUBuffer::contents()
     56RefPtr<GPURenderPassDepthAttachmentDescriptor> GPURenderPassDescriptor::depthAttachment()
    5757{
    58     if (m_contents)
    59         return m_contents;
    60 
    61     if (!m_buffer)
     58    if (!m_renderPassDescriptor)
    6259        return nullptr;
    6360
    64     m_contents = ArrayBuffer::createFromBytes([m_buffer contents], [m_buffer length], [] (void*) { });
    65     return m_contents;
     61    if (!m_depthAttachment)
     62        m_depthAttachment = GPURenderPassDepthAttachmentDescriptor::create([m_renderPassDescriptor depthAttachment]);
     63   
     64    return m_depthAttachment;
    6665}
    6766
    68 MTLBuffer* GPUBuffer::platformBuffer()
     67MTLRenderPassDescriptor *GPURenderPassDescriptor::platformRenderPassDescriptor()
    6968{
    70     return m_buffer.get();
     69    return m_renderPassDescriptor.get();
    7170}
    7271
  • trunk/Source/WebCore/platform/graphics/cocoa/GPURenderPipelineColorAttachmentDescriptorMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUTexture.h"
     26#import "config.h"
     27#import "GPURenderPipelineColorAttachmentDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "GPUTextureDescriptor.h"
    3331#import "Logging.h"
    3432
     
    3735namespace WebCore {
    3836
    39 GPUTexture::GPUTexture(GPUDevice* device, GPUTextureDescriptor* descriptor)
     37RefPtr<GPURenderPipelineColorAttachmentDescriptor> GPURenderPipelineColorAttachmentDescriptor::create(MTLRenderPipelineColorAttachmentDescriptor *attachmentDescriptor)
    4038{
    41     LOG(WebGPU, "GPUTexture::GPUTexture()");
    42 
    43     if (!device || !device->platformDevice() || !descriptor || !descriptor->platformTextureDescriptor())
    44         return;
    45 
    46     m_texture = (MTLTexture*)[device->platformDevice() newTextureWithDescriptor:descriptor->platformTextureDescriptor()];
     39    RefPtr<GPURenderPipelineColorAttachmentDescriptor> descriptor = adoptRef(new GPURenderPipelineColorAttachmentDescriptor(attachmentDescriptor));
     40    return descriptor;
    4741}
    4842
    49 GPUTexture::GPUTexture(GPUTexture* other)
     43GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor(MTLRenderPipelineColorAttachmentDescriptor *attachmentDescriptor)
    5044{
    51     LOG(WebGPU, "GPUTexture::GPUTexture()");
     45    LOG(WebGPU, "GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor()");
    5246
    53     if (!other || !other->platformTexture())
    54         return;
    55 
    56     m_texture = other->platformTexture();
     47    m_renderPipelineColorAttachmentDescriptor = attachmentDescriptor;
    5748}
    5849
    59 unsigned long GPUTexture::width() const
     50unsigned long GPURenderPipelineColorAttachmentDescriptor::pixelFormat() const
    6051{
    61     if (!m_texture)
    62         return 0;
     52    if (!m_renderPipelineColorAttachmentDescriptor)
     53        return 0; // FIXME: WebGPU - There is probably a real value for this.
    6354
    64     id<MTLTexture> texture = static_cast<id<MTLTexture>>(m_texture.get());
    65     return texture.width;
     55    return [m_renderPipelineColorAttachmentDescriptor pixelFormat];
    6656}
    6757
    68 unsigned long GPUTexture::height() const
     58void GPURenderPipelineColorAttachmentDescriptor::setPixelFormat(unsigned long newPixelFormat)
    6959{
    70     if (!m_texture)
    71         return 0;
    72 
    73     id<MTLTexture> texture = static_cast<id<MTLTexture>>(m_texture.get());
    74     return texture.height;
     60    ASSERT(m_renderPipelineColorAttachmentDescriptor);
     61    [m_renderPipelineColorAttachmentDescriptor setPixelFormat:static_cast<MTLPixelFormat>(newPixelFormat)];
    7562}
    7663
    77 MTLTexture* GPUTexture::platformTexture()
     64MTLRenderPipelineColorAttachmentDescriptor *GPURenderPipelineColorAttachmentDescriptor::platformRenderPipelineColorAttachmentDescriptor()
    7865{
    79     return m_texture.get();
     66    return m_renderPipelineColorAttachmentDescriptor.get();
    8067}
    8168
  • trunk/Source/WebCore/platform/graphics/cocoa/GPURenderPipelineStateMetal.mm

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUTexture.h"
     26#import "config.h"
     27#import "GPURenderPipelineState.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    3131#import "GPUDevice.h"
    32 #import "GPUTextureDescriptor.h"
     32#import "GPURenderPipelineDescriptor.h"
    3333#import "Logging.h"
    3434
     
    3737namespace WebCore {
    3838
    39 GPUTexture::GPUTexture(GPUDevice* device, GPUTextureDescriptor* descriptor)
     39GPURenderPipelineState::GPURenderPipelineState(GPUDevice* device, GPURenderPipelineDescriptor* descriptor)
    4040{
    41     LOG(WebGPU, "GPUTexture::GPUTexture()");
     41    LOG(WebGPU, "GPURenderPipelineState::GPURenderPipelineState()");
    4242
    43     if (!device || !device->platformDevice() || !descriptor || !descriptor->platformTextureDescriptor())
     43    if (!device || !device->platformDevice() || !descriptor || !descriptor->platformRenderPipelineDescriptor())
    4444        return;
    4545
    46     m_texture = (MTLTexture*)[device->platformDevice() newTextureWithDescriptor:descriptor->platformTextureDescriptor()];
     46    m_renderPipelineState = adoptNS((MTLRenderPipelineState *)[device->platformDevice() newRenderPipelineStateWithDescriptor:descriptor->platformRenderPipelineDescriptor() error:nil]);
    4747}
    4848
    49 GPUTexture::GPUTexture(GPUTexture* other)
     49String GPURenderPipelineState::label() const
    5050{
    51     LOG(WebGPU, "GPUTexture::GPUTexture()");
     51    if (!m_renderPipelineState)
     52        return emptyString();
    5253
    53     if (!other || !other->platformTexture())
    54         return;
    55 
    56     m_texture = other->platformTexture();
     54    return [m_renderPipelineState label];
    5755}
    5856
    59 unsigned long GPUTexture::width() const
     57void GPURenderPipelineState::setLabel(const String& label)
    6058{
    61     if (!m_texture)
    62         return 0;
    63 
    64     id<MTLTexture> texture = static_cast<id<MTLTexture>>(m_texture.get());
    65     return texture.width;
     59    ASSERT(m_renderPipelineState);
     60    [m_renderPipelineState setLabel:label];
    6661}
    67 
    68 unsigned long GPUTexture::height() const
     62   
     63MTLRenderPipelineState *GPURenderPipelineState::platformRenderPipelineState()
    6964{
    70     if (!m_texture)
    71         return 0;
    72 
    73     id<MTLTexture> texture = static_cast<id<MTLTexture>>(m_texture.get());
    74     return texture.height;
    75 }
    76 
    77 MTLTexture* GPUTexture::platformTexture()
    78 {
    79     return m_texture.get();
     65    return m_renderPipelineState.get();
    8066}
    8167
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUTextureDescriptorMetal.mm

    r213731 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUTextureDescriptor.h"
     26#import "config.h"
     27#import "GPUTextureDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
     
    3939    LOG(WebGPU, "GPUTextureDescriptor::GPUTextureDescriptor()");
    4040
    41     m_textureDescriptor = (MTLTextureDescriptor*)[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:static_cast<MTLPixelFormat>(pixelFormat) width:width height:height mipmapped:mipmapped];
     41    m_textureDescriptor = (MTLTextureDescriptor *)[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:static_cast<MTLPixelFormat>(pixelFormat) width:width height:height mipmapped:mipmapped];
    4242}
    4343
     
    120120}
    121121
    122 MTLTextureDescriptor* GPUTextureDescriptor::platformTextureDescriptor()
     122MTLTextureDescriptor *GPUTextureDescriptor::platformTextureDescriptor()
    123123{
    124124    return m_textureDescriptor.get();
  • trunk/Source/WebCore/platform/graphics/cocoa/GPUTextureMetal.mm

    r213731 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUTexture.h"
     26#import "config.h"
     27#import "GPUTexture.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    3131#import "GPUDevice.h"
     32#import "GPUDrawable.h"
    3233#import "GPUTextureDescriptor.h"
    3334#import "Logging.h"
     
    4445        return;
    4546
    46     m_texture = (MTLTexture*)[device->platformDevice() newTextureWithDescriptor:descriptor->platformTextureDescriptor()];
     47    m_texture = adoptNS((MTLTexture *)[device->platformDevice() newTextureWithDescriptor:descriptor->platformTextureDescriptor()]);
    4748}
    4849
    49 GPUTexture::GPUTexture(GPUTexture* other)
     50GPUTexture::GPUTexture(GPUDrawable* other)
    5051{
    5152    LOG(WebGPU, "GPUTexture::GPUTexture()");
    52 
    53     if (!other || !other->platformTexture())
    54         return;
    5553
    5654    m_texture = other->platformTexture();
     
    7573}
    7674
    77 MTLTexture* GPUTexture::platformTexture()
     75MTLTexture *GPUTexture::platformTexture()
    7876{
    7977    return m_texture.get();
  • trunk/Source/WebCore/platform/graphics/gpu/GPUBuffer.cpp

    r213684 r213780  
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUDevice.h"
     32#include "Logging.h"
    3333
    3434namespace WebCore {
  • trunk/Source/WebCore/platform/graphics/gpu/GPUBuffer.h

    r213684 r213780  
    4949
    5050#if PLATFORM(COCOA)
    51     WEBCORE_EXPORT MTLBuffer* platformBuffer();
     51    WEBCORE_EXPORT MTLBuffer *platformBuffer();
    5252#endif
    5353
  • trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUBuffer.h"
     27#include "GPUCommandBuffer.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUCommandQueue.h"
     32#include "GPUDevice.h"
     33#include "GPURenderCommandEncoder.h"
     34#include "GPURenderPassDescriptor.h"
     35#include "Logging.h"
    3336
    3437namespace WebCore {
    3538
    36 RefPtr<GPUBuffer> GPUBuffer::create(GPUDevice* device, ArrayBufferView* arrayBuffer)
     39RefPtr<GPUCommandBuffer> GPUCommandBuffer::create(GPUCommandQueue* queue)
    3740{
    38     RefPtr<GPUBuffer> buffer = adoptRef(new GPUBuffer(device, arrayBuffer));
     41    RefPtr<GPUCommandBuffer> buffer = adoptRef(new GPUCommandBuffer(queue));
    3942    return buffer;
    4043}
    4144
    42 GPUBuffer::~GPUBuffer()
     45GPUCommandBuffer::~GPUCommandBuffer()
    4346{
    44     LOG(WebGPU, "GPUBuffer::~GPUBuffer()");
     47    LOG(WebGPU, "GPUCommandBuffer::~GPUCommandBuffer()");
     48}
     49
     50void GPUCommandBuffer::commit()
     51{
     52}
     53
     54RefPtr<GPURenderCommandEncoder> GPUCommandBuffer::createRenderCommandEncoder(GPURenderPassDescriptor* descriptor)
     55{
     56    return GPURenderCommandEncoder::create(this, descriptor);
    4557}
    4658
    4759#if !PLATFORM(COCOA)
    48 unsigned long GPUBuffer::length() const
     60void GPUCommandBuffer::presentDrawable(GPUDrawable*)
    4961{
    50     return 0;
    51 }
    52 
    53 RefPtr<ArrayBuffer> GPUBuffer::contents()
    54 {
    55     if (m_contents)
    56         return m_contents;
    57 
    58     m_contents = ArrayBuffer::create(0, 1);
    59     return m_contents;
    6062}
    6163#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPUCommandBuffer.h

    r213779 r213780  
    3333
    3434#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     35OBJC_CLASS MTLCommandBuffer;
    3636#endif
    3737
    3838namespace WebCore {
    3939
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     40class GPUCommandQueue;
     41class GPUDrawable;
     42class GPURenderCommandEncoder;
     43class GPURenderPassDescriptor;
    4244
    43 class GPUTexture : public RefCounted<GPUTexture> {
     45class GPUCommandBuffer : public RefCounted<GPUCommandBuffer> {
    4446public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     47    static RefPtr<GPUCommandBuffer> create(GPUCommandQueue*);
     48    WEBCORE_EXPORT ~GPUCommandBuffer();
    4849
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     50    WEBCORE_EXPORT void commit();
     51    WEBCORE_EXPORT void presentDrawable(GPUDrawable*);
     52
     53    WEBCORE_EXPORT RefPtr<GPURenderCommandEncoder> createRenderCommandEncoder(GPURenderPassDescriptor*);
    5154
    5255#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     56    WEBCORE_EXPORT MTLCommandBuffer *platformCommandBuffer();
    5457#endif
    5558
    5659private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
     60    GPUCommandBuffer(GPUCommandQueue*);
    5961   
    6062#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     63    RetainPtr<MTLCommandBuffer> m_commandBuffer;
    6264#endif
    6365};
  • trunk/Source/WebCore/platform/graphics/gpu/GPUCommandQueue.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUBuffer.h"
     27#include "GPUCommandQueue.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUCommandBuffer.h"
     32#include "GPUDevice.h"
     33#include "Logging.h"
    3334
    3435namespace WebCore {
    3536
    36 RefPtr<GPUBuffer> GPUBuffer::create(GPUDevice* device, ArrayBufferView* arrayBuffer)
     37RefPtr<GPUCommandQueue> GPUCommandQueue::create(GPUDevice* device)
    3738{
    38     RefPtr<GPUBuffer> buffer = adoptRef(new GPUBuffer(device, arrayBuffer));
    39     return buffer;
     39    RefPtr<GPUCommandQueue> queue = adoptRef(new GPUCommandQueue(device));
     40    return queue;
    4041}
    4142
    42 GPUBuffer::~GPUBuffer()
     43GPUCommandQueue::~GPUCommandQueue()
    4344{
    44     LOG(WebGPU, "GPUBuffer::~GPUBuffer()");
     45    LOG(WebGPU, "GPUCommandQueue::~GPUCommandQueue()");
     46}
     47
     48RefPtr<GPUCommandBuffer> GPUCommandQueue::createCommandBuffer()
     49{
     50    return GPUCommandBuffer::create(this);
    4551}
    4652
    4753#if !PLATFORM(COCOA)
    48 unsigned long GPUBuffer::length() const
     54String GPUCommandQueue::label() const
    4955{
    50     return 0;
     56    return emptyString();
    5157}
    5258
    53 RefPtr<ArrayBuffer> GPUBuffer::contents()
     59void GPUCommandQueue::setLabel(const String&)
    5460{
    55     if (m_contents)
    56         return m_contents;
    57 
    58     m_contents = ArrayBuffer::create(0, 1);
    59     return m_contents;
    6061}
    6162#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPUCommandQueue.h

    r213779 r213780  
    3030#include <wtf/RefCounted.h>
    3131#include <wtf/RefPtr.h>
    32 #include <wtf/Vector.h>
     32#include <wtf/RetainPtr.h>
    3333#include <wtf/text/WTFString.h>
    3434
    3535#if PLATFORM(COCOA)
    36 OBJC_CLASS MTLLibrary;
     36OBJC_CLASS MTLCommandQueue;
    3737#endif
    3838
    3939namespace WebCore {
    4040
     41class GPUCommandBuffer;
    4142class GPUDevice;
    42 class GPUFunction;
    4343
    44 class GPULibrary : public RefCounted<GPULibrary> {
     44class GPUCommandQueue : public RefCounted<GPUCommandQueue> {
    4545public:
    46     static RefPtr<GPULibrary> create(GPUDevice*, const String& sourceCode);
    47     WEBCORE_EXPORT ~GPULibrary();
     46    static RefPtr<GPUCommandQueue> create(GPUDevice*);
     47    WEBCORE_EXPORT ~GPUCommandQueue();
    4848
    4949    WEBCORE_EXPORT String label() const;
    5050    WEBCORE_EXPORT void setLabel(const String&);
    5151
    52     WEBCORE_EXPORT Vector<String> functionNames();
    53 
    54     WEBCORE_EXPORT RefPtr<GPUFunction> functionWithName(const String&);
     52    WEBCORE_EXPORT RefPtr<GPUCommandBuffer> createCommandBuffer();
    5553
    5654#if PLATFORM(COCOA)
    57     WEBCORE_EXPORT MTLLibrary* platformLibrary();
     55    WEBCORE_EXPORT MTLCommandQueue *platformCommandQueue();
    5856#endif
    5957
    6058private:
    61     GPULibrary(GPUDevice*, const String& sourceCode);
     59    GPUCommandQueue(GPUDevice*);
    6260   
    6361#if PLATFORM(COCOA)
    64     RetainPtr<MTLLibrary> m_library;
     62    RetainPtr<MTLCommandQueue> m_commandQueue;
    6563#endif
    6664};
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDepthStencilDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUTexture.h"
     27#include "GPUDepthStencilDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUTexture.h"
     32#include "Logging.h"
    3333
    3434namespace WebCore {
    3535
    36 RefPtr<GPUTexture> GPUTexture::create(GPUDevice* device, GPUTextureDescriptor* descriptor)
     36RefPtr<GPUDepthStencilDescriptor> GPUDepthStencilDescriptor::create()
    3737{
    38     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(device, descriptor));
    39     return texture;
     38    RefPtr<GPUDepthStencilDescriptor> descriptor = adoptRef(new GPUDepthStencilDescriptor());
     39    return descriptor;
    4040}
    4141
    42 RefPtr<GPUTexture> GPUTexture::createFromExistingTexture(GPUTexture* other)
     42GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor()
    4343{
    44     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(other));
    45     return texture;
    46 }
    47 
    48 GPUTexture::~GPUTexture()
    49 {
    50     LOG(WebGPU, "GPUTexture::~GPUTexture()");
     44    LOG(WebGPU, "GPUDepthStencilDescriptor::~GPUDepthStencilDescriptor()");
    5145}
    5246
    5347#if !PLATFORM(COCOA)
    54 unsigned long GPUTexture::width() const
     48bool GPUDepthStencilDescriptor::depthWriteEnabled() const
    5549{
    56     return 0;
     50    return false;
    5751}
    5852
    59 unsigned long GPUTexture::height() const
     53void GPUDepthStencilDescriptor::setDepthWriteEnabled(bool)
    6054{
    61     return 0;
     55}
     56
     57GPUCompareFunction GPUDepthStencilDescriptor::depthCompareFunction() const
     58{
     59}
     60
     61void GPUDepthStencilDescriptor::setDepthCompareFunction(GPUCompareFunction)
     62{
    6263}
    6364#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDepthStencilDescriptor.h

    r213779 r213780  
    2828#if ENABLE(WEBGPU)
    2929
     30#include "GPUEnums.h"
    3031#include <wtf/RefCounted.h>
    3132#include <wtf/RefPtr.h>
     
    3334
    3435#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     36OBJC_CLASS MTLDepthStencilDescriptor;
    3637#endif
    3738
    3839namespace WebCore {
    3940
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     41class GPUDepthStencilDescriptor : public RefCounted<GPUDepthStencilDescriptor> {
     42public:
     43    static RefPtr<GPUDepthStencilDescriptor> create();
     44    WEBCORE_EXPORT ~GPUDepthStencilDescriptor();
    4245
    43 class GPUTexture : public RefCounted<GPUTexture> {
    44 public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     46    WEBCORE_EXPORT bool depthWriteEnabled() const;
     47    WEBCORE_EXPORT void setDepthWriteEnabled(bool);
    4848
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     49    WEBCORE_EXPORT GPUCompareFunction depthCompareFunction() const;
     50    WEBCORE_EXPORT void setDepthCompareFunction(GPUCompareFunction);
    5151
    5252#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     53    WEBCORE_EXPORT MTLDepthStencilDescriptor *platformDepthStencilDescriptor();
    5454#endif
    5555
    5656private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
    59    
     57    GPUDepthStencilDescriptor();
    6058#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     59    RetainPtr<MTLDepthStencilDescriptor> m_depthStencilDescriptor;
    6260#endif
    6361};
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDepthStencilState.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUBuffer.h"
     27#include "GPUDepthStencilState.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUDepthStencilDescriptor.h"
     32#include "GPUDevice.h"
     33#include "Logging.h"
    3334
    3435namespace WebCore {
    3536
    36 RefPtr<GPUBuffer> GPUBuffer::create(GPUDevice* device, ArrayBufferView* arrayBuffer)
     37RefPtr<GPUDepthStencilState> GPUDepthStencilState::create(GPUDevice* device, GPUDepthStencilDescriptor* descriptor)
    3738{
    38     RefPtr<GPUBuffer> buffer = adoptRef(new GPUBuffer(device, arrayBuffer));
    39     return buffer;
     39    RefPtr<GPUDepthStencilState> state = adoptRef(new GPUDepthStencilState(device, descriptor));
     40    return state;
    4041}
    4142
    42 GPUBuffer::~GPUBuffer()
     43GPUDepthStencilState::~GPUDepthStencilState()
    4344{
    44     LOG(WebGPU, "GPUBuffer::~GPUBuffer()");
     45    LOG(WebGPU, "GPUDepthStencilState::~GPUDepthStencilState()");
    4546}
    4647
    4748#if !PLATFORM(COCOA)
    48 unsigned long GPUBuffer::length() const
     49String GPUDepthStencilState::label() const
    4950{
    50     return 0;
     51    return emptyString();
    5152}
    5253
    53 RefPtr<ArrayBuffer> GPUBuffer::contents()
     54void GPUDepthStencilState::setLabel(const String&)
    5455{
    55     if (m_contents)
    56         return m_contents;
    57 
    58     m_contents = ArrayBuffer::create(0, 1);
    59     return m_contents;
    6056}
    6157#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDepthStencilState.h

    r213779 r213780  
    3030#include <wtf/RefCounted.h>
    3131#include <wtf/RefPtr.h>
    32 #include <wtf/Vector.h>
     32#include <wtf/RetainPtr.h>
    3333#include <wtf/text/WTFString.h>
    3434
    3535#if PLATFORM(COCOA)
    36 OBJC_CLASS MTLLibrary;
     36OBJC_CLASS MTLDepthStencilState;
    3737#endif
    3838
     
    4040
    4141class GPUDevice;
    42 class GPUFunction;
     42class GPUDepthStencilDescriptor;
    4343
    44 class GPULibrary : public RefCounted<GPULibrary> {
     44class GPUDepthStencilState : public RefCounted<GPUDepthStencilState> {
    4545public:
    46     static RefPtr<GPULibrary> create(GPUDevice*, const String& sourceCode);
    47     WEBCORE_EXPORT ~GPULibrary();
     46    static RefPtr<GPUDepthStencilState> create(GPUDevice*, GPUDepthStencilDescriptor*);
     47    WEBCORE_EXPORT ~GPUDepthStencilState();
    4848
    4949    WEBCORE_EXPORT String label() const;
    5050    WEBCORE_EXPORT void setLabel(const String&);
    5151
    52     WEBCORE_EXPORT Vector<String> functionNames();
    53 
    54     WEBCORE_EXPORT RefPtr<GPUFunction> functionWithName(const String&);
    55 
    5652#if PLATFORM(COCOA)
    57     WEBCORE_EXPORT MTLLibrary* platformLibrary();
     53    WEBCORE_EXPORT MTLDepthStencilState *platformDepthStencilState();
    5854#endif
    5955
    6056private:
    61     GPULibrary(GPUDevice*, const String& sourceCode);
     57    GPUDepthStencilState(GPUDevice*, GPUDepthStencilDescriptor*);
    6258   
    6359#if PLATFORM(COCOA)
    64     RetainPtr<MTLLibrary> m_library;
     60    RetainPtr<MTLDepthStencilState> m_depthStencilState;
    6561#endif
    6662};
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.cpp

    r213731 r213780  
    3030
    3131#include "GPUBuffer.h"
     32#include "GPUCommandQueue.h"
     33#include "GPUDrawable.h"
    3234#include "GPULibrary.h"
    3335#include "GPUTexture.h"
     
    5759}
    5860
     61RefPtr<GPUCommandQueue> GPUDevice::createCommandQueue()
     62{
     63    return GPUCommandQueue::create(this);
     64}
     65
    5966RefPtr<GPULibrary> GPUDevice::createLibrary(const String& sourceCode)
    6067{
     
    7077{
    7178    return GPUTexture::create(this, descriptor);
     79}
     80
     81RefPtr<GPUDrawable> GPUDevice::getFramebuffer()
     82{
     83    return GPUDrawable::create(this);
    7284}
    7385
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDevice.h

    r213762 r213780  
    4848
    4949class GPUBuffer;
    50 // FIXME: WebGPU - Stub implementation - not implemented yet.
    5150class GPUCommandQueue;
    5251class GPUDrawable;
    53 // FIXME: WebGPU - End stub.
    5452class GPULibrary;
    5553class GPUTexture;
     
    7068    WebGPULayer* layer() { return m_layer.get(); }
    7169
     70    WEBCORE_EXPORT RefPtr<GPUCommandQueue> createCommandQueue();
    7271    WEBCORE_EXPORT RefPtr<GPULibrary> createLibrary(const String& sourceCode);
    7372    WEBCORE_EXPORT RefPtr<GPUBuffer> createBufferFromData(ArrayBufferView* data);
    7473    WEBCORE_EXPORT RefPtr<GPUTexture> createTexture(GPUTextureDescriptor*);
    7574
    76     // FIXME: WebGPU - Stub implementation - not implemented yet.
    77     GPUCommandQueue* createCommandQueue() { return nullptr; }
    78     GPUDrawable* getFramebuffer() { return nullptr; }
     75    RefPtr<GPUDrawable> getFramebuffer();
     76
    7977    void markLayerComposited() { }
    80     // FIXME: WebGPU - End stub.
    8178
    8279private:
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDrawable.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUBuffer.h"
     27#include "GPUDrawable.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUCommandBuffer.h"
     32#include "GPUDevice.h"
     33#include "Logging.h"
    3334
    3435namespace WebCore {
    3536
    36 RefPtr<GPUBuffer> GPUBuffer::create(GPUDevice* device, ArrayBufferView* arrayBuffer)
     37RefPtr<GPUDrawable> GPUDrawable::create(GPUDevice* device)
    3738{
    38     RefPtr<GPUBuffer> buffer = adoptRef(new GPUBuffer(device, arrayBuffer));
    39     return buffer;
     39    RefPtr<GPUDrawable> drawable = adoptRef(new GPUDrawable(device));
     40    return drawable;
    4041}
    4142
    42 GPUBuffer::~GPUBuffer()
     43GPUDrawable::~GPUDrawable()
    4344{
    44     LOG(WebGPU, "GPUBuffer::~GPUBuffer()");
     45    LOG(WebGPU, "GPUDrawable::~GPUDrawable()");
    4546}
    4647
    4748#if !PLATFORM(COCOA)
    48 unsigned long GPUBuffer::length() const
     49void GPUDrawable::release()
    4950{
    50     return 0;
    51 }
    52 
    53 RefPtr<ArrayBuffer> GPUBuffer::contents()
    54 {
    55     if (m_contents)
    56         return m_contents;
    57 
    58     m_contents = ArrayBuffer::create(0, 1);
    59     return m_contents;
    6051}
    6152#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPUDrawable.h

    r213779 r213780  
    3333
    3434#if PLATFORM(COCOA)
     35OBJC_CLASS MTLDrawable;
    3536OBJC_CLASS MTLTexture;
    3637#endif
     
    3839namespace WebCore {
    3940
     41class GPUTexture;
    4042class GPUDevice;
    41 class GPUTextureDescriptor;
    4243
    43 class GPUTexture : public RefCounted<GPUTexture> {
     44class GPUDrawable : public RefCounted<GPUDrawable> {
    4445public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     46    static RefPtr<GPUDrawable> create(GPUDevice*);
     47    WEBCORE_EXPORT ~GPUDrawable();
    4848
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     49    WEBCORE_EXPORT void release();
    5150
    5251#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     52    WEBCORE_EXPORT MTLDrawable *platformDrawable();
     53    // FIXME: WebGPU - not all drawables should have this. Only the framebuffer.
     54    WEBCORE_EXPORT MTLTexture *platformTexture();
    5455#endif
    5556
    5657private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
     58    GPUDrawable(GPUDevice*);
    5959   
    6060#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     61    RetainPtr<MTLDrawable> m_drawable;
    6262#endif
    6363};
  • trunk/Source/WebCore/platform/graphics/gpu/GPUEnums.h

    r213779 r213780  
    2424 */
    2525
    26 #include "config.h"
    27 #include "GPUFunction.h"
     26#pragma once
    2827
    2928#if ENABLE(WEBGPU)
    3029
    31 #import "GPULibrary.h"
    32 #import "Logging.h"
    33 #import <Metal/Metal.h>
    34 
    3530namespace WebCore {
    3631
    37 GPUFunction::GPUFunction(GPULibrary* library, const String& name)
    38 {
    39     LOG(WebGPU, "GPUFunction::GPUFunction()");
    40 
    41     if (!library || !library->platformLibrary())
    42         return;
    43 
    44     m_function = (MTLFunction*)[library->platformLibrary() newFunctionWithName:name];
    45 }
    46 
    47 String GPUFunction::name() const
    48 {
    49     if (!m_function)
    50         return emptyString();
    51    
    52     return [m_function name];
    53 }
    54 
    55 MTLFunction* GPUFunction::platformFunction()
    56 {
    57     return m_function.get();
    58 }
     32enum class GPUCompareFunction {
     33    Never = 0,
     34    Less = 1,
     35    Equal = 2,
     36    LessEqual = 3,
     37    Greater = 4,
     38    NotEqual = 5,
     39    GreaterEqual = 6,
     40    Always = 7
     41};
    5942
    6043} // namespace WebCore
    61 
    6244#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPUFunction.h

    r213650 r213780  
    4949
    5050#if PLATFORM(COCOA)
    51     WEBCORE_EXPORT MTLFunction* platformFunction();
     51    WEBCORE_EXPORT MTLFunction *platformFunction();
    5252#endif
    5353
  • trunk/Source/WebCore/platform/graphics/gpu/GPULibrary.cpp

    r213650 r213780  
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "GPUFunction.h"
    33 #import "Logging.h"
     31#include "GPUDevice.h"
     32#include "GPUFunction.h"
     33#include "Logging.h"
    3434
    3535namespace WebCore {
  • trunk/Source/WebCore/platform/graphics/gpu/GPULibrary.h

    r213650 r213780  
    5555
    5656#if PLATFORM(COCOA)
    57     WEBCORE_EXPORT MTLLibrary* platformLibrary();
     57    WEBCORE_EXPORT MTLLibrary *platformLibrary();
    5858#endif
    5959
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderCommandEncoder.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPULibrary.h"
     27#include "GPURenderCommandEncoder.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "GPUFunction.h"
    33 #import "Logging.h"
     31#include "GPUCommandBuffer.h"
     32#include "GPURenderPassDescriptor.h"
     33#include "Logging.h"
    3434
    3535namespace WebCore {
    3636
    37 RefPtr<GPULibrary> GPULibrary::create(GPUDevice* device, const String& sourceCode)
     37RefPtr<GPURenderCommandEncoder> GPURenderCommandEncoder::create(GPUCommandBuffer* buffer, GPURenderPassDescriptor* descriptor)
    3838{
    39     RefPtr<GPULibrary> library = adoptRef(new GPULibrary(device, sourceCode));
    40     return library;
     39    RefPtr<GPURenderCommandEncoder> encoder = adoptRef(new GPURenderCommandEncoder(buffer, descriptor));
     40    return encoder;
    4141}
    4242
    43 GPULibrary::~GPULibrary()
     43GPURenderCommandEncoder::~GPURenderCommandEncoder()
    4444{
    45     LOG(WebGPU, "GPULibrary::~GPULibrary()");
     45    LOG(WebGPU, "GPURenderCommandEncoder::~GPURenderCommandEncoder()");
    4646}
    4747
    4848#if !PLATFORM(COCOA)
    49 
    50 String GPULibrary::label() const
    51 {
    52     return emptyString();
    53 }
    54 
    55 void GPULibrary::setLabel(const String&)
     49void GPURenderCommandEncoder::setRenderPipelineState(GPURenderPipelineState*)
    5650{
    5751}
    5852
    59 Vector<String> GPULibrary::functionNames()
     53void GPURenderCommandEncoder::setDepthStencilState(GPUDepthStencilState*)
    6054{
    61     return { };
    6255}
    6356
     57void GPURenderCommandEncoder::setVertexBuffer(GPUBuffer*, unsigned, unsigned)
     58{
     59}
     60
     61void GPURenderCommandEncoder::setFragmentBuffer(GPUBuffer*, unsigned, unsigned)
     62{
     63}
     64
     65void GPURenderCommandEncoder::drawPrimitives(unsigned, unsigned, unsigned)
     66{
     67}
     68
     69void GPURenderCommandEncoder::endEncoding()
     70{
     71}
    6472#endif
    6573
    66 RefPtr<GPUFunction> GPULibrary::functionWithName(const String& name)
    67 {
    68     return GPUFunction::create(this, name);
    69 }
    70    
    7174} // namespace WebCore
    7275
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderCommandEncoder.h

    r213779 r213780  
    3333
    3434#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     35OBJC_CLASS MTLRenderCommandEncoder;
    3636#endif
    3737
    3838namespace WebCore {
    3939
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     40class GPUBuffer;
     41class GPUCommandBuffer;
     42class GPUDepthStencilState;
     43class GPURenderPassDescriptor;
     44class GPURenderPipelineState;
    4245
    43 class GPUTexture : public RefCounted<GPUTexture> {
     46class GPURenderCommandEncoder : public RefCounted<GPURenderCommandEncoder> {
    4447public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     48    static RefPtr<GPURenderCommandEncoder> create(GPUCommandBuffer*, GPURenderPassDescriptor*);
     49    WEBCORE_EXPORT ~GPURenderCommandEncoder();
    4850
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     51    WEBCORE_EXPORT void setRenderPipelineState(GPURenderPipelineState*);
     52    WEBCORE_EXPORT void setDepthStencilState(GPUDepthStencilState*);
     53    WEBCORE_EXPORT void setVertexBuffer(GPUBuffer*, unsigned offset, unsigned index);
     54    WEBCORE_EXPORT void setFragmentBuffer(GPUBuffer*, unsigned offset, unsigned index);
     55    WEBCORE_EXPORT void drawPrimitives(unsigned type, unsigned start, unsigned count);
     56    WEBCORE_EXPORT void endEncoding();
    5157
    5258#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     59    WEBCORE_EXPORT MTLRenderCommandEncoder *platformRenderCommandEncoder();
    5460#endif
    5561
    5662private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
     63    GPURenderCommandEncoder(GPUCommandBuffer*, GPURenderPassDescriptor*);
    5964   
    6065#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     66    RetainPtr<MTLRenderCommandEncoder> m_renderCommandEncoder;
    6267#endif
    6368};
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassAttachmentDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUTexture.h"
     27#include "GPURenderPassAttachmentDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUTexture.h"
     32#include "Logging.h"
    3333
    3434namespace WebCore {
    3535
    36 RefPtr<GPUTexture> GPUTexture::create(GPUDevice* device, GPUTextureDescriptor* descriptor)
     36GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor()
    3737{
    38     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(device, descriptor));
    39     return texture;
    40 }
    41 
    42 RefPtr<GPUTexture> GPUTexture::createFromExistingTexture(GPUTexture* other)
    43 {
    44     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(other));
    45     return texture;
    46 }
    47 
    48 GPUTexture::~GPUTexture()
    49 {
    50     LOG(WebGPU, "GPUTexture::~GPUTexture()");
     38    LOG(WebGPU, "GPURenderPassAttachmentDescriptor::~GPURenderPassAttachmentDescriptor()");
    5139}
    5240
    5341#if !PLATFORM(COCOA)
    54 unsigned long GPUTexture::width() const
     42GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor()
     43{
     44    LOG(WebGPU, "GPURenderPassAttachmentDescriptor::GPURenderPassAttachmentDescriptor()");
     45}
     46
     47unsigned long GPURenderPassAttachmentDescriptor::loadAction() const
    5548{
    5649    return 0;
    5750}
    5851
    59 unsigned long GPUTexture::height() const
     52void GPURenderPassAttachmentDescriptor::setLoadAction(unsigned long)
     53{
     54}
     55
     56unsigned long GPURenderPassAttachmentDescriptor::storeAction() const
    6057{
    6158    return 0;
     59}
     60
     61void GPURenderPassAttachmentDescriptor::setStoreAction(unsigned long)
     62{
     63}
     64
     65void GPURenderPassAttachmentDescriptor::setTexture(RefPtr<GPUTexture>)
     66{
    6267}
    6368#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassAttachmentDescriptor.h

    r213779 r213780  
    3333
    3434#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     35OBJC_CLASS MTLRenderPassAttachmentDescriptor;
    3636#endif
    3737
    3838namespace WebCore {
    3939
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     40class GPUTexture;
    4241
    43 class GPUTexture : public RefCounted<GPUTexture> {
     42class GPURenderPassAttachmentDescriptor : public RefCounted<GPURenderPassAttachmentDescriptor> {
    4443public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     44    WEBCORE_EXPORT ~GPURenderPassAttachmentDescriptor();
    4845
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     46    WEBCORE_EXPORT unsigned long loadAction() const;
     47    WEBCORE_EXPORT void setLoadAction(unsigned long);
     48
     49    WEBCORE_EXPORT unsigned long storeAction() const;
     50    WEBCORE_EXPORT void setStoreAction(unsigned long);
     51
     52    WEBCORE_EXPORT void setTexture(RefPtr<GPUTexture>);
    5153
    5254#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     55    WEBCORE_EXPORT MTLRenderPassAttachmentDescriptor *platformRenderPassAttachmentDescriptor();
    5456#endif
    5557
    56 private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
    59    
     58protected:
    6059#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     60    GPURenderPassAttachmentDescriptor(MTLRenderPassAttachmentDescriptor *);
     61    RetainPtr<MTLRenderPassAttachmentDescriptor> m_renderPassAttachmentDescriptor;
     62#else
     63    GPURenderPassAttachmentDescriptor();
    6264#endif
    6365};
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUDevice.h"
     27#include "GPURenderPassColorAttachmentDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #include "GPUBuffer.h"
    32 #include "GPULibrary.h"
    33 #include "GPUTexture.h"
    34 #include "GPUTextureDescriptor.h"
     31#include "GPURenderPassAttachmentDescriptor.h"
    3532#include "Logging.h"
    3633
    3734namespace WebCore {
    3835
    39 RefPtr<GPUDevice> GPUDevice::create()
     36#if !PLATFORM(COCOA)
     37RefPtr<GPURenderPassColorAttachmentDescriptor> GPURenderPassColorAttachmentDescriptor::create()
    4038{
    41     RefPtr<GPUDevice> device = adoptRef(new GPUDevice());
     39    RefPtr<GPURenderPassColorAttachmentDescriptor> descriptor = adoptRef(new GPURenderPassColorAttachmentDescriptor());
     40    return descriptor;
     41}
    4242
    43 #if PLATFORM(COCOA)
    44     if (!device->platformDevice()) {
    45         LOG(WebGPU, "GPUDevice::create() was unable to create the low-level device");
    46         return nullptr;
    47     }
     43GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor()
     44    : GPURenderPassAttachmentDescriptor()
     45{
     46    LOG(WebGPU, "GPURenderPassColorAttachmentDescriptor::GPURenderPassColorAttachmentDescriptor()");
     47}
    4848#endif
    4949
    50     LOG(WebGPU, "GPUDevice::create() device is %p", device.get());
    51     return device;
    52 }
    53 
    54 GPUDevice::~GPUDevice()
     50GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor()
    5551{
    56     LOG(WebGPU, "GPUDevice::~GPUDevice()");
    57 }
    58 
    59 RefPtr<GPULibrary> GPUDevice::createLibrary(const String& sourceCode)
    60 {
    61     return GPULibrary::create(this, sourceCode);
    62 }
    63 
    64 RefPtr<GPUBuffer> GPUDevice::createBufferFromData(ArrayBufferView* data)
    65 {
    66     return GPUBuffer::create(this, data);
    67 }
    68 
    69 RefPtr<GPUTexture> GPUDevice::createTexture(GPUTextureDescriptor* descriptor)
    70 {
    71     return GPUTexture::create(this, descriptor);
     52    LOG(WebGPU, "GPURenderPassColorAttachmentDescriptor::~GPURenderPassColorAttachmentDescriptor()");
    7253}
    7354
    7455#if !PLATFORM(COCOA)
    75 
    76 GPUDevice::GPUDevice()
     56Vector<float> GPURenderPassColorAttachmentDescriptor::clearColor() const
    7757{
    78 
     58    return Vector<float>();
    7959}
    8060
    81 void GPUDevice::reshape(int, int)
     61void GPURenderPassColorAttachmentDescriptor::setClearColor(const Vector<float>&)
    8262{
    8363}
    84 
    8564#endif
    8665
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassColorAttachmentDescriptor.h

    r213779 r213780  
    2828#if ENABLE(WEBGPU)
    2929
     30#include "GPURenderPassAttachmentDescriptor.h"
    3031#include <wtf/RefCounted.h>
    3132#include <wtf/RefPtr.h>
    3233#include <wtf/RetainPtr.h>
     34#include <wtf/Vector.h>
    3335
    3436#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     37OBJC_CLASS MTLRenderPassColorAttachmentDescriptor;
    3638#endif
    3739
    3840namespace WebCore {
    3941
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     42class GPURenderPassColorAttachmentDescriptor : public GPURenderPassAttachmentDescriptor {
     43public:
     44#if PLATFORM(COCOA)
     45    static RefPtr<GPURenderPassColorAttachmentDescriptor> create(MTLRenderPassColorAttachmentDescriptor *);
     46#else
     47    static RefPtr<GPURenderPassColorAttachmentDescriptor> create();
     48#endif
     49    WEBCORE_EXPORT ~GPURenderPassColorAttachmentDescriptor();
    4250
    43 class GPUTexture : public RefCounted<GPUTexture> {
    44 public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
    48 
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     51    WEBCORE_EXPORT Vector<float> clearColor() const;
     52    WEBCORE_EXPORT void setClearColor(const Vector<float>&);
    5153
    5254#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     55    WEBCORE_EXPORT MTLRenderPassColorAttachmentDescriptor *platformRenderPassColorAttachmentDescriptor();
    5456#endif
    5557
    5658private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
    59    
    6059#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     60    GPURenderPassColorAttachmentDescriptor(MTLRenderPassColorAttachmentDescriptor *);
     61#else
     62    GPURenderPassColorAttachmentDescriptor();
    6263#endif
    6364};
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUTexture.h"
     27#include "GPURenderPassDepthAttachmentDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPURenderPassAttachmentDescriptor.h"
     32#include "Logging.h"
    3333
    3434namespace WebCore {
    3535
    36 RefPtr<GPUTexture> GPUTexture::create(GPUDevice* device, GPUTextureDescriptor* descriptor)
     36#if !PLATFORM(COCOA)
     37RefPtr<GPURenderPassDepthAttachmentDescriptor> GPURenderPassDepthAttachmentDescriptor::create()
    3738{
    38     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(device, descriptor));
    39     return texture;
     39    RefPtr<GPURenderPassDepthAttachmentDescriptor> descriptor = adoptRef(new GPURenderPassDepthAttachmentDescriptor());
     40    return descriptor;
    4041}
    4142
    42 RefPtr<GPUTexture> GPUTexture::createFromExistingTexture(GPUTexture* other)
     43GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor()
     44    : GPURenderPassAttachmentDescriptor()
    4345{
    44     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(other));
    45     return texture;
     46    LOG(WebGPU, "GPURenderPassDepthAttachmentDescriptor::GPURenderPassDepthAttachmentDescriptor()");
    4647}
     48#endif
    4749
    48 GPUTexture::~GPUTexture()
     50GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor()
    4951{
    50     LOG(WebGPU, "GPUTexture::~GPUTexture()");
     52    LOG(WebGPU, "GPURenderPassDepthAttachmentDescriptor::~GPURenderPassDepthAttachmentDescriptor()");
    5153}
    5254
    5355#if !PLATFORM(COCOA)
    54 unsigned long GPUTexture::width() const
     56double GPURenderPassDepthAttachmentDescriptor::clearDepth() const
    5557{
    5658    return 0;
    5759}
    5860
    59 unsigned long GPUTexture::height() const
     61void GPURenderPassDepthAttachmentDescriptor::setClearDepth(double)
    6062{
    61     return 0;
    6263}
    6364#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassDepthAttachmentDescriptor.h

    r213779 r213780  
    2828#if ENABLE(WEBGPU)
    2929
     30#include "GPURenderPassAttachmentDescriptor.h"
    3031#include <wtf/RefCounted.h>
    3132#include <wtf/RefPtr.h>
    3233#include <wtf/RetainPtr.h>
     34#include <wtf/Vector.h>
    3335
    3436#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     37OBJC_CLASS MTLRenderPassDepthAttachmentDescriptor;
    3638#endif
    3739
    3840namespace WebCore {
    3941
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     42class GPURenderPassDepthAttachmentDescriptor : public GPURenderPassAttachmentDescriptor {
     43public:
     44#if PLATFORM(COCOA)
     45    static RefPtr<GPURenderPassDepthAttachmentDescriptor> create(MTLRenderPassDepthAttachmentDescriptor *);
     46#else
     47    static RefPtr<GPURenderPassDepthAttachmentDescriptor> create();
     48#endif
     49    WEBCORE_EXPORT ~GPURenderPassDepthAttachmentDescriptor();
    4250
    43 class GPUTexture : public RefCounted<GPUTexture> {
    44 public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
    48 
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     51    double clearDepth() const;
     52    void setClearDepth(double);
    5153
    5254#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     55    WEBCORE_EXPORT MTLRenderPassDepthAttachmentDescriptor *platformRenderPassDepthAttachmentDescriptor();
    5456#endif
    5557
    5658private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
    59    
    6059#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     60    GPURenderPassDepthAttachmentDescriptor(MTLRenderPassDepthAttachmentDescriptor *);
     61#else
     62    GPURenderPassDepthAttachmentDescriptor();
    6263#endif
    6364};
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUBuffer.h"
     27#include "GPURenderPassDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPURenderPassDepthAttachmentDescriptor.h"
     32#include "Logging.h"
    3333
    3434namespace WebCore {
    3535
    36 RefPtr<GPUBuffer> GPUBuffer::create(GPUDevice* device, ArrayBufferView* arrayBuffer)
     36RefPtr<GPURenderPassDescriptor> GPURenderPassDescriptor::create()
    3737{
    38     RefPtr<GPUBuffer> buffer = adoptRef(new GPUBuffer(device, arrayBuffer));
    39     return buffer;
     38    RefPtr<GPURenderPassDescriptor> descriptor = adoptRef(new GPURenderPassDescriptor());
     39    return descriptor;
    4040}
    4141
    42 GPUBuffer::~GPUBuffer()
     42GPURenderPassDescriptor::~GPURenderPassDescriptor()
    4343{
    44     LOG(WebGPU, "GPUBuffer::~GPUBuffer()");
     44    LOG(WebGPU, "GPURenderPassDescriptor::~GPURenderPassDescriptor()");
    4545}
    4646
    4747#if !PLATFORM(COCOA)
    48 unsigned long GPUBuffer::length() const
     48RefPtr<GPURenderPassDepthAttachmentDescriptor> GPURenderPassDescriptor::depthAttachment()
    4949{
    50     return 0;
    51 }
    52 
    53 RefPtr<ArrayBuffer> GPUBuffer::contents()
    54 {
    55     if (m_contents)
    56         return m_contents;
    57 
    58     m_contents = ArrayBuffer::create(0, 1);
    59     return m_contents;
     50    return nullptr;
    6051}
    6152#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPassDescriptor.h

    r213779 r213780  
    3131#include <wtf/RefPtr.h>
    3232#include <wtf/RetainPtr.h>
     33#include <wtf/Vector.h>
    3334
    3435#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     36OBJC_CLASS MTLRenderPassDescriptor;
    3637#endif
    3738
    3839namespace WebCore {
    3940
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     41class GPURenderPassColorAttachmentDescriptor;
     42class GPURenderPassDepthAttachmentDescriptor;
    4243
    43 class GPUTexture : public RefCounted<GPUTexture> {
     44class GPURenderPassDescriptor : public RefCounted<GPURenderPassDescriptor> {
    4445public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     46    static RefPtr<GPURenderPassDescriptor> create();
     47    WEBCORE_EXPORT ~GPURenderPassDescriptor();
    4848
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     49    Vector<RefPtr<GPURenderPassColorAttachmentDescriptor>> colorAttachments();
     50    RefPtr<GPURenderPassDepthAttachmentDescriptor> depthAttachment();
    5151
    5252#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     53    WEBCORE_EXPORT MTLRenderPassDescriptor *platformRenderPassDescriptor();
    5454#endif
    5555
    5656private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
    59    
     57    GPURenderPassDescriptor();
     58
    6059#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     60    RetainPtr<MTLRenderPassDescriptor> m_renderPassDescriptor;
    6261#endif
     62    RefPtr<GPURenderPassDepthAttachmentDescriptor> m_depthAttachment;
    6363};
    6464   
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUTexture.h"
     27#include "GPURenderPipelineColorAttachmentDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUTexture.h"
     32#include "Logging.h"
    3333
    3434namespace WebCore {
    3535
    36 RefPtr<GPUTexture> GPUTexture::create(GPUDevice* device, GPUTextureDescriptor* descriptor)
     36GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor()
    3737{
    38     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(device, descriptor));
    39     return texture;
    40 }
    41 
    42 RefPtr<GPUTexture> GPUTexture::createFromExistingTexture(GPUTexture* other)
    43 {
    44     RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(other));
    45     return texture;
    46 }
    47 
    48 GPUTexture::~GPUTexture()
    49 {
    50     LOG(WebGPU, "GPUTexture::~GPUTexture()");
     38    LOG(WebGPU, "GPURenderPipelineColorAttachmentDescriptor::~GPURenderPipelineColorAttachmentDescriptor()");
    5139}
    5240
    5341#if !PLATFORM(COCOA)
    54 unsigned long GPUTexture::width() const
     42GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor()
     43{
     44    LOG(WebGPU, "GPURenderPipelineColorAttachmentDescriptor::GPURenderPipelineColorAttachmentDescriptor()");
     45}
     46
     47unsigned long GPURenderPipelineColorAttachmentDescriptor::pixelFormat() const
    5548{
    5649    return 0;
    5750}
    5851
    59 unsigned long GPUTexture::height() const
     52void GPURenderPipelineColorAttachmentDescriptor::setPixelFormat(unsigned long)
    6053{
    61     return 0;
    6254}
    6355#endif
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPipelineColorAttachmentDescriptor.h

    r213779 r213780  
    3333
    3434#if PLATFORM(COCOA)
    35 OBJC_CLASS MTLTexture;
     35OBJC_CLASS MTLRenderPipelineColorAttachmentDescriptor;
    3636#endif
    3737
    3838namespace WebCore {
    3939
    40 class GPUDevice;
    41 class GPUTextureDescriptor;
     40class GPUTexture;
    4241
    43 class GPUTexture : public RefCounted<GPUTexture> {
     42class GPURenderPipelineColorAttachmentDescriptor : public RefCounted<GPURenderPipelineColorAttachmentDescriptor> {
    4443public:
    45     static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
    47     WEBCORE_EXPORT ~GPUTexture();
     44#if PLATFORM(COCOA)
     45    static RefPtr<GPURenderPipelineColorAttachmentDescriptor> create(MTLRenderPipelineColorAttachmentDescriptor *);
     46#else
     47    static RefPtr<GPURenderPipelineColorAttachmentDescriptor> create();
     48#endif
    4849
    49     WEBCORE_EXPORT unsigned long width() const;
    50     WEBCORE_EXPORT unsigned long height() const;
     50    WEBCORE_EXPORT ~GPURenderPipelineColorAttachmentDescriptor();
     51
     52    WEBCORE_EXPORT unsigned long pixelFormat() const;
     53    WEBCORE_EXPORT void setPixelFormat(unsigned long);
    5154
    5255#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     56    WEBCORE_EXPORT MTLRenderPipelineColorAttachmentDescriptor *platformRenderPipelineColorAttachmentDescriptor();
    5457#endif
    5558
    56 private:
    57     GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
    59    
     59protected:
    6060#if PLATFORM(COCOA)
    61     RetainPtr<MTLTexture> m_texture;
     61    GPURenderPipelineColorAttachmentDescriptor(MTLRenderPipelineColorAttachmentDescriptor *);
     62    RetainPtr<MTLRenderPipelineColorAttachmentDescriptor> m_renderPipelineColorAttachmentDescriptor;
     63#else
     64    GPURenderPipelineColorAttachmentDescriptor();
    6265#endif
    6366};
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPipelineDescriptor.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPUDevice.h"
     27#include "GPURenderPipelineDescriptor.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #include "GPUBuffer.h"
    32 #include "GPULibrary.h"
     31#include "GPUFunction.h"
     32#include "GPURenderPipelineColorAttachmentDescriptor.h"
    3333#include "GPUTexture.h"
    34 #include "GPUTextureDescriptor.h"
    3534#include "Logging.h"
    3635
    3736namespace WebCore {
    3837
    39 RefPtr<GPUDevice> GPUDevice::create()
     38RefPtr<GPURenderPipelineDescriptor> GPURenderPipelineDescriptor::create()
    4039{
    41     RefPtr<GPUDevice> device = adoptRef(new GPUDevice());
    42 
    43 #if PLATFORM(COCOA)
    44     if (!device->platformDevice()) {
    45         LOG(WebGPU, "GPUDevice::create() was unable to create the low-level device");
    46         return nullptr;
    47     }
    48 #endif
    49 
    50     LOG(WebGPU, "GPUDevice::create() device is %p", device.get());
    51     return device;
     40    RefPtr<GPURenderPipelineDescriptor> descriptor = adoptRef(new GPURenderPipelineDescriptor());
     41    return descriptor;
    5242}
    5343
    54 GPUDevice::~GPUDevice()
     44GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor()
    5545{
    56     LOG(WebGPU, "GPUDevice::~GPUDevice()");
    57 }
    58 
    59 RefPtr<GPULibrary> GPUDevice::createLibrary(const String& sourceCode)
    60 {
    61     return GPULibrary::create(this, sourceCode);
    62 }
    63 
    64 RefPtr<GPUBuffer> GPUDevice::createBufferFromData(ArrayBufferView* data)
    65 {
    66     return GPUBuffer::create(this, data);
    67 }
    68 
    69 RefPtr<GPUTexture> GPUDevice::createTexture(GPUTextureDescriptor* descriptor)
    70 {
    71     return GPUTexture::create(this, descriptor);
     46    LOG(WebGPU, "GPURenderPipelineDescriptor::~GPURenderPipelineDescriptor()");
    7247}
    7348
    7449#if !PLATFORM(COCOA)
    75 
    76 GPUDevice::GPUDevice()
     50unsigned long GPURenderPipelineDescriptor::depthAttachmentPixelFormat() const
    7751{
    78 
     52    return false;
    7953}
    8054
    81 void GPUDevice::reshape(int, int)
     55void GPURenderPipelineDescriptor::setDepthAttachmentPixelFormat(unsigned long)
    8256{
    8357}
    8458
     59void GPURenderPipelineDescriptor::setVertexFunction(RefPtr<GPUFunction>)
     60{
     61}
     62
     63void GPURenderPipelineDescriptor::setFragmentFunction(RefPtr<GPUFunction>)
     64{
     65}
     66
     67Vector<RefPtr<GPURenderPipelineColorAttachmentDescriptor>> GPURenderPipelineDescriptor::colorAttachments()
     68{
     69    return Vector<RefPtr<GPURenderPipelineColorAttachmentDescriptor>>();
     70}
    8571#endif
    8672
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPipelineDescriptor.h

    r213779 r213780  
    2828#if ENABLE(WEBGPU)
    2929
     30#include "GPUEnums.h"
    3031#include <wtf/RefCounted.h>
    3132#include <wtf/RefPtr.h>
     33#include <wtf/RetainPtr.h>
    3234#include <wtf/Vector.h>
    33 #include <wtf/text/WTFString.h>
    3435
    3536#if PLATFORM(COCOA)
    36 OBJC_CLASS MTLLibrary;
     37OBJC_CLASS MTLRenderPipelineDescriptor;
    3738#endif
    3839
    3940namespace WebCore {
    4041
    41 class GPUDevice;
    4242class GPUFunction;
     43class GPURenderPipelineColorAttachmentDescriptor;
    4344
    44 class GPULibrary : public RefCounted<GPULibrary> {
     45class GPURenderPipelineDescriptor : public RefCounted<GPURenderPipelineDescriptor> {
    4546public:
    46     static RefPtr<GPULibrary> create(GPUDevice*, const String& sourceCode);
    47     WEBCORE_EXPORT ~GPULibrary();
     47    static RefPtr<GPURenderPipelineDescriptor> create();
     48    WEBCORE_EXPORT ~GPURenderPipelineDescriptor();
    4849
    49     WEBCORE_EXPORT String label() const;
    50     WEBCORE_EXPORT void setLabel(const String&);
     50    WEBCORE_EXPORT void setVertexFunction(RefPtr<GPUFunction>);
     51    WEBCORE_EXPORT void setFragmentFunction(RefPtr<GPUFunction>);
    5152
    52     WEBCORE_EXPORT Vector<String> functionNames();
     53    WEBCORE_EXPORT unsigned long depthAttachmentPixelFormat() const;
     54    WEBCORE_EXPORT void setDepthAttachmentPixelFormat(unsigned long);
    5355
    54     WEBCORE_EXPORT RefPtr<GPUFunction> functionWithName(const String&);
     56    WEBCORE_EXPORT Vector<RefPtr<GPURenderPipelineColorAttachmentDescriptor>> colorAttachments();
     57
     58    WEBCORE_EXPORT void reset();
    5559
    5660#if PLATFORM(COCOA)
    57     WEBCORE_EXPORT MTLLibrary* platformLibrary();
     61    WEBCORE_EXPORT MTLRenderPipelineDescriptor *platformRenderPipelineDescriptor();
    5862#endif
    5963
    6064private:
    61     GPULibrary(GPUDevice*, const String& sourceCode);
    62    
     65    GPURenderPipelineDescriptor();
    6366#if PLATFORM(COCOA)
    64     RetainPtr<MTLLibrary> m_library;
     67    RetainPtr<MTLRenderPipelineDescriptor> m_renderPipelineDescriptor;
    6568#endif
    6669};
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPipelineState.cpp

    r213779 r213780  
    2525
    2626#include "config.h"
    27 #include "GPULibrary.h"
     27#include "GPURenderPipelineState.h"
    2828
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "GPUFunction.h"
    33 #import "Logging.h"
     31#include "GPUDevice.h"
     32#include "GPURenderPipelineDescriptor.h"
     33#include "Logging.h"
    3434
    3535namespace WebCore {
    3636
    37 RefPtr<GPULibrary> GPULibrary::create(GPUDevice* device, const String& sourceCode)
     37RefPtr<GPURenderPipelineState> GPURenderPipelineState::create(GPUDevice* device, GPURenderPipelineDescriptor* descriptor)
    3838{
    39     RefPtr<GPULibrary> library = adoptRef(new GPULibrary(device, sourceCode));
    40     return library;
     39    RefPtr<GPURenderPipelineState> state = adoptRef(new GPURenderPipelineState(device, descriptor));
     40    return state;
    4141}
    4242
    43 GPULibrary::~GPULibrary()
     43GPURenderPipelineState::~GPURenderPipelineState()
    4444{
    45     LOG(WebGPU, "GPULibrary::~GPULibrary()");
     45    LOG(WebGPU, "GPURenderPipelineState::~GPURenderPipelineState()");
    4646}
    4747
    4848#if !PLATFORM(COCOA)
    49 
    50 String GPULibrary::label() const
     49String GPURenderPipelineState::label() const
    5150{
    5251    return emptyString();
    5352}
    5453
    55 void GPULibrary::setLabel(const String&)
     54void GPURenderPipelineState::setLabel(const String&)
    5655{
    5756}
    58 
    59 Vector<String> GPULibrary::functionNames()
    60 {
    61     return { };
    62 }
    63 
    6457#endif
    6558
    66 RefPtr<GPUFunction> GPULibrary::functionWithName(const String& name)
    67 {
    68     return GPUFunction::create(this, name);
    69 }
    70    
    7159} // namespace WebCore
    7260
  • trunk/Source/WebCore/platform/graphics/gpu/GPURenderPipelineState.h

    r213779 r213780  
    3030#include <wtf/RefCounted.h>
    3131#include <wtf/RefPtr.h>
    32 #include <wtf/Vector.h>
     32#include <wtf/RetainPtr.h>
    3333#include <wtf/text/WTFString.h>
    3434
    3535#if PLATFORM(COCOA)
    36 OBJC_CLASS MTLLibrary;
     36OBJC_CLASS MTLRenderPipelineState;
    3737#endif
    3838
     
    4040
    4141class GPUDevice;
    42 class GPUFunction;
     42class GPURenderPipelineDescriptor;
    4343
    44 class GPULibrary : public RefCounted<GPULibrary> {
     44class GPURenderPipelineState : public RefCounted<GPURenderPipelineState> {
    4545public:
    46     static RefPtr<GPULibrary> create(GPUDevice*, const String& sourceCode);
    47     WEBCORE_EXPORT ~GPULibrary();
     46    static RefPtr<GPURenderPipelineState> create(GPUDevice*, GPURenderPipelineDescriptor*);
     47    WEBCORE_EXPORT ~GPURenderPipelineState();
    4848
    4949    WEBCORE_EXPORT String label() const;
    5050    WEBCORE_EXPORT void setLabel(const String&);
    5151
    52     WEBCORE_EXPORT Vector<String> functionNames();
    53 
    54     WEBCORE_EXPORT RefPtr<GPUFunction> functionWithName(const String&);
    55 
    5652#if PLATFORM(COCOA)
    57     WEBCORE_EXPORT MTLLibrary* platformLibrary();
     53    WEBCORE_EXPORT MTLRenderPipelineState *platformRenderPipelineState();
    5854#endif
    5955
    6056private:
    61     GPULibrary(GPUDevice*, const String& sourceCode);
     57    GPURenderPipelineState(GPUDevice*, GPURenderPipelineDescriptor*);
    6258   
    6359#if PLATFORM(COCOA)
    64     RetainPtr<MTLLibrary> m_library;
     60    RetainPtr<MTLRenderPipelineState> m_renderPipelineState;
    6561#endif
    6662};
  • trunk/Source/WebCore/platform/graphics/gpu/GPUTexture.cpp

    r213731 r213780  
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "GPUDevice.h"
    32 #import "Logging.h"
     31#include "GPUDevice.h"
     32#include "GPUDrawable.h"
     33#include "Logging.h"
    3334
    3435namespace WebCore {
     
    4041}
    4142
    42 RefPtr<GPUTexture> GPUTexture::createFromExistingTexture(GPUTexture* other)
     43RefPtr<GPUTexture> GPUTexture::createFromDrawable(GPUDrawable* other)
    4344{
    4445    RefPtr<GPUTexture> texture = adoptRef(new GPUTexture(other));
  • trunk/Source/WebCore/platform/graphics/gpu/GPUTexture.h

    r213731 r213780  
    3939
    4040class GPUDevice;
     41class GPUDrawable;
    4142class GPUTextureDescriptor;
    4243
     
    4445public:
    4546    static RefPtr<GPUTexture> create(GPUDevice*, GPUTextureDescriptor*);
    46     static RefPtr<GPUTexture> createFromExistingTexture(GPUTexture*);
     47    static RefPtr<GPUTexture> createFromDrawable(GPUDrawable*);
     48
    4749    WEBCORE_EXPORT ~GPUTexture();
    4850
     
    5153
    5254#if PLATFORM(COCOA)
    53     WEBCORE_EXPORT MTLTexture* platformTexture();
     55    WEBCORE_EXPORT MTLTexture *platformTexture();
    5456#endif
    5557
    5658private:
    5759    GPUTexture(GPUDevice*, GPUTextureDescriptor*);
    58     GPUTexture(GPUTexture*);
     60    GPUTexture(GPUDrawable*);
    5961   
    6062#if PLATFORM(COCOA)
  • trunk/Source/WebCore/platform/graphics/gpu/GPUTextureDescriptor.cpp

    r213731 r213780  
    2929#if ENABLE(WEBGPU)
    3030
    31 #import "Logging.h"
     31#include "Logging.h"
    3232
    3333namespace WebCore {
  • trunk/Source/WebCore/platform/graphics/gpu/GPUTextureDescriptor.h

    r213731 r213780  
    6262
    6363#if PLATFORM(COCOA)
    64     WEBCORE_EXPORT MTLTextureDescriptor* platformTextureDescriptor();
     64    WEBCORE_EXPORT MTLTextureDescriptor *platformTextureDescriptor();
    6565#endif
    6666
Note: See TracChangeset for help on using the changeset viewer.