Changeset 268869 in webkit
- Timestamp:
- Oct 22, 2020, 9:47:20 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 added
- 3 edited
- 14 copied
-
ChangeLog (modified) (1 diff)
-
PlatformWinCairo.cmake (modified) (1 diff)
-
platform/Dawn.cmake (added)
-
platform/graphics/gpu/GPUPlatformTypes.h (modified) (1 diff)
-
platform/graphics/gpu/dawn (added)
-
platform/graphics/gpu/dawn/GPUBindGroupAllocatorDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUBindGroupDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (2 diffs)
-
platform/graphics/gpu/dawn/GPUBindGroupLayoutDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (2 diffs)
-
platform/graphics/gpu/dawn/GPUBufferDawn.cpp (added)
-
platform/graphics/gpu/dawn/GPUCommandBufferDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUComputePassEncoderDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUComputePipelineDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUDeviceDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUPlatformTypesDawn.h (added)
-
platform/graphics/gpu/dawn/GPUProgrammablePassEncoderDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUQueueDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPURenderPassEncoderDawn.cpp (added)
-
platform/graphics/gpu/dawn/GPURenderPipelineDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUSamplerDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUShaderModuleDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUSwapChainDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
-
platform/graphics/gpu/dawn/GPUTextureDawn.cpp (copied) (copied from trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h ) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268868 r268869 1 2020-10-22 Don Olmstead <don.olmstead@sony.com> 2 3 [WebGPU] Add Dawn implementation skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=217982 5 6 Reviewed by Myles C. Maxfield. 7 8 Add an empty implementation of the WebGPU types. This gets WebGPU built and linking 9 using Dawn. 10 11 * PlatformWinCairo.cmake: 12 * platform/Dawn.cmake: Added. 13 * platform/graphics/gpu/GPUPlatformTypes.h: 14 * platform/graphics/gpu/dawn/GPUBindGroupAllocatorDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 15 (WebCore::GPUBindGroupAllocator::create): 16 (WebCore::GPUBindGroupAllocator::GPUBindGroupAllocator): 17 (WebCore::GPUBindGroupAllocator::reallocate): 18 (WebCore::GPUBindGroupAllocator::tryReset): 19 * platform/graphics/gpu/dawn/GPUBindGroupDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 20 (WebCore::GPUBindGroup::tryCreate): 21 (WebCore::GPUBindGroup::GPUBindGroup): 22 (WebCore::GPUBindGroup::~GPUBindGroup): 23 * platform/graphics/gpu/dawn/GPUBindGroupLayoutDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 24 (WebCore::GPUBindGroupLayout::tryCreate): 25 * platform/graphics/gpu/dawn/GPUBufferDawn.cpp: Added. 26 (WebCore::GPUBuffer::tryCreate): 27 (WebCore::GPUBuffer::GPUBuffer): 28 (WebCore::GPUBuffer::~GPUBuffer): 29 (WebCore::GPUBuffer::isReadOnly const): 30 (WebCore::GPUBuffer::state const): 31 (WebCore::GPUBuffer::mapOnCreation): 32 (WebCore::GPUBuffer::registerMappingCallback): 33 (WebCore::GPUBuffer::runMappingCallback): 34 (WebCore::GPUBuffer::stagingBufferForRead): 35 (WebCore::GPUBuffer::stagingBufferForWrite): 36 (WebCore::GPUBuffer::copyStagingBufferToGPU): 37 (WebCore::GPUBuffer::unmap): 38 (WebCore::GPUBuffer::destroy): 39 * platform/graphics/gpu/dawn/GPUCommandBufferDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 40 (WebCore::GPUCommandBuffer::tryCreate): 41 (WebCore::GPUCommandBuffer::GPUCommandBuffer): 42 (WebCore::GPUCommandBuffer::copyBufferToBuffer): 43 (WebCore::GPUCommandBuffer::copyBufferToTexture): 44 (WebCore::GPUCommandBuffer::copyTextureToBuffer): 45 (WebCore::GPUCommandBuffer::copyTextureToTexture): 46 * platform/graphics/gpu/dawn/GPUComputePassEncoderDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 47 (WebCore::GPUComputePassEncoder::tryCreate): 48 (WebCore::GPUComputePassEncoder::GPUComputePassEncoder): 49 (WebCore::GPUComputePassEncoder::setPipeline): 50 (WebCore::GPUComputePassEncoder::dispatch): 51 (WebCore::GPUComputePassEncoder::platformPassEncoder const): 52 * platform/graphics/gpu/dawn/GPUComputePipelineDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 53 (WebCore::GPUComputePipeline::tryCreate): 54 (WebCore::GPUComputePipeline::recompile): 55 * platform/graphics/gpu/dawn/GPUDeviceDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 56 (WebCore::GPUDevice::tryCreate): 57 (WebCore::GPUDevice::GPUDevice): 58 * platform/graphics/gpu/dawn/GPUPlatformTypesDawn.h: Added. 59 (WebCore::HandleDeleter<PlatformBuffer>::operator()): 60 (WebCore::HandleDeleter<PlatformCommandBuffer>::operator()): 61 (WebCore::HandleDeleter<PlatformComputePassEncoder>::operator()): 62 (WebCore::HandleDeleter<PlatformComputePipeline>::operator()): 63 (WebCore::HandleDeleter<PlatformDevice>::operator()): 64 (WebCore::HandleDeleter<PlatformDrawable>::operator()): 65 (WebCore::HandleDeleter<PlatformProgrammablePassEncoder>::operator()): 66 (WebCore::HandleDeleter<PlatformQueue>::operator()): 67 (WebCore::HandleDeleter<PlatformRenderPassEncoder>::operator()): 68 (WebCore::HandleDeleter<PlatformRenderPipeline>::operator()): 69 (WebCore::HandleDeleter<PlatformSampler>::operator()): 70 (WebCore::HandleDeleter<PlatformShaderModule>::operator()): 71 (WebCore::HandleDeleter<PlatformSwapLayer>::operator()): 72 (WebCore::HandleDeleter<PlatformTexture>::operator()): 73 * platform/graphics/gpu/dawn/GPUProgrammablePassEncoderDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 74 (WebCore::GPUProgrammablePassEncoder::endPass): 75 (WebCore::GPUProgrammablePassEncoder::setBindGroup): 76 * platform/graphics/gpu/dawn/GPUQueueDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 77 (WebCore::GPUQueue::tryCreate): 78 (WebCore::GPUQueue::GPUQueue): 79 (WebCore::GPUQueue::submit): 80 (WebCore::GPUQueue::label const): 81 (WebCore::GPUQueue::setLabel const): 82 * platform/graphics/gpu/dawn/GPURenderPassEncoderDawn.cpp: Added. 83 (WebCore::GPURenderPassEncoder::tryCreate): 84 (WebCore::GPURenderPassEncoder::GPURenderPassEncoder): 85 (WebCore::GPURenderPassEncoder::platformPassEncoder const): 86 (WebCore::GPURenderPassEncoder::setPipeline): 87 (WebCore::GPURenderPassEncoder::setBlendColor): 88 (WebCore::GPURenderPassEncoder::setViewport): 89 (WebCore::GPURenderPassEncoder::setScissorRect): 90 (WebCore::GPURenderPassEncoder::setIndexBuffer): 91 (WebCore::GPURenderPassEncoder::setVertexBuffers): 92 (WebCore::GPURenderPassEncoder::draw): 93 (WebCore::GPURenderPassEncoder::drawIndexed): 94 * platform/graphics/gpu/dawn/GPURenderPipelineDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 95 (WebCore::GPURenderPipeline::tryCreate): 96 (WebCore::GPURenderPipeline::recompile): 97 * platform/graphics/gpu/dawn/GPUSamplerDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 98 (WebCore::GPUSampler::tryCreate): 99 (WebCore::GPUSampler::GPUSampler): 100 * platform/graphics/gpu/dawn/GPUShaderModuleDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 101 (WebCore::GPUShaderModule::tryCreate): 102 (WebCore::GPUShaderModule::GPUShaderModule): 103 * platform/graphics/gpu/dawn/GPUSwapChainDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 104 (WebCore::GPUSwapChain::tryCreate): 105 (WebCore::GPUSwapChain::GPUSwapChain): 106 (WebCore::GPUSwapChain::tryGetCurrentTexture): 107 (WebCore::GPUSwapChain::present): 108 (WebCore::GPUSwapChain::reshape): 109 (WebCore::GPUSwapChain::platformLayer const): 110 * platform/graphics/gpu/dawn/GPUTextureDawn.cpp: Copied from Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h. 111 (WebCore::GPUTexture::tryCreate): 112 (WebCore::GPUTexture::create): 113 (WebCore::GPUTexture::GPUTexture): 114 (WebCore::GPUTexture::tryCreateDefaultTextureView): 115 1 116 2020-10-22 Chris Dumez <cdumez@apple.com> 2 117 -
trunk/Source/WebCore/PlatformWinCairo.cmake
r267034 r268869 4 4 include(platform/OpenSSL.cmake) 5 5 include(platform/TextureMapper.cmake) 6 7 if (USE_DAWN) 8 include(platform/Dawn.cmake) 9 endif () 6 10 7 11 list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES -
trunk/Source/WebCore/platform/graphics/gpu/GPUPlatformTypes.h
r268603 r268869 28 28 #if USE(METAL) 29 29 #include "GPUPlatformTypesMetal.h" 30 #elif USE(DAWN) 31 #include "GPUPlatformTypesDawn.h" 30 32 #else 31 33 #error "Unsupported platform for WebGPU" -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUBindGroupAllocatorDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUBindGroupAllocator.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 #include "GPUErrorScopes.h" 32 33 namespace WebCore { 34 35 Ref<GPUBindGroupAllocator> GPUBindGroupAllocator::create(GPUErrorScopes& errors) 36 { 37 return adoptRef(*new GPUBindGroupAllocator(errors)); 38 } 39 40 GPUBindGroupAllocator::GPUBindGroupAllocator(GPUErrorScopes& errors) 41 : m_errorScopes(makeRef(errors)) 42 { 43 } 44 45 bool GPUBindGroupAllocator::reallocate(PlatformGPUBufferOffset newOffset) 46 { 47 return false; 48 } 49 50 void GPUBindGroupAllocator::tryReset() 51 { 52 } 53 54 } // namespace WebCore 55 56 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUBindGroupDawn.cpp
r268868 r268869 1 1 /* 2 * Copyright (C) 20 20 Sony Interactive Entertainment Inc.2 * Copyright (C) 2019 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUBindGroup.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 #include "GPUBindGroupAllocator.h" 32 #include "GPUErrorScopes.h" 33 #include <webgpu/webgpu.h> 34 35 namespace WebCore { 36 37 RefPtr<GPUBindGroup> GPUBindGroup::tryCreate(const GPUBindGroupDescriptor& descriptor, GPUBindGroupAllocator& allocator) 38 { 39 return nullptr; 40 } 41 42 GPUBindGroup::GPUBindGroup(GPUBindGroupAllocator::ArgumentBufferOffsets&& offsets, GPUBindGroupAllocator& allocator, HashSet<Ref<GPUBuffer>>&& buffers, HashSet<Ref<GPUTexture>>&& textures) 43 : m_argumentBufferOffsets(WTFMove(offsets)) 44 , m_allocator(makeRef(allocator)) 45 , m_boundBuffers(WTFMove(buffers)) 46 , m_boundTextures(WTFMove(textures)) 47 { 48 } 49 50 GPUBindGroup::~GPUBindGroup() 51 { 52 } 53 54 } // namespace WebCore 55 56 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUBindGroupLayoutDawn.cpp
r268868 r268869 1 1 /* 2 * Copyright (C) 20 20 Sony Interactive Entertainment Inc.2 * Copyright (C) 2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUBindGroupLayout.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 #include "GPUDevice.h" 32 #include <webgpu/webgpu.h> 33 34 namespace WebCore { 35 36 RefPtr<GPUBindGroupLayout> GPUBindGroupLayout::tryCreate(const GPUDevice& device, const GPUBindGroupLayoutDescriptor& descriptor) 37 { 38 return nullptr; 39 } 40 41 } // namespace WebCore 42 43 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUCommandBufferDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUCommandBuffer.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUCommandBuffer> GPUCommandBuffer::tryCreate(const GPUDevice& device) 34 { 35 return nullptr; 36 } 37 38 GPUCommandBuffer::GPUCommandBuffer(PlatformCommandBufferSmartPtr&& buffer) 39 : m_platformCommandBuffer(WTFMove(buffer)) 40 { 41 } 42 43 void GPUCommandBuffer::copyBufferToBuffer(Ref<GPUBuffer>&& src, uint64_t srcOffset, Ref<GPUBuffer>&& dst, uint64_t dstOffset, uint64_t size) 44 { 45 } 46 47 void GPUCommandBuffer::copyBufferToTexture(GPUBufferCopyView&& srcBuffer, GPUTextureCopyView&& dstTexture, const GPUExtent3D& size) 48 { 49 } 50 51 void GPUCommandBuffer::copyTextureToBuffer(GPUTextureCopyView&& srcTexture, GPUBufferCopyView&& dstBuffer, const GPUExtent3D& size) 52 { 53 } 54 55 void GPUCommandBuffer::copyTextureToTexture(GPUTextureCopyView&& src, GPUTextureCopyView&& dst, const GPUExtent3D& size) 56 { 57 } 58 59 } // namespace WebCore 60 61 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUComputePassEncoderDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUComputePassEncoder.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUComputePassEncoder> GPUComputePassEncoder::tryCreate(Ref<GPUCommandBuffer>&& buffer) 34 { 35 return nullptr; 36 } 37 38 GPUComputePassEncoder::GPUComputePassEncoder(Ref<GPUCommandBuffer>&& buffer, PlatformComputePassEncoderSmartPtr&& encoder) 39 : GPUProgrammablePassEncoder(WTFMove(buffer)) 40 , m_platformComputePassEncoder(WTFMove(encoder)) 41 { 42 } 43 44 void GPUComputePassEncoder::setPipeline(Ref<const GPUComputePipeline>&& pipeline) 45 { 46 } 47 48 void GPUComputePassEncoder::dispatch(unsigned x, unsigned y, unsigned z) 49 { 50 } 51 52 const PlatformProgrammablePassEncoder* GPUComputePassEncoder::platformPassEncoder() const 53 { 54 return nullptr; 55 } 56 57 } // namespace WebCore 58 59 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUComputePipelineDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUComputePipeline.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 #include "GPUPipelineLayout.h" 32 33 namespace WebCore { 34 35 RefPtr<GPUComputePipeline> GPUComputePipeline::tryCreate(const GPUDevice& device, const GPUComputePipelineDescriptor& descriptor, GPUErrorScopes& errorScopes) 36 { 37 return nullptr; 38 } 39 40 GPUComputePipeline::~GPUComputePipeline() = default; 41 42 bool GPUComputePipeline::recompile(const GPUDevice& device, GPUProgrammableStageDescriptor&& computeStage) 43 { 44 return false; 45 } 46 47 } // namespace WebCore 48 49 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUDeviceDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUDevice.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUDevice> GPUDevice::tryCreate(const Optional<GPURequestAdapterOptions>& options) 34 { 35 return nullptr; 36 } 37 38 GPUDevice::GPUDevice(PlatformDeviceSmartPtr&& device) 39 : m_platformDevice(WTFMove(device)) 40 { 41 } 42 43 } // namespace WebCore 44 45 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUProgrammablePassEncoderDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUProgrammablePassEncoder.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 void GPUProgrammablePassEncoder::endPass() 34 { 35 } 36 37 void GPUProgrammablePassEncoder::setBindGroup(unsigned index, GPUBindGroup& bindGroup) 38 { 39 } 40 41 } // namespace WebCore 42 43 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUQueueDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUQueue.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 #include "GPUDevice.h" 32 #include <wtf/text/WTFString.h> 33 34 namespace WebCore { 35 36 RefPtr<GPUQueue> GPUQueue::tryCreate(const GPUDevice& device) 37 { 38 return nullptr; 39 } 40 41 GPUQueue::GPUQueue(PlatformQueueSmartPtr&& queue, const GPUDevice& device) 42 : m_platformQueue(WTFMove(queue)) 43 , m_device(makeWeakPtr(device)) 44 { 45 } 46 47 void GPUQueue::submit(Vector<Ref<GPUCommandBuffer>>&& commandBuffers) 48 { 49 } 50 51 String GPUQueue::label() const 52 { 53 return emptyString(); 54 } 55 56 void GPUQueue::setLabel(const String& label) const 57 { 58 } 59 60 } // namespace WebCore 61 62 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPURenderPipelineDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPURenderPipeline.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPURenderPipeline> GPURenderPipeline::tryCreate(const GPUDevice& device, const GPURenderPipelineDescriptor& descriptor, GPUErrorScopes& errorScopes) 34 { 35 return nullptr; 36 } 37 38 GPURenderPipeline::~GPURenderPipeline() = default; 39 40 bool GPURenderPipeline::recompile(const GPUDevice& device, GPUProgrammableStageDescriptor&& vertexStage, Optional<GPUProgrammableStageDescriptor>&& fragmentStage) 41 { 42 return false; 43 } 44 45 } // namespace WebCore 46 47 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUSamplerDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUSampler.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUSampler> GPUSampler::tryCreate(const GPUDevice& device, const GPUSamplerDescriptor& descriptor) 34 { 35 return nullptr; 36 } 37 38 GPUSampler::GPUSampler(PlatformSamplerSmartPtr&& sampler) 39 : m_platformSampler(WTFMove(sampler)) 40 { 41 } 42 43 } // namespace WebCore 44 45 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUShaderModuleDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUShaderModule.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUShaderModule> GPUShaderModule::tryCreate(const GPUDevice& device, const GPUShaderModuleDescriptor& descriptor) 34 { 35 return nullptr; 36 } 37 38 GPUShaderModule::GPUShaderModule(PlatformShaderModuleSmartPtr&& module) 39 : m_platformShaderModule(WTFMove(module)) 40 { 41 } 42 43 } // namespace WebCore 44 45 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUSwapChainDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUSwapChain.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUSwapChain> GPUSwapChain::tryCreate(const GPUSwapChainDescriptor& descriptor, int width, int height) 34 { 35 return nullptr; 36 } 37 38 GPUSwapChain::GPUSwapChain(PlatformSwapLayerSmartPtr&& platformLayer, OptionSet<GPUTextureUsage::Flags> usageOptions) 39 : m_platformSwapLayer(WTFMove(platformLayer)) 40 , m_usage(usageOptions) 41 { 42 } 43 44 RefPtr<GPUTexture> GPUSwapChain::tryGetCurrentTexture() 45 { 46 return nullptr; 47 } 48 49 void GPUSwapChain::present() 50 { 51 if (!m_currentDrawable) 52 return; 53 } 54 55 void GPUSwapChain::reshape(int width, int height) 56 { 57 58 } 59 60 PlatformLayer* GPUSwapChain::platformLayer() const 61 { 62 return nullptr; 63 } 64 65 } // namespace WebCore 66 67 #endif // ENABLE(WEBGPU) -
trunk/Source/WebCore/platform/graphics/gpu/dawn/GPUTextureDawn.cpp
r268868 r268869 24 24 */ 25 25 26 #pragma once 26 #include "config.h" 27 #include "GPUTexture.h" 27 28 28 #if USE(METAL) 29 #include "GPUPlatformTypesMetal.h" 30 #else 31 #error "Unsupported platform for WebGPU" 32 #endif 29 #if ENABLE(WEBGPU) 30 31 namespace WebCore { 32 33 RefPtr<GPUTexture> GPUTexture::tryCreate(const GPUDevice& device, const GPUTextureDescriptor& descriptor, GPUErrorScopes& errorScopes) 34 { 35 return nullptr; 36 } 37 38 Ref<GPUTexture> GPUTexture::create(PlatformTextureSmartPtr&& texture, OptionSet<GPUTextureUsage::Flags> usage) 39 { 40 return adoptRef(*new GPUTexture(WTFMove(texture), usage)); 41 } 42 43 GPUTexture::GPUTexture(PlatformTextureSmartPtr&& texture, OptionSet<GPUTextureUsage::Flags> usage) 44 : m_platformTexture(WTFMove(texture)) 45 , m_usage(usage) 46 { 47 } 48 49 RefPtr<GPUTexture> GPUTexture::tryCreateDefaultTextureView() 50 { 51 return nullptr; 52 } 53 54 } // namespace WebCore 55 56 #endif // ENABLE(WEBGPU)
Note:
See TracChangeset
for help on using the changeset viewer.