File tree 2 files changed +14
-11
lines changed
2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -462,11 +462,13 @@ impl crate::Adapter<super::Api> for super::Adapter {
462
462
let mut set_sample_count = |sc : u32 , tfc : Tfc | {
463
463
ms_levels. SampleCount = sc;
464
464
465
- if self . device . CheckFeatureSupport (
466
- d3d12:: D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS ,
467
- <* mut _ >:: cast ( & mut ms_levels) ,
468
- mem:: size_of :: < d3d12:: D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS > ( ) as _ ,
469
- ) == winerror:: S_OK
465
+ if unsafe {
466
+ self . device . CheckFeatureSupport (
467
+ d3d12:: D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS ,
468
+ <* mut _ >:: cast ( & mut ms_levels) ,
469
+ mem:: size_of :: < d3d12:: D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS > ( ) as _ ,
470
+ )
471
+ } == winerror:: S_OK
470
472
&& ms_levels. NumQualityLevels != 0
471
473
{
472
474
caps. set ( tfc, !no_msaa_load && !no_msaa_target) ;
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ impl super::Adapter {
196
196
197
197
( vendor, renderer)
198
198
} ;
199
-
199
+
200
200
let version = unsafe { gl. get_parameter_string ( glow:: VERSION ) } ;
201
201
202
202
log:: info!( "Vendor: {}" , vendor) ;
@@ -666,11 +666,12 @@ impl crate::Adapter<super::Api> for super::Adapter {
666
666
use wgt:: TextureFormat as Tf ;
667
667
668
668
let sample_count = {
669
- let max_samples = self
670
- . shared
671
- . context
672
- . lock ( )
673
- . get_parameter_i32 ( glow:: MAX_SAMPLES ) ;
669
+ let max_samples = unsafe {
670
+ self . shared
671
+ . context
672
+ . lock ( )
673
+ . get_parameter_i32 ( glow:: MAX_SAMPLES )
674
+ } ;
674
675
if max_samples >= 8 {
675
676
Tfc :: MULTISAMPLE_X2 | Tfc :: MULTISAMPLE_X4 | Tfc :: MULTISAMPLE_X8
676
677
} else if max_samples >= 4 {
You can’t perform that action at this time.
0 commit comments