File tree Expand file tree Collapse file tree 7 files changed +8
-15
lines changed Expand file tree Collapse file tree 7 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -4464,6 +4464,10 @@ impl Device {
4464
4464
{
4465
4465
format_features. flags . set ( tfsc:: FILTERABLE , false ) ;
4466
4466
}
4467
+ format_features. allowed_usages . set (
4468
+ wgt:: TextureUsages :: TRANSIENT ,
4469
+ self . features . contains ( wgt:: Features :: TRANSIENT_ATTACHMENTS ) ,
4470
+ ) ;
4467
4471
format_features
4468
4472
}
4469
4473
Original file line number Diff line number Diff line change @@ -706,7 +706,6 @@ impl Adapter {
706
706
wgt:: TextureUsages :: STORAGE_ATOMIC ,
707
707
caps. contains ( Tfc :: STORAGE_ATOMIC ) ,
708
708
) ;
709
- allowed_usages. set ( wgt:: TextureUsages :: TRANSIENT , caps. contains ( Tfc :: TRANSIENT ) ) ;
710
709
711
710
let mut flags = wgt:: TextureFormatFeatureFlags :: empty ( ) ;
712
711
flags. set (
Original file line number Diff line number Diff line change @@ -1675,9 +1675,6 @@ bitflags!(
1675
1675
const COPY_SRC = 1 << 15 ;
1676
1676
/// Format can be copied to.
1677
1677
const COPY_DST = 1 << 16 ;
1678
-
1679
- /// Format can be created as transient.
1680
- const TRANSIENT = 1 << 17 ;
1681
1678
}
1682
1679
) ;
1683
1680
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ impl crate::Adapter for super::Adapter {
149
149
| msaa_count
150
150
| Tfc :: MULTISAMPLE_RESOLVE ;
151
151
152
- let mut extra = match format {
152
+ let extra = match format {
153
153
Tf :: R8Unorm | Tf :: R16Float | Tf :: Rgba8Unorm | Tf :: Rgba16Float => {
154
154
read_write_tier2_if | all_caps
155
155
}
@@ -352,11 +352,6 @@ impl crate::Adapter for super::Adapter {
352
352
}
353
353
} ;
354
354
355
- extra. set (
356
- Tfc :: TRANSIENT ,
357
- self . shared . private_caps . supports_memoryless_storage ,
358
- ) ;
359
-
360
355
Tfc :: COPY_SRC | Tfc :: COPY_DST | Tfc :: SAMPLED | Tfc :: STORAGE_READ_ONLY | extra
361
356
}
362
357
Original file line number Diff line number Diff line change @@ -452,9 +452,7 @@ impl crate::Device for super::Device {
452
452
}
453
453
} ;
454
454
455
- let mtl_storage_mode = if desc. usage . contains ( wgt:: TextureUses :: TRANSIENT )
456
- && self . features . contains ( wgt:: Features :: TRANSIENT_ATTACHMENTS )
457
- {
455
+ let mtl_storage_mode = if desc. usage . contains ( wgt:: TextureUses :: TRANSIENT ) {
458
456
MTLStorageMode :: Memoryless
459
457
} else {
460
458
MTLStorageMode :: Private
Original file line number Diff line number Diff line change @@ -2446,7 +2446,7 @@ impl crate::Adapter for super::Adapter {
2446
2446
} ;
2447
2447
let features = properties. optimal_tiling_features ;
2448
2448
2449
- let mut flags = Tfc :: TRANSIENT ;
2449
+ let mut flags = Tfc :: empty ( ) ;
2450
2450
flags. set (
2451
2451
Tfc :: SAMPLED ,
2452
2452
features. contains ( vk:: FormatFeatureFlags :: SAMPLED_IMAGE ) ,
Original file line number Diff line number Diff line change @@ -5666,7 +5666,7 @@ bitflags::bitflags! {
5666
5666
/// Flag used by the wgpu-core texture tracker to say that the tracker does not know the state of the sub-resource.
5667
5667
/// This is different from UNINITIALIZED as that says the tracker does know, but the texture has not been initialized.
5668
5668
const UNKNOWN = 1 << 13 ;
5669
- /// Transient image
5669
+ /// Transient image.
5670
5670
const TRANSIENT = 1 << 14 ;
5671
5671
}
5672
5672
}
You can’t perform that action at this time.
0 commit comments