You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: index.bs
+16-34
Original file line number
Diff line number
Diff line change
@@ -252,43 +252,25 @@ In order to <dfn>find supported configuration combination</dfn> for depth sensin
252
252
253
253
1. Let |depthTypePreference| be the value contained by the {{XRDepthStateInit/depthTypePreference}} key in |depthStateInit| if it is set, and an empty sequence otherwise.
254
254
1. Let |selectedType| be <code>null</code>
255
-
1. If the |depthTypePreference| sequence contains a single value, set |selectedType| to that value.
256
-
1. If |selectedType| is not <code>null</code> and not considered a <a lt="support depth sensing type">supported depth sensing type</a> by the [=native depth sensing=] capabilities of the device, return <code>null</code> and abort these steps.
257
255
1. Let |usagePreference| be the value contained by the {{XRDepthStateInit/usagePreference}} key in |depthStateInit|
258
256
1. Let |selectedUsage| be <code>null</code>.
259
-
1. Initialize |selectedUsage| as follows:
260
-
<dl class="switch">
261
-
<dt class="switch">If the |usagePreference| sequence is empty
262
-
<dd> Initialize |selectedUsage| to the device's [=preferred native depth sensing capability=] for |selectedType|.
263
-
<dt> Otherwise
264
-
<dd> For each |usage| in |usagePreference| sequence, perform the following steps:
265
-
1. If |usage| is not considered a <a lt="support depth sensing usage">supported depth sensing usage</a> by the [=native depth sensing=] capabilities of the device, continue to the next entry.
266
-
1. Set |selectedUsage| to |usage| and abort these nested steps.
267
-
</dl>
268
-
1. If |selectedUsage| is <code>null</code>, return <code>null</code> and abort these steps.
269
257
1. Let |dataFormatPreference| be the value contained by the {{XRDepthStateInit/dataFormatPreference}} key in |depthStateInit|
270
258
1. Let |selectedDataFormat| be <code>null</code>.
271
-
1. Initialize |selectedDataFormat| as follows:
272
-
<dl class="switch">
273
-
<dt class="switch">If the |usagePreference| sequence is empty
274
-
<dd> Initialize |selectedDataFormat| to the device's [=preferred native depth sensing format=] for |selectedType| and |selectedUsage|.
275
-
<dt> Otherwise
276
-
<dd> For each |dataFormat| in |dataFormatPreference|, perform the following steps:
277
-
1. If |selectedType|,|selectedUsage|,|dataFormat| is not considered a <a lt="support the depth sensing configuration">supported depth sensing configuration</a> by the [=native depth sensing=] capabilities of the device, continue to the next entry.
278
-
1. Set |selectedDataFormat| to |dataFormat| and abort these nested steps.
279
-
</dl>
280
-
1. If |selectedDataFormat| is <code>null</code>, return <code>null</code> and abort these steps.
281
-
1. If |selectedType| is <code>null</code>, initialize |selectedType| as follows:
282
-
<dl class="switch">
283
-
<dt class="switch">If the |depthTypePreference| sequence is empty
284
-
<dd> Initialize |selectedType| to the device's [=preferred native depth sensing type=] for |selectedUsage| and |selectedDataFormat|.
285
-
<dt> Otherwise
286
-
<dd> For each |type| in the |depthTypePreference| sequence, perform the following steps:
287
-
1. If |type|,|selectedUsage|,|selectedDataFormat| is not considered a <a lt="support the depth sensing configuration">supported depth sensing configuration</a> by the [=native depth sensing=] capabilities of the device, continue to the next entry.
288
-
1. Set |selectedType| to |type| and abort these nested steps.
289
-
</dl>
290
-
1. If |selectedType| is <code>null</code>, return <code>null</code> and abort these steps.
291
-
1. Return the [=depth sensing configuration=] of |selectedType|,|selectedUsage|,|selectedDataFormat|.
259
+
1. Let |processingOrder| be the sequence of (preferences, selection) pairs: [(|depthTypePreference|, |selectedType|), (|usagePreference|,|selectedUsage|),(|dataFormatPreference|,|selectedDataFormat|)]
260
+
1. For each (|preferences|, |selection|) in |processingOrder| perform the following steps
261
+
1. If |preferences| contains only a single value, set |selection| to that value.
262
+
1. For each (|preferences|, |selection|) in |processingOrder| perform the following steps:
263
+
1. If |selection| is not <code>null</code>, continue to the next entry.
264
+
1. If the |preferences| sequence is empty, continue to the next entry.
265
+
1. For each |preference| in |preferences|, preform the following steps:
266
+
1. If |preference| with the other values of |selectedType|,|selectedUsage|,|selectedDataFormat| is not considered a <a lt="support the depth sensing configuration">supported depth sensing configuration</a> by the [=native depth sensing=] capabilities of the device, continue to the next entry.
267
+
1. Set |selection| to |preference| and abort these nested steps.
268
+
1. For each (|preferences|, |selection|) in |processingOrder| perform the following steps:
269
+
1. If |selection| is not <code>null</code>, continue to the next entry.
270
+
1. Set |selection| to the value determined by the [=preferred native depth sensing capability=] with the other values of |selectedType|,|selectedUsage|,|selectedDataFormat|.
271
+
1. If any of |selectedType|,|selectedUsage|,|selectedDataFormat| are <code>null</code>, return <code>null</code> and abort these steps.
272
+
1. If |selectedType|,|selectedUsage|,|selectedDataFormat| is considered a <a lt="support the depth sensing configuration">supported depth sensing configuration</a> by the [=native depth sensing=] capabilities of the device return the [=depth sensing configuration=] of |selectedType|,|selectedUsage|,|selectedDataFormat| and abort these steps.
273
+
1. Return <code>null</code> and abort these steps.
292
274
293
275
</div>
294
276
@@ -695,7 +677,7 @@ The device is said to <dfn>support the depth sensing configuration</dfn> if it <
695
677
696
678
Note: the support of depth sensing API is not limited only to hardware classified as AR-capable, although it is expected that the feature will be more common in such devices. VR devices that contain appropriate sensors and/or use other techniques to provide depth buffer should also be able to provide the data necessary to implement depth sensing API.
697
679
698
-
The device MUST have a <dfn>preferred [=native depth sensing=] type</dfn> that MUST be used if the {{XRDepthStateInit/depthTypePreference}} array is empty, <dfn>preferred [=native depth sensing=] capability</dfn> that MUST be used if the {{XRDepthStateInit/usagePreference}} array is empty, and a <dfn>preferred [=native depth sensing=] format</dfn> that MUST be used if the {{XRDepthStateInit/dataFormatPreference}} array is empty. The capability and format SHOULD reflect the most efficient ones of the device, though they may be dependent upon each other.
680
+
For each of {{XRDepthStateInit/depthTypePreference}}, {{XRDepthStateInit/usagePreference}}, and {{XRDepthStateInit/dataFormatPreference}}, The device MUST have a <dfn>preferred [=native depth sensing=] capability</dfn> that MUST be used if the corresponding array is empty. The type, usage, and format SHOULD reflect the most efficient ones of the device, though they may be dependent upon each other.
0 commit comments