Skip to content

Commit 0c50419

Browse files
WebGPU: Add deprecation warning to wgpuAdapterGetProperties (emscripten-core#22088)
wgpuAdapterGetProperties() previously didn't work anyway - it just returned zeroes. Use wgpuAdapterGetInfo() instead (once adapter.info is available in browsers), which is fully implemented, and matches the JS API more closely.
1 parent c0aa403 commit 0c50419

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/library_webgpu.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,10 @@ var LibraryWebGPU = {
25872587
{{{ makeSetValue('info', C_STRUCTS.WGPUAdapterInfo.deviceID, '0', 'i32') }}};
25882588
},
25892589

2590+
wgpuAdapterGetProperties__deps: ['$warnOnce'],
25902591
wgpuAdapterGetProperties: (adapterId, properties) => {
2592+
warnOnce('wgpuAdapterGetProperties is deprecated, use wgpuAdapterGetInfo instead');
2593+
25912594
{{{ gpu.makeCheckDescriptor('properties') }}}
25922595
{{{ makeSetValue('properties', C_STRUCTS.WGPUAdapterProperties.vendorID, '0', 'i32') }}};
25932596
{{{ makeSetValue('properties', C_STRUCTS.WGPUAdapterProperties.vendorName, '0', 'i32') }}};

0 commit comments

Comments
 (0)