Skip to content

Commit 2e48faf

Browse files
authored
Map more limits in WebGPU (gfx-rs#8328)
1 parent d0bb62a commit 2e48faf

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ SamplerDescriptor {
8383
#### General
8484

8585
- Reject fragment shader output `location`s > `max_color_attachments` limit. By @ErichDonGubler in [#8316](https://github.com/gfx-rs/wgpu/pull/8316).
86+
- WebGPU device requests now support the required limits `maxColorAttachments` and `maxColorAttachmentBytesPerSample`. By @evilpie in [#8328](https://github.com/gfx-rs/wgpu/pull/8328)
8687

8788
## v27.0.2 (2025-10-03)
8889

wgpu/src/backend/webgpu.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,13 +858,15 @@ fn map_js_sys_limits(limits: &wgt::Limits) -> js_sys::Object {
858858
}
859859
}
860860

861+
// https://gpuweb.github.io/gpuweb/#gpusupportedlimits
861862
set_properties![
862863
(limits) => (object):
863864
(maxTextureDimension1D, max_texture_dimension_1d),
864865
(maxTextureDimension2D, max_texture_dimension_2d),
865866
(maxTextureDimension3D, max_texture_dimension_3d),
866867
(maxTextureArrayLayers, max_texture_array_layers),
867868
(maxBindGroups, max_bind_groups),
869+
// TODO: (maxBindGroupsPlusVertexBuffers, max_bind_groups_plus_vertex_buffers),
868870
(maxBindingsPerBindGroup, max_bindings_per_bind_group),
869871
(maxDynamicUniformBuffersPerPipelineLayout, max_dynamic_uniform_buffers_per_pipeline_layout),
870872
(maxDynamicStorageBuffersPerPipelineLayout, max_dynamic_storage_buffers_per_pipeline_layout),
@@ -881,6 +883,9 @@ fn map_js_sys_limits(limits: &wgt::Limits) -> js_sys::Object {
881883
(maxBufferSize, max_buffer_size),
882884
(maxVertexAttributes, max_vertex_attributes),
883885
(maxVertexBufferArrayStride, max_vertex_buffer_array_stride),
886+
// TODO: (maxInterStageShaderVariables, max_inter_stage_shader_variables),
887+
(maxColorAttachments, max_color_attachments),
888+
(maxColorAttachmentBytesPerSample, max_color_attachment_bytes_per_sample),
884889
(maxComputeWorkgroupStorageSize, max_compute_workgroup_storage_size),
885890
(maxComputeInvocationsPerWorkgroup, max_compute_invocations_per_workgroup),
886891
(maxComputeWorkgroupSizeX, max_compute_workgroup_size_x),

0 commit comments

Comments
 (0)