Skip to content

Commit 12095d2

Browse files
authored
Backend: Document missing interface method. (#30250)
1 parent cc81d68 commit 12095d2

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

src/renderers/common/Backend.js

+10
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,16 @@ class Backend {
453453
*/
454454
async waitForGPU() {}
455455

456+
/**
457+
* This method performs a readback operation by moving buffer data from
458+
* a storage buffer attribute from the GPU to the CPU.
459+
*
460+
* @async
461+
* @param {StorageBufferAttribute} attribute - The storage buffer attribute.
462+
* @return {Promise<ArrayBuffer>} A promise that resolves with the buffer data when the data are ready.
463+
*/
464+
async getArrayBufferAsync( /* attribute */ ) {}
465+
456466
/**
457467
* Checks if the given feature is supported by the backend.
458468
*

src/renderers/webgl-fallback/WebGLBackend.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ class WebGLBackend extends Backend {
258258
}
259259

260260
/**
261-
* Transfers buffer data from a storage buffer attribute
262-
* from the GPU to the CPU in context of compute shaders.
261+
* This method performs a readback operation by moving buffer data from
262+
* a storage buffer attribute from the GPU to the CPU.
263263
*
264264
* @async
265265
* @param {StorageBufferAttribute} attribute - The storage buffer attribute.

src/renderers/webgl-fallback/utils/WebGLAttributeUtils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ class WebGLAttributeUtils {
249249
}
250250

251251
/**
252-
* Transfers buffer data from a storage buffer attribute
253-
* from the GPU to the CPU in context of compute shaders.
252+
* This method performs a readback operation by moving buffer data from
253+
* a storage buffer attribute from the GPU to the CPU.
254254
*
255255
* @async
256256
* @param {StorageBufferAttribute} attribute - The storage buffer attribute.

src/renderers/webgpu/WebGPUBackend.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ class WebGPUBackend extends Backend {
253253
}
254254

255255
/**
256-
* Transfers buffer data from a storage buffer attribute
257-
* from the GPU to the CPU in context of compute shaders.
256+
* This method performs a readback operation by moving buffer data from
257+
* a storage buffer attribute from the GPU to the CPU.
258258
*
259259
* @async
260260
* @param {StorageBufferAttribute} attribute - The storage buffer attribute.

src/renderers/webgpu/utils/WebGPUAttributeUtils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ class WebGPUAttributeUtils {
260260
}
261261

262262
/**
263-
* Transfers buffer data from a storage buffer attribute
264-
* from the GPU to the CPU in context of compute shaders.
263+
* This method performs a readback operation by moving buffer data from
264+
* a storage buffer attribute from the GPU to the CPU.
265265
*
266266
* @async
267267
* @param {StorageBufferAttribute} attribute - The storage buffer attribute.

0 commit comments

Comments
 (0)