Bug 1932738 - diag(webgpu): clarify meaning of unsupported feature errors r=webgpu-reviewers,teoxoy

Differential Revision: https://phabricator.services.mozilla.com/D229827
This commit is contained in:
Erich Gubler 2024-11-22 14:28:10 +00:00
parent e436184a88
commit 63fa5e7544

View File

@ -347,8 +347,8 @@ already_AddRefed<dom::Promise> 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<dom::Promise> 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;