#include "dawn/native/null/DeviceNull.h"
#include <limits>
#include <utility>
#include "dawn/native/BackendConnection.h"
#include "dawn/native/ChainUtils.h"
#include "dawn/native/Commands.h"
#include "dawn/native/ErrorData.h"
#include "dawn/native/Instance.h"
#include "dawn/native/Surface.h"
#include "dawn/native/TintUtils.h"
#include "partition_alloc/pointers/raw_ptr.h"
#include "tint/tint.h"
namespace dawn::native::null {
PhysicalDevice::PhysicalDevice() : … { … }
PhysicalDevice::~PhysicalDevice() = default;
bool PhysicalDevice::SupportsExternalImages() const { … }
bool PhysicalDevice::SupportsFeatureLevel(FeatureLevel) const { … }
ResultOrError<PhysicalDeviceSurfaceCapabilities> PhysicalDevice::GetSurfaceCapabilities(
InstanceBase* instance,
const Surface* surface) const { … }
MaybeError PhysicalDevice::InitializeImpl() { … }
void PhysicalDevice::InitializeSupportedFeaturesImpl() { … }
MaybeError PhysicalDevice::InitializeSupportedLimitsImpl(CombinedLimits* limits) { … }
void PhysicalDevice::SetupBackendAdapterToggles(dawn::platform::Platform* platform,
TogglesState* adapterToggles) const { … }
void PhysicalDevice::SetupBackendDeviceToggles(dawn::platform::Platform* platform,
TogglesState* deviceToggles) const { … }
ResultOrError<Ref<DeviceBase>> PhysicalDevice::CreateDeviceImpl(
AdapterBase* adapter,
const UnpackedPtr<DeviceDescriptor>& descriptor,
const TogglesState& deviceToggles,
Ref<DeviceBase::DeviceLostEvent>&& lostEvent) { … }
void PhysicalDevice::PopulateBackendProperties(UnpackedPtr<AdapterProperties>& properties) const { … }
FeatureValidationResult PhysicalDevice::ValidateFeatureSupportedWithTogglesImpl(
wgpu::FeatureName feature,
const TogglesState& toggles) const { … }
class Backend : public BackendConnection { … };
BackendConnection* Connect(InstanceBase* instance) { … }
struct CopyFromStagingToBufferOperation : PendingOperation { … };
ResultOrError<Ref<Device>> Device::Create(AdapterBase* adapter,
const UnpackedPtr<DeviceDescriptor>& descriptor,
const TogglesState& deviceToggles,
Ref<DeviceBase::DeviceLostEvent>&& lostEvent) { … }
Device::~Device() { … }
MaybeError Device::Initialize(const UnpackedPtr<DeviceDescriptor>& descriptor) { … }
ResultOrError<Ref<BindGroupBase>> Device::CreateBindGroupImpl(
const BindGroupDescriptor* descriptor) { … }
ResultOrError<Ref<BindGroupLayoutInternalBase>> Device::CreateBindGroupLayoutImpl(
const BindGroupLayoutDescriptor* descriptor) { … }
ResultOrError<Ref<BufferBase>> Device::CreateBufferImpl(
const UnpackedPtr<BufferDescriptor>& descriptor) { … }
ResultOrError<Ref<CommandBufferBase>> Device::CreateCommandBuffer(
CommandEncoder* encoder,
const CommandBufferDescriptor* descriptor) { … }
Ref<ComputePipelineBase> Device::CreateUninitializedComputePipelineImpl(
const UnpackedPtr<ComputePipelineDescriptor>& descriptor) { … }
ResultOrError<Ref<PipelineLayoutBase>> Device::CreatePipelineLayoutImpl(
const UnpackedPtr<PipelineLayoutDescriptor>& descriptor) { … }
ResultOrError<Ref<QuerySetBase>> Device::CreateQuerySetImpl(const QuerySetDescriptor* descriptor) { … }
Ref<RenderPipelineBase> Device::CreateUninitializedRenderPipelineImpl(
const UnpackedPtr<RenderPipelineDescriptor>& descriptor) { … }
ResultOrError<Ref<SamplerBase>> Device::CreateSamplerImpl(const SamplerDescriptor* descriptor) { … }
ResultOrError<Ref<ShaderModuleBase>> Device::CreateShaderModuleImpl(
const UnpackedPtr<ShaderModuleDescriptor>& descriptor,
const std::vector<tint::wgsl::Extension>& internalExtensions,
ShaderModuleParseResult* parseResult,
OwnedCompilationMessages* compilationMessages) { … }
ResultOrError<Ref<SwapChainBase>> Device::CreateSwapChainImpl(Surface* surface,
SwapChainBase* previousSwapChain,
const SurfaceConfiguration* config) { … }
ResultOrError<Ref<TextureBase>> Device::CreateTextureImpl(
const UnpackedPtr<TextureDescriptor>& descriptor) { … }
ResultOrError<Ref<TextureViewBase>> Device::CreateTextureViewImpl(
TextureBase* texture,
const UnpackedPtr<TextureViewDescriptor>& descriptor) { … }
void Device::DestroyImpl() { … }
void Device::ForgetPendingOperations() { … }
MaybeError Device::CopyFromStagingToBufferImpl(BufferBase* source,
uint64_t sourceOffset,
BufferBase* destination,
uint64_t destinationOffset,
uint64_t size) { … }
MaybeError Device::CopyFromStagingToTextureImpl(const BufferBase* source,
const TextureDataLayout& src,
const TextureCopy& dst,
const Extent3D& copySizePixels) { … }
MaybeError Device::IncrementMemoryUsage(uint64_t bytes) { … }
void Device::DecrementMemoryUsage(uint64_t bytes) { … }
MaybeError Device::TickImpl() { … }
void Device::AddPendingOperation(std::unique_ptr<PendingOperation> operation) { … }
MaybeError Device::SubmitPendingOperations() { … }
BindGroupDataHolder::BindGroupDataHolder(size_t size)
: … { … }
BindGroupDataHolder::~BindGroupDataHolder() { … }
BindGroup::BindGroup(DeviceBase* device, const BindGroupDescriptor* descriptor)
: … { … }
BindGroupLayout::BindGroupLayout(DeviceBase* device, const BindGroupLayoutDescriptor* descriptor)
: … { … }
Buffer::Buffer(Device* device, const UnpackedPtr<BufferDescriptor>& descriptor)
: … { … }
bool Buffer::IsCPUWritableAtCreation() const { … }
MaybeError Buffer::MapAtCreationImpl() { … }
void Buffer::CopyFromStaging(BufferBase* staging,
uint64_t sourceOffset,
uint64_t destinationOffset,
uint64_t size) { … }
void Buffer::DoWriteBuffer(uint64_t bufferOffset, const void* data, size_t size) { … }
MaybeError Buffer::MapAsyncImpl(wgpu::MapMode mode, size_t offset, size_t size) { … }
void* Buffer::GetMappedPointer() { … }
void Buffer::UnmapImpl() { … }
void Buffer::DestroyImpl() { … }
CommandBuffer::CommandBuffer(CommandEncoder* encoder, const CommandBufferDescriptor* descriptor)
: … { … }
QuerySet::QuerySet(Device* device, const QuerySetDescriptor* descriptor)
: … { … }
Queue::Queue(Device* device, const QueueDescriptor* descriptor) : … { … }
Queue::~Queue() { … }
MaybeError Queue::SubmitImpl(uint32_t, CommandBufferBase* const*) { … }
MaybeError Queue::WriteBufferImpl(BufferBase* buffer,
uint64_t bufferOffset,
const void* data,
size_t size) { … }
ResultOrError<ExecutionSerial> Queue::CheckAndUpdateCompletedSerials() { … }
void Queue::ForceEventualFlushOfCommands() { … }
bool Queue::HasPendingCommands() const { … }
MaybeError Queue::SubmitPendingCommands() { … }
ResultOrError<bool> Queue::WaitForQueueSerial(ExecutionSerial serial, Nanoseconds timeout) { … }
MaybeError Queue::WaitForIdleForDestruction() { … }
MaybeError ComputePipeline::InitializeImpl() { … }
MaybeError RenderPipeline::InitializeImpl() { … }
ResultOrError<Ref<SwapChain>> SwapChain::Create(Device* device,
Surface* surface,
SwapChainBase* previousSwapChain,
const SurfaceConfiguration* config) { … }
MaybeError SwapChain::Initialize(SwapChainBase* previousSwapChain) { … }
SwapChain::~SwapChain() = default;
MaybeError SwapChain::PresentImpl() { … }
ResultOrError<SwapChainTextureInfo> SwapChain::GetCurrentTextureImpl() { … }
void SwapChain::DetachFromSurfaceImpl() { … }
MaybeError ShaderModule::Initialize(ShaderModuleParseResult* parseResult,
OwnedCompilationMessages* compilationMessages) { … }
uint32_t Device::GetOptimalBytesPerRowAlignment() const { … }
uint64_t Device::GetOptimalBufferToTextureCopyOffsetAlignment() const { … }
float Device::GetTimestampPeriodInNS() const { … }
bool Device::CanTextureLoadResolveTargetInTheSameRenderpass() const { … }
Texture::Texture(DeviceBase* device, const UnpackedPtr<TextureDescriptor>& descriptor)
: … { … }
}