mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Merge pull request #3760 from lioncash/vs
pch: Update Visual Studio version check
This commit is contained in:
commit
c63ef18fcc
5 changed files with 33 additions and 7 deletions
|
@ -12,6 +12,32 @@
|
|||
|
||||
namespace MathUtil
|
||||
{
|
||||
|
||||
template <typename T>
|
||||
constexpr T SNANConstant()
|
||||
{
|
||||
return std::numeric_limits<T>::signaling_NaN();
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
// MSVC needs a workaround, because its std::numeric_limits<double>::signaling_NaN()
|
||||
// will use __builtin_nans, which is improperly handled by the compiler and generates
|
||||
// a bad constant. Here we go back to the version MSVC used before the builtin.
|
||||
// TODO: Remove this and use numeric_limits directly whenever this bug is fixed.
|
||||
template <>
|
||||
constexpr double SNANConstant()
|
||||
{
|
||||
return (_CSTD _Snan._Double);
|
||||
}
|
||||
template <>
|
||||
constexpr float SNANConstant()
|
||||
{
|
||||
return (_CSTD _Snan._Float);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
constexpr T Clamp(const T val, const T& min, const T& max)
|
||||
{
|
||||
|
|
|
@ -1030,7 +1030,7 @@ void Renderer::ApplyState(bool bUseDstAlpha)
|
|||
for (unsigned int stage = 0; stage < 8; stage++)
|
||||
{
|
||||
// TODO: cache SamplerState directly, not d3d object
|
||||
gx_state.sampler[stage].max_anisotropy = 1 << g_ActiveConfig.iMaxAnisotropy;
|
||||
gx_state.sampler[stage].max_anisotropy = UINT64_C(1) << g_ActiveConfig.iMaxAnisotropy;
|
||||
D3D::stateman->SetSampler(stage, gx_state_cache.Get(gx_state.sampler[stage]));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue