From ea4aa87336542054748392e2a3709364514f53f8 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 9 Aug 2021 03:16:58 +0100 Subject: [PATCH] [d3d9] Add unlikelies to rare vendor hacks --- src/d3d9/d3d9_device.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 16f02cfc8..09c946c0a 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -3666,19 +3666,19 @@ namespace dxvk { constexpr DWORD Fetch4Enabled = MAKEFOURCC('G', 'E', 'T', '4'); constexpr DWORD Fetch4Disabled = MAKEFOURCC('G', 'E', 'T', '1'); - if (Type == D3DSAMP_MIPMAPLODBIAS) { - if (Value == Fetch4Enabled) { + if (unlikely(Type == D3DSAMP_MIPMAPLODBIAS)) { + if (unlikely(Value == Fetch4Enabled)) { m_fetch4Enabled |= 1u << StateSampler; if (state[StateSampler][D3DSAMP_MAGFILTER] == D3DTEXF_POINT) m_fetch4 |= 1u << StateSampler; } - else if (Value == Fetch4Disabled) { + else if (unlikely(Value == Fetch4Disabled)) { m_fetch4Enabled &= ~(1u << StateSampler); m_fetch4 &= ~(1u << StateSampler); } } - if (Type == D3DSAMP_MAGFILTER && m_fetch4Enabled & (1u << StateSampler)) { + if (unlikely(Type == D3DSAMP_MAGFILTER && m_fetch4Enabled & (1u << StateSampler))) { if (Value == D3DTEXF_POINT) m_fetch4 |= 1u << StateSampler; else