gpu: update to latest Dawn version

See https://github.com/hexops/dawn/pull/1

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-11-30 23:57:24 -07:00 committed by Stephen Gutekanst
parent 0fc2876e41
commit 91728ebde9
4 changed files with 41 additions and 33 deletions

View file

@ -76,8 +76,8 @@ MACH_EXPORT WGPUDevice machDawnNativeAdapter_createDevice(MachDawnNativeAdapter
}
std::vector<const char*> cppRequiredExtensions;
for (int i = 0; i < deviceDescriptor->requiredExtensionsLength; i++)
cppRequiredExtensions.push_back(deviceDescriptor->requiredExtensions[i]);
for (int i = 0; i < deviceDescriptor->requiredFeaturesLength; i++)
cppRequiredExtensions.push_back(deviceDescriptor->requiredFeatures[i]);
std::vector<const char*> cppForceEnabledToggles;
for (int i = 0; i < deviceDescriptor->forceEnabledTogglesLength; i++)
@ -88,7 +88,7 @@ MACH_EXPORT WGPUDevice machDawnNativeAdapter_createDevice(MachDawnNativeAdapter
cppForceDisabledToggles.push_back(deviceDescriptor->forceDisabledToggles[i]);
auto cppDeviceDescriptor = dawn_native::DeviceDescriptor{
.requiredExtensions = cppRequiredExtensions,
.requiredFeatures = cppRequiredExtensions,
.forceEnabledToggles = cppForceEnabledToggles,
.forceDisabledToggles = cppForceDisabledToggles,
.requiredLimits = deviceDescriptor->requiredLimits,
@ -96,18 +96,6 @@ MACH_EXPORT WGPUDevice machDawnNativeAdapter_createDevice(MachDawnNativeAdapter
return self->CreateDevice(&cppDeviceDescriptor);
}
// TODO(dawn-native-mach):
// // An optional parameter of Adapter::CreateDevice() to send additional information when creating
// // a Device. For example, we can use it to enable a workaround, optimization or feature.
// struct DAWN_NATIVE_EXPORT DeviceDescriptor {
// std::vector<const char*> requiredExtensions;
// std::vector<const char*> forceEnabledToggles;
// std::vector<const char*> forceDisabledToggles;
// const WGPURequiredLimits* requiredLimits = nullptr;
// };
// TODO(dawn-native-mach):
// // Create a device on this adapter, note that the interface will change to include at least
// // a device descriptor and a pointer to backend specific options.