chromium/third_party/dawn/src/dawn/native/DawnNative.cpp

// Copyright 2018 The Dawn & Tint Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
//    list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
//    this list of conditions and the following disclaimer in the documentation
//    and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
//    contributors may be used to endorse or promote products derived from
//    this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "dawn/native/DawnNative.h"

#include <vector>

#include "dawn/common/Log.h"
#include "dawn/native/BindGroupLayout.h"
#include "dawn/native/Buffer.h"
#include "dawn/native/Device.h"
#include "dawn/native/Instance.h"
#include "dawn/native/Texture.h"
#include "dawn/platform/DawnPlatform.h"
#include "tint/tint.h"

// Contains the entry-points into dawn_native

namespace dawn::native {

const char MemoryDump::kNameSize[] =;
const char MemoryDump::kNameObjectCount[] =;
const char MemoryDump::kUnitsBytes[] =;
const char MemoryDump::kUnitsObjects[] =;

const DawnProcTable& GetProcsAutogen();

const DawnProcTable& GetProcs() {}

std::vector<const char*> GetTogglesUsed(WGPUDevice device) {}

// Adapter

Adapter::Adapter() = default;

Adapter::Adapter(AdapterBase* impl) :{}

Adapter::~Adapter() {}

Adapter::Adapter(const Adapter& other) :{}

Adapter& Adapter::operator=(const Adapter& other) {}

wgpu::Status Adapter::GetInfo(wgpu::AdapterInfo* info) const {}

wgpu::Status Adapter::GetInfo(WGPUAdapterInfo* info) const {}

wgpu::Status Adapter::GetProperties(wgpu::AdapterProperties* properties) const {}

wgpu::Status Adapter::GetProperties(WGPUAdapterProperties* properties) const {}

WGPUAdapter Adapter::Get() const {}

std::vector<const char*> Adapter::GetSupportedFeatures() const {}

wgpu::ConvertibleStatus Adapter::GetLimits(WGPUSupportedLimits* limits) const {}

void Adapter::SetUseTieredLimits(bool useTieredLimits) {}

bool Adapter::SupportsExternalImages() const {}

operator bool()

WGPUDevice Adapter::CreateDevice(const wgpu::DeviceDescriptor* deviceDescriptor) {}

WGPUDevice Adapter::CreateDevice(const WGPUDeviceDescriptor* deviceDescriptor) {}

void Adapter::RequestDevice(const wgpu::DeviceDescriptor* descriptor,
                            WGPURequestDeviceCallback callback,
                            void* userdata) {}

void Adapter::RequestDevice(const WGPUDeviceDescriptor* descriptor,
                            WGPURequestDeviceCallback callback,
                            void* userdata) {}

void Adapter::ResetInternalDeviceForTesting() {}

// DawnInstanceDescriptor

DawnInstanceDescriptor::DawnInstanceDescriptor() {}

bool DawnInstanceDescriptor::operator==(const DawnInstanceDescriptor& rhs) const {}

// Instance

Instance::Instance(const WGPUInstanceDescriptor* desc)
    :{}

Instance::Instance(InstanceBase* impl) :{}

Instance::~Instance() {}

std::vector<Adapter> Instance::EnumerateAdapters(const WGPURequestAdapterOptions* options) const {}

std::vector<Adapter> Instance::EnumerateAdapters(const wgpu::RequestAdapterOptions* options) const {}

const ToggleInfo* Instance::GetToggleInfo(const char* toggleName) {}

void Instance::SetBackendValidationLevel(BackendValidationLevel level) {}

uint64_t Instance::GetDeviceCountForTesting() const {}

uint64_t Instance::GetDeprecationWarningCountForTesting() const {}

WGPUInstance Instance::Get() const {}

void Instance::DisconnectDawnPlatform() {}

size_t GetLazyClearCountForTesting(WGPUDevice device) {}

bool IsTextureSubresourceInitialized(WGPUTexture texture,
                                     uint32_t baseMipLevel,
                                     uint32_t levelCount,
                                     uint32_t baseArrayLayer,
                                     uint32_t layerCount,
                                     WGPUTextureAspect cAspect) {}

std::vector<std::string_view> GetProcMapNamesForTestingInternal();

std::vector<std::string_view> GetProcMapNamesForTesting() {}

DAWN_NATIVE_EXPORT bool DeviceTick(WGPUDevice device) {}

DAWN_NATIVE_EXPORT bool InstanceProcessEvents(WGPUInstance instance) {}

// ExternalImageDescriptor

ExternalImageDescriptor::ExternalImageDescriptor(ExternalImageType type) :{}

ExternalImageType ExternalImageDescriptor::GetType() const {}

// ExternalImageExportInfo

ExternalImageExportInfo::ExternalImageExportInfo(ExternalImageType type) :{}

ExternalImageType ExternalImageExportInfo::GetType() const {}

bool CheckIsErrorForTesting(void* objectHandle) {}

const char* GetObjectLabelForTesting(void* objectHandle) {}

uint64_t GetAllocatedSizeForTesting(WGPUBuffer buffer) {}

std::vector<const ToggleInfo*> AllToggleInfos() {}

const FeatureInfo* GetFeatureInfo(wgpu::FeatureName feature) {}

void DumpMemoryStatistics(WGPUDevice device, MemoryDump* dump) {}

uint64_t ComputeEstimatedMemoryUsage(WGPUDevice device) {}

void ReduceMemoryUsage(WGPUDevice device) {}

}  // namespace dawn::native