#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 { … }
}