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
When requesting a webGPU device, a device descriptor is passed. The device descriptor may specify certain limits, the device must be capable of supporting ("required limits"). Currently, the limit maxColorAttachmentBytesPerSample is always ignored.
The C function for requesting a webGPU device is wgpuAdapterRequestDevice and its binding is in library_webgpu.js:
The descriptor passed is a C struct, which is used to fill a javascript object requiredLimits. The fields are explicitly copied using setLimitU32IfDefined/setLimitU64IfDefined, but the field maxColorAttachmentBytesPerSample is missing. This means, specifying this limits as part of the required limits for the device won't have any effect and the device will always support the default value for maxColorAttachmentBytesPerSample.
The text was updated successfully, but these errors were encountered:
pkomon-tgm
changed the title
Missing field in requiredLimits for wgpuAdapterRequestDevice
Missing field maxColorAttachmentBytesPerSampl in requiredLimits for wgpuAdapterRequestDevice
Apr 22, 2024
pkomon-tgm
changed the title
Missing field maxColorAttachmentBytesPerSampl in requiredLimits for wgpuAdapterRequestDevice
Missing field maxColorAttachmentBytesPerSample in requiredLimits for wgpuAdapterRequestDevice
Apr 22, 2024
…ied (#21799)
- Implement the wgpuAdapterGetLimits entry point.
- Add a test which verifies that limit requests are correctly passed through to
requestDevice(), by requesting all of the adapter's max limits, then ensuring
that the device has the same limits. This verifies that wgpuAdapterGetLimits
and wgpuDeviceGetLimits work, and that limit requests are applied (though it
can only verify limits for which the current system supports a value better
than the default).
Fixes#21798
When requesting a webGPU device, a device descriptor is passed. The device descriptor may specify certain limits, the device must be capable of supporting ("required limits"). Currently, the limit
maxColorAttachmentBytesPerSample
is always ignored.The C function for requesting a webGPU device is
wgpuAdapterRequestDevice
and its binding is inlibrary_webgpu.js
:emscripten/src/library_webgpu.js
Line 2550 in 11bd2d9
The descriptor passed is a C struct, which is used to fill a javascript object
requiredLimits
. The fields are explicitly copied usingsetLimitU32IfDefined
/setLimitU64IfDefined
, but the fieldmaxColorAttachmentBytesPerSample
is missing. This means, specifying this limits as part of the required limits for the device won't have any effect and the device will always support the default value formaxColorAttachmentBytesPerSample
.emscripten/src/library_webgpu.js
Lines 2562 to 2613 in 11bd2d9
The text was updated successfully, but these errors were encountered: