Add C overload for dawn_native::Adapter::GetProperties
This helps Chromium move to using this method and stop using dawn_native::AdapterType/BackendType. Bug: dawn:824 Change-Id: I9e16edd271d3406bc45e3b9fd472bd94bbf53b30 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75583 Auto-Submit: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
parent
4d21968257
commit
03b3594f79
|
@ -94,6 +94,10 @@ namespace dawn_native {
|
||||||
properties->name = mImpl->GetPCIInfo().name.c_str();
|
properties->name = mImpl->GetPCIInfo().name.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Adapter::GetProperties(WGPUAdapterProperties* properties) const {
|
||||||
|
GetProperties(reinterpret_cast<wgpu::AdapterProperties*>(properties));
|
||||||
|
}
|
||||||
|
|
||||||
BackendType Adapter::GetBackendType() const {
|
BackendType Adapter::GetBackendType() const {
|
||||||
switch (mImpl->GetBackendType()) {
|
switch (mImpl->GetBackendType()) {
|
||||||
case wgpu::BackendType::D3D12:
|
case wgpu::BackendType::D3D12:
|
||||||
|
|
|
@ -108,6 +108,7 @@ namespace dawn_native {
|
||||||
// Essentially webgpu.h's wgpuAdapterGetProperties while we don't have WGPUAdapter in
|
// Essentially webgpu.h's wgpuAdapterGetProperties while we don't have WGPUAdapter in
|
||||||
// dawn.json
|
// dawn.json
|
||||||
void GetProperties(wgpu::AdapterProperties* properties) const;
|
void GetProperties(wgpu::AdapterProperties* properties) const;
|
||||||
|
void GetProperties(WGPUAdapterProperties* properties) const;
|
||||||
|
|
||||||
std::vector<const char*> GetSupportedExtensions() const;
|
std::vector<const char*> GetSupportedExtensions() const;
|
||||||
std::vector<const char*> GetSupportedFeatures() const;
|
std::vector<const char*> GetSupportedFeatures() const;
|
||||||
|
|
Loading…
Reference in New Issue