From 015bde8d5a46f32979c00dbb1feb4b3d80729c44 Mon Sep 17 00:00:00 2001 From: skallweitNV <64953474+skallweitNV@users.noreply.github.com> Date: Fri, 4 Nov 2022 17:34:53 +0100 Subject: Add AdapterLUID to identify GPU adapters (#2492) * Add AdapterLUID to identify GPU adapters * Remove adapter option in render-test --- tools/gfx/d3d12/d3d12-device.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/gfx/d3d12/d3d12-device.cpp') diff --git a/tools/gfx/d3d12/d3d12-device.cpp b/tools/gfx/d3d12/d3d12-device.cpp index c87e6b4ca..ebb416c39 100644 --- a/tools/gfx/d3d12/d3d12-device.cpp +++ b/tools/gfx/d3d12/d3d12-device.cpp @@ -277,7 +277,7 @@ Result DeviceImpl::getNativeDeviceHandles(InteropHandles* outHandles) Result DeviceImpl::_createDevice( DeviceCheckFlags deviceCheckFlags, - const UnownedStringSlice& nameMatch, + const AdapterLUID* adapterLUID, D3D_FEATURE_LEVEL featureLevel, D3D12DeviceInfo& outDeviceInfo) { @@ -293,7 +293,7 @@ Result DeviceImpl::_createDevice( List> dxgiAdapters; SLANG_RETURN_ON_FAIL( - D3DUtil::findAdapters(deviceCheckFlags, nameMatch, dxgiFactory, dxgiAdapters)); + D3DUtil::findAdapters(deviceCheckFlags, adapterLUID, dxgiFactory, dxgiAdapters)); ComPtr device; ComPtr adapter; @@ -471,7 +471,7 @@ Result DeviceImpl::initialize(const Desc& desc) if (SLANG_SUCCEEDED(m_D3D12GetDebugInterface(IID_PPV_ARGS(m_dxDebug.writeRef())))) { # if 0 - // Can enable for extra validation. NOTE! That d3d12 warns if you do.... + // Can enable for extra validation. NOTE! That d3d12 warns if you do.... // D3D12 MESSAGE : Device Debug Layer Startup Options : GPU - Based Validation is enabled(disabled by default). // This results in new validation not possible during API calls on the CPU, by creating patched shaders that have validation // added directly to the shader. However, it can slow things down a lot, especially for applications with numerous @@ -534,7 +534,7 @@ Result DeviceImpl::initialize(const Desc& desc) { if (SLANG_SUCCEEDED(_createDevice( combiner.getCombination(i), - UnownedStringSlice(desc.adapter), + desc.adapterLUID, featureLevel, m_deviceInfo))) { -- cgit v1.2.3