From 63fa5e75449cda46a4888249bee8cfa28db25310 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 22 Nov 2024 14:28:10 +0000 Subject: [PATCH] Bug 1932738 - diag(webgpu): clarify meaning of unsupported feature errors r=webgpu-reviewers,teoxoy Differential Revision: https://phabricator.services.mozilla.com/D229827 --- dom/webgpu/Adapter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dom/webgpu/Adapter.cpp b/dom/webgpu/Adapter.cpp index 61fa3dcc2955..d3b9ca3df244 100644 --- a/dom/webgpu/Adapter.cpp +++ b/dom/webgpu/Adapter.cpp @@ -347,8 +347,8 @@ already_AddRefed Adapter::RequestDevice( const auto fstr = dom::GetEnumString(requested); const auto astr = this->LabelOrId(); nsPrintfCString msg( - "requestDevice: Feature '%s' requested must be supported by " - "adapter %s", + "`GPUAdapter.requestDevice`: '%s' was requested in " + "`requiredFeatures`, but it is not supported by adapter %s.", fstr.get(), astr.get()); promise->MaybeRejectWithTypeError(msg); return; @@ -359,7 +359,8 @@ already_AddRefed Adapter::RequestDevice( const auto featureStr = dom::GetEnumString(requested); (void)featureStr; nsPrintfCString msg( - "Requested feature bit for '%s' is not implemented.", + "`GPUAdapter.requestDevice`: '%s' was requested in " + "`requiredFeatures`, but it is not supported by Firefox.", featureStr.get()); promise->MaybeRejectWithTypeError(msg); return;