summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-10-29 13:03:14 -0700
committerGitHub <noreply@github.com>2021-10-29 13:03:14 -0700
commit22e7f3fa1bb3a77de72991af0c78861f428b8ea8 (patch)
tree150fc0be59cb45871af223aa43d0a90b10eeb1c0 /tools
parent4ebbf357e18de77af4fff8a112e8a25b06e3e940 (diff)
[gfx/d3d12] Add a constant for microsoft vendor ID. (#1998)
Diffstat (limited to 'tools')
-rw-r--r--tools/gfx/d3d12/render-d3d12.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gfx/d3d12/render-d3d12.cpp b/tools/gfx/d3d12/render-d3d12.cpp
index d296e1edb..cc8086080 100644
--- a/tools/gfx/d3d12/render-d3d12.cpp
+++ b/tools/gfx/d3d12/render-d3d12.cpp
@@ -4234,8 +4234,9 @@ Result D3D12Device::_createDevice(DeviceCheckFlags deviceCheckFlags, const Unown
outDeviceInfo.m_dxgiFactory = dxgiFactory;
outDeviceInfo.m_adapter = adapter;
outDeviceInfo.m_isWarp = D3DUtil::isWarp(dxgiFactory, adapter);
+ const UINT kMicrosoftVendorId = 5140;
outDeviceInfo.m_isSoftware = outDeviceInfo.m_isWarp || ((outDeviceInfo.m_desc1.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) != 0)
- || outDeviceInfo.m_desc.VendorId == 5140;
+ || outDeviceInfo.m_desc.VendorId == kMicrosoftVendorId;
return SLANG_OK;
}