diff --git a/index.bs b/index.bs index 85588884..93ee11dc 100644 --- a/index.bs +++ b/index.bs @@ -796,11 +796,11 @@ Its default allowlist is 'self'. 1. If |options| is a {{GPUDevice}} object, 1. Set |context|.{{[[contextType]]}} to "[=webgpu-context|webgpu=]". 1. Set |context|.{{[[deviceType]]}} to "[=device-type-gpu|gpu=]". - 1. Set |context|.{{[[powerPreference]]}} to "[=power-preference-default|default=]". + 1. Set |context|.{{[[powerPreference]]}} to {{MLPowerPreference/default}}. 1. Otherwise, 1. Set |context|.{{[[contextType]]}} to "[=default-context|default=]". 1. If |options|["{{deviceType}}"] [=map/exists=], then set |context|.{{[[deviceType]]}} to |options|["{{deviceType}}"]. Otherwise, set |context|.{{[[deviceType]]}} to "[=device-type-cpu|cpu=]". - 1. If |options|["{{powerPreference}}"] [=map/exists=], then set |context|.{{[[powerPreference]]}} to |options|["{{powerPreference}}"]. Otherwise, set |context|.{{[[powerPreference]]}} to "[=power-preference-default|default=]". + 1. If |options|["{{powerPreference}}"] [=map/exists=], then set |context|.{{[[powerPreference]]}} to |options|["{{powerPreference}}"]. Otherwise, set |context|.{{[[powerPreference]]}} to {{MLPowerPreference/default}}. 1. Return |context|. @@ -1065,11 +1065,11 @@ The device type indicates the kind of device used for the context. It The power preference indicates preference as related to power consumption. It is one of the following:
-
"default"
+
"default"
Let the user agent select the most suitable behavior.
-
"high-performance"
+
"high-performance"
Prioritizes execution speed over power consumption.
-
"low-power"
+
"low-power"
Prioritizes power consumption over other considerations such as execution speed.
@@ -1108,7 +1108,7 @@ When the {{[[contextType]]}} is set to [=default-context|default=] with the {{ML
1. If |context|.{{[[contextType]]}} is not "[=webgpu-context|webgpu=]" or "[=default-context|default=]", return false. 1. If |context|.{{[[deviceType]]}} is not "[=device-type-cpu|cpu=]" or "[=device-type-gpu|gpu=]", return false. - 1. If |context|.{{[[powerPreference]]}} is not "[=power-preference-default|default=]" or "[=power-preference-high-performance|high-performance=]" or "[=power-preference-low-power|low-power=]", return false. + 1. If |context|.{{[[powerPreference]]}} is not {{MLPowerPreference/default}} or {{MLPowerPreference/high-performance}} or {{MLPowerPreference/low-power}}, return false. 1. If the user agent cannot support |context|.{{[[contextType]]}}, |context|.{{[[deviceType]]}} and |context|.{{[[powerPreference]]}}, return false. 1. Return true;