@@ -388,49 +388,50 @@ void adapter_callback(WGPURequestAdapterStatus status, WGPUAdapter adapter, char
388388
389389 // default values via https://gpuweb.github.io/gpuweb/#limits
390390 WGPURequiredLimits required_limits = {
391- .limits = {
392- .maxTextureDimension1D = 8192 ,
393- .maxTextureDimension2D = 8192 ,
394- .maxTextureDimension3D = 2048 ,
395- .maxTextureArrayLayers = 256 ,
396- .maxBindGroups = 4 ,
397- .maxBindGroupsPlusVertexBuffers = 24 ,
398- .maxBindingsPerBindGroup = 1000 ,
399- .maxDynamicUniformBuffersPerPipelineLayout = 8 ,
400- .maxDynamicStorageBuffersPerPipelineLayout = 4 ,
401- .maxSampledTexturesPerShaderStage = 16 ,
402- .maxSamplersPerShaderStage = 16 ,
403- .maxStorageBuffersPerShaderStage = 8 ,
404- .maxStorageTexturesPerShaderStage = 4 ,
405- .maxUniformBuffersPerShaderStage = 12 ,
406- .maxUniformBufferBindingSize = 65536 ,
407- .maxStorageBufferBindingSize = 134217728 ,
408- .minUniformBufferOffsetAlignment = 256 ,
409- .minStorageBufferOffsetAlignment = 256 ,
410- .maxVertexBuffers = 8 ,
411- .maxBufferSize = 268435456 ,
412- .maxVertexAttributes = 16 ,
413- .maxVertexBufferArrayStride = 2048 ,
414- .maxInterStageShaderVariables = 16 ,
415- .maxColorAttachments = 8 ,
416- .maxColorAttachmentBytesPerSample = 32 ,
417- .maxComputeWorkgroupStorageSize = 16384 ,
418- .maxComputeInvocationsPerWorkgroup = 256 ,
419- .maxComputeWorkgroupSizeX = 256 ,
420- .maxComputeWorkgroupSizeY = 256 ,
421- .maxComputeWorkgroupSizeZ = 64 ,
422- .maxComputeWorkgroupsPerDimension = 65535 ,
423-
424- .maxInterStageShaderComponents = WGPU_LIMIT_U32_UNDEFINED , // removed
425- },
391+ .limits =
392+ {
393+ .maxTextureDimension1D = 8192 ,
394+ .maxTextureDimension2D = 8192 ,
395+ .maxTextureDimension3D = 2048 ,
396+ .maxTextureArrayLayers = 256 ,
397+ .maxBindGroups = 4 ,
398+ .maxBindGroupsPlusVertexBuffers = 24 ,
399+ .maxBindingsPerBindGroup = 1000 ,
400+ .maxDynamicUniformBuffersPerPipelineLayout = 8 ,
401+ .maxDynamicStorageBuffersPerPipelineLayout = 4 ,
402+ .maxSampledTexturesPerShaderStage = 16 ,
403+ .maxSamplersPerShaderStage = 16 ,
404+ .maxStorageBuffersPerShaderStage = 8 ,
405+ .maxStorageTexturesPerShaderStage = 4 ,
406+ .maxUniformBuffersPerShaderStage = 12 ,
407+ .maxUniformBufferBindingSize = 65536 ,
408+ .maxStorageBufferBindingSize = 134217728 ,
409+ .minUniformBufferOffsetAlignment = 256 ,
410+ .minStorageBufferOffsetAlignment = 256 ,
411+ .maxVertexBuffers = 8 ,
412+ .maxBufferSize = 268435456 ,
413+ .maxVertexAttributes = 16 ,
414+ .maxVertexBufferArrayStride = 2048 ,
415+ .maxInterStageShaderVariables = 16 ,
416+ .maxColorAttachments = 8 ,
417+ .maxColorAttachmentBytesPerSample = 32 ,
418+ .maxComputeWorkgroupStorageSize = 16384 ,
419+ .maxComputeInvocationsPerWorkgroup = 256 ,
420+ .maxComputeWorkgroupSizeX = 256 ,
421+ .maxComputeWorkgroupSizeY = 256 ,
422+ .maxComputeWorkgroupSizeZ = 64 ,
423+ .maxComputeWorkgroupsPerDimension = 65535 ,
424+
425+ .maxInterStageShaderComponents = WGPU_LIMIT_U32_UNDEFINED , // removed
426+ },
426427 };
427428
428429 required_limits .limits .maxColorAttachmentBytesPerSample = 48 ; // enough to write to a cube map
429430
430431 WGPUDeviceDescriptor device_descriptor = {
431432 .requiredFeatures = required_features ,
432433 .requiredFeatureCount = sizeof (required_features ) / sizeof (required_features [0 ]),
433- .requiredLimits = & required_limits ,
434+ .requiredLimits = & required_limits ,
434435 };
435436
436437 wgpuAdapterRequestDevice (wgpu_adapter , & device_descriptor , device_callback , NULL );
0 commit comments