File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,14 @@ Bottom level categories:
40
40
41
41
## Unreleased
42
42
43
+ ## v26.0.4 (2025-08-06)
44
+
45
+ ### Bug Fixes
46
+
47
+ #### Vulkan
48
+
49
+ Fix ` STATUS_HEAP_CORRUPTION ` crash when concurrently calling ` create_sampler ` . By @atlv24 in [ #8043 ] ( https://github.com/gfx-rs/wgpu/pull/8043 ) .
50
+
43
51
## v26.0.3 (2025-07-30)
44
52
45
53
### Bug Fixes
Original file line number Diff line number Diff line change @@ -1404,19 +1404,21 @@ impl crate::Device for super::Device {
1404
1404
create_info = create_info. border_color ( conv:: map_border_color ( color) ) ;
1405
1405
}
1406
1406
1407
- let raw = self
1408
- . shared
1409
- . sampler_cache
1410
- . lock ( )
1411
- . create_sampler ( & self . shared . raw , create_info) ?;
1407
+ let mut sampler_cache_guard = self . shared . sampler_cache . lock ( ) ;
1408
+
1409
+ let raw = sampler_cache_guard. create_sampler ( & self . shared . raw , create_info) ?;
1412
1410
1413
1411
// Note: Cached samplers will just continually overwrite the label
1414
1412
//
1415
1413
// https://github.com/gfx-rs/wgpu/issues/6867
1416
1414
if let Some ( label) = desc. label {
1415
+ // SAFETY: we are holding a lock on the sampler cache,
1416
+ // so we can only be setting the name from one thread.
1417
1417
unsafe { self . shared . set_object_name ( raw, label) } ;
1418
1418
}
1419
1419
1420
+ drop ( sampler_cache_guard) ;
1421
+
1420
1422
self . counters . samplers . add ( 1 ) ;
1421
1423
1422
1424
Ok ( super :: Sampler { raw, create_info } )
You can’t perform that action at this time.
0 commit comments