Skip to content

Commit

Permalink
Fix merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Nov 9, 2022
1 parent 1fa944d commit 2c7f9d4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 7 additions & 5 deletions wgpu-hal/src/dx12/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,13 @@ impl crate::Adapter<super::Api> for super::Adapter {
let mut set_sample_count = |sc: u32, tfc: Tfc| {
ms_levels.SampleCount = sc;

if self.device.CheckFeatureSupport(
d3d12::D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS,
<*mut _>::cast(&mut ms_levels),
mem::size_of::<d3d12::D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS>() as _,
) == winerror::S_OK
if unsafe {
self.device.CheckFeatureSupport(
d3d12::D3D12_FEATURE_MULTISAMPLE_QUALITY_LEVELS,
<*mut _>::cast(&mut ms_levels),
mem::size_of::<d3d12::D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS>() as _,
)
} == winerror::S_OK
&& ms_levels.NumQualityLevels != 0
{
caps.set(tfc, !no_msaa_load && !no_msaa_target);
Expand Down
13 changes: 7 additions & 6 deletions wgpu-hal/src/gles/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl super::Adapter {

(vendor, renderer)
};

let version = unsafe { gl.get_parameter_string(glow::VERSION) };

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

let sample_count = {
let max_samples = self
.shared
.context
.lock()
.get_parameter_i32(glow::MAX_SAMPLES);
let max_samples = unsafe {
self.shared
.context
.lock()
.get_parameter_i32(glow::MAX_SAMPLES)
};
if max_samples >= 8 {
Tfc::MULTISAMPLE_X2 | Tfc::MULTISAMPLE_X4 | Tfc::MULTISAMPLE_X8
} else if max_samples >= 4 {
Expand Down

0 comments on commit 2c7f9d4

Please sign in to comment.