Skip to content

Commit

Permalink
Fix MSVC warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
HansKristian-Work committed Apr 22, 2021
1 parent f6017b0 commit 1d479c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dxil_converter.cpp
Expand Up @@ -541,7 +541,7 @@ bool Converter::Impl::emit_srvs(const llvm::MDNode *srvs)
stride = get_constant_metadata(tags, 1);
}

unsigned alignment = resource_kind == DXIL::ResourceKind::RawBuffer ? 16 : (stride & -stride);
unsigned alignment = resource_kind == DXIL::ResourceKind::RawBuffer ? 16 : (stride & -int(stride));

DescriptorTableEntry local_table_entry = {};
int local_root_signature_entry = get_local_root_signature_entry(
Expand Down Expand Up @@ -908,7 +908,7 @@ bool Converter::Impl::emit_uavs(const llvm::MDNode *uavs)
stride = get_constant_metadata(tags, 1);
}

unsigned alignment = resource_kind == DXIL::ResourceKind::RawBuffer ? 16 : (stride & -stride);
unsigned alignment = resource_kind == DXIL::ResourceKind::RawBuffer ? 16 : (stride & -int(stride));

auto &access_meta = uav_access_tracking[index];
if (resource_kind != DXIL::ResourceKind::RawBuffer && resource_kind != DXIL::ResourceKind::StructuredBuffer)
Expand Down

0 comments on commit 1d479c4

Please sign in to comment.