Skip to content

Commit 2c7f9d4

Browse files
committed
Fix merge issues
1 parent 1fa944d commit 2c7f9d4

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

wgpu-hal/src/dx12/adapter.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,13 @@ impl crate::Adapter<super::Api> for super::Adapter {
462462
let mut set_sample_count = |sc: u32, tfc: Tfc| {
463463
ms_levels.SampleCount = sc;
464464

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
470472
&& ms_levels.NumQualityLevels != 0
471473
{
472474
caps.set(tfc, !no_msaa_load && !no_msaa_target);

wgpu-hal/src/gles/adapter.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl super::Adapter {
196196

197197
(vendor, renderer)
198198
};
199-
199+
200200
let version = unsafe { gl.get_parameter_string(glow::VERSION) };
201201

202202
log::info!("Vendor: {}", vendor);
@@ -666,11 +666,12 @@ impl crate::Adapter<super::Api> for super::Adapter {
666666
use wgt::TextureFormat as Tf;
667667

668668
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+
};
674675
if max_samples >= 8 {
675676
Tfc::MULTISAMPLE_X2 | Tfc::MULTISAMPLE_X4 | Tfc::MULTISAMPLE_X8
676677
} else if max_samples >= 4 {

0 commit comments

Comments
 (0)