chromium/third_party/dawn/src/dawn/native/PhysicalDevice.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/PhysicalDevice.h"

#include <algorithm>
#include <memory>
#include <utility>

#include "dawn/common/Constants.h"
#include "dawn/common/GPUInfo.h"
#include "dawn/common/Log.h"
#include "dawn/native/ChainUtils.h"
#include "dawn/native/Instance.h"
#include "dawn/native/ValidationUtils_autogen.h"

namespace dawn::native {

FeatureValidationResult::FeatureValidationResult() :{}
FeatureValidationResult::FeatureValidationResult(std::string errorMsg)
    :{}

PhysicalDeviceBase::PhysicalDeviceBase(wgpu::BackendType backend) :{}

PhysicalDeviceBase::~PhysicalDeviceBase() = default;

MaybeError PhysicalDeviceBase::Initialize() {}

ResultOrError<Ref<DeviceBase>> PhysicalDeviceBase::CreateDevice(
    AdapterBase* adapter,
    const UnpackedPtr<DeviceDescriptor>& descriptor,
    const TogglesState& deviceToggles,
    Ref<DeviceBase::DeviceLostEvent>&& lostEvent) {}

void PhysicalDeviceBase::InitializeVendorArchitectureImpl() {}

uint32_t PhysicalDeviceBase::GetVendorId() const {}

uint32_t PhysicalDeviceBase::GetDeviceId() const {}

const std::string& PhysicalDeviceBase::GetVendorName() const {}

const std::string& PhysicalDeviceBase::GetArchitectureName() const {}

const std::string& PhysicalDeviceBase::GetName() const {}

const gpu_info::DriverVersion& PhysicalDeviceBase::GetDriverVersion() const {}

const std::string& PhysicalDeviceBase::GetDriverDescription() const {}

wgpu::AdapterType PhysicalDeviceBase::GetAdapterType() const {}

wgpu::BackendType PhysicalDeviceBase::GetBackendType() const {}

bool PhysicalDeviceBase::IsFeatureSupportedWithToggles(wgpu::FeatureName feature,
                                                       const TogglesState& toggles) const {}

void PhysicalDeviceBase::GetDefaultLimitsForSupportedFeatureLevel(Limits* limits) const {}

FeaturesSet PhysicalDeviceBase::GetSupportedFeatures(const TogglesState& toggles) const {}

bool PhysicalDeviceBase::SupportsAllRequiredFeatures(
    const ityp::span<size_t, const wgpu::FeatureName>& features,
    const TogglesState& toggles) const {}

const CombinedLimits& PhysicalDeviceBase::GetLimits() const {}

void PhysicalDeviceBase::EnableFeature(Feature feature) {}

FeatureValidationResult PhysicalDeviceBase::ValidateFeatureSupportedWithToggles(
    wgpu::FeatureName feature,
    const TogglesState& toggles) const {}

void PhysicalDeviceBase::SetSupportedFeaturesForTesting(
    const std::vector<wgpu::FeatureName>& requiredFeatures) {}

MaybeError PhysicalDeviceBase::ResetInternalDeviceForTesting() {}

MaybeError PhysicalDeviceBase::ResetInternalDeviceForTestingImpl() {}

void PhysicalDeviceBase::PopulateBackendFormatCapabilities(
    wgpu::TextureFormat format,
    UnpackedPtr<FormatCapabilities>& capabilities) const {}

}  // namespace dawn::native