File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -397,6 +397,10 @@ pub enum StageError {
397397 InvalidWorkgroupSize ( #[ from] InvalidWorkgroupSizeError ) ,
398398 #[ error( "Unable to find entry point '{0}'" ) ]
399399 MissingEntryPoint ( String ) ,
400+ #[ error(
401+ "Workgroup storage size limit exceeded: attempted to use {used} bytes, limit is {limit}"
402+ ) ]
403+ WorkgroupStorageSizeLimitExceeded { used : u32 , limit : u32 } ,
400404 #[ error( "Shader global {0:?} is not available in the pipeline layout" ) ]
401405 Binding ( naga:: ResourceBinding , #[ source] BindingError ) ,
402406 #[ error( "Unable to filter the texture ({texture:?}) by the sampler ({sampler:?})" ) ]
@@ -1344,6 +1348,15 @@ impl Interface {
13441348 } ;
13451349 let ( _, entry_point_name) = pair;
13461350
1351+ let workgroup_storage_used: u32 = todo ! ( ) ;
1352+
1353+ if workgroup_storage_used > self . limits . max_compute_workgroup_storage_size {
1354+ return Err ( StageError :: WorkgroupStorageSizeLimitExceeded {
1355+ used : workgroup_storage_used,
1356+ limit : self . limits . max_compute_workgroup_storage_size ,
1357+ } ) ;
1358+ }
1359+
13471360 let stage_bit = shader_stage. to_wgt_bit ( ) ;
13481361
13491362 // check resources visibility
You can’t perform that action at this time.
0 commit comments