dawn/node: Updates for latest IDL

Change-Id: I5028187160fabe8217a39ffc0d20a6fbb59d3cc8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2023-04-25 14:45:38 +00:00 committed by Dawn LUCI CQ
parent f7d9116998
commit 41428ad681
2 changed files with 16 additions and 2 deletions

View File

@ -1702,6 +1702,7 @@ bool Converter::Convert(interop::GPUFeatureName& out, wgpu::FeatureName in) {
case wgpu::FeatureName::ChromiumExperimentalDp4a: case wgpu::FeatureName::ChromiumExperimentalDp4a:
case wgpu::FeatureName::TimestampQueryInsidePasses: case wgpu::FeatureName::TimestampQueryInsidePasses:
case wgpu::FeatureName::ImplicitDeviceSynchronization: case wgpu::FeatureName::ImplicitDeviceSynchronization:
case wgpu::FeatureName::SurfaceCapabilities:
case wgpu::FeatureName::Undefined: case wgpu::FeatureName::Undefined:
return false; return false;
} }

View File

@ -18,6 +18,7 @@
#include <cstdlib> #include <cstdlib>
#include <string> #include <string>
#include <utility> #include <utility>
#include <vector>
#include "src/dawn/node/binding/GPUAdapter.h" #include "src/dawn/node/binding/GPUAdapter.h"
@ -229,8 +230,20 @@ interop::GPUTextureFormat GPU::getPreferredCanvasFormat(Napi::Env) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
interop::Interface<interop::WGSLLanguageFeatures> GPU::getWgslLanguageFeatures(Napi::Env) { interop::Interface<interop::WGSLLanguageFeatures> GPU::getWgslLanguageFeatures(Napi::Env env) {
UNIMPLEMENTED(); // TODO(crbug.com/dawn/1777)
struct Features : public interop::WGSLLanguageFeatures {
~Features() = default;
bool has(Napi::Env, std::string) {
UNIMPLEMENTED();
return false;
}
std::vector<std::string> keys(Napi::Env) {
UNIMPLEMENTED();
return {};
}
};
return interop::WGSLLanguageFeatures::Create<Features>(env);
} }
} // namespace wgpu::binding } // namespace wgpu::binding