Skip to content

Commit 85e35c3

Browse files
author
REDMOND\jingf
committed
N/A
1 parent d997ce4 commit 85e35c3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Samples/Tutorial Samples/WinMLPIXSample/WinMLPIXSample/PixRedistMiddleware.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void LoadPIXGpuCapturer()
8383
exit(1);
8484
}
8585
dir += subDirs[0] + L"\\WinPixGpuCapturer.dll";
86-
HMODULE pixGPURuntime = LoadLibrary(dir.c_str());
86+
LoadLibrary(dir.c_str());
8787
}
8888

8989
void PIXBeginEvent(ID3D12CommandQueue* commandQueue, UINT64 color, _In_ PCSTR string)

Samples/Tutorial Samples/WinMLPIXSample/WinMLPIXSample/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ static hstring pixCaptureFilePath = L".\\PIXCapture\\capture.wpix";
1616
ID3D12Device* m_d3d12Device;
1717
ID3D12CommandList* m_commandList;
1818
ID3D12CommandQueue* m_commandQueue;
19-
ID3D12PipelineState* m_pipelineState;
20-
ID3D12Fence* m_fence;
2119

2220
void GetHardwareAdapter(IDXGIFactory4* pFactory, IDXGIAdapter1** ppAdapter)
2321
{
@@ -71,8 +69,7 @@ void GetD3D12CommandAssets()
7169
IID_PPV_ARGS(&commandAllocator)
7270
);
7371
m_d3d12Device->CreateCommandQueue(&queueDesc, IID_PPV_ARGS(&m_commandQueue));
74-
m_d3d12Device->CreateCommandList(0, type, commandAllocator, m_pipelineState, __uuidof(ID3D12CommandList), (void**)&m_commandList);
75-
m_d3d12Device->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&m_fence));
72+
m_d3d12Device->CreateCommandList(0, type, commandAllocator, nullptr, __uuidof(ID3D12CommandList), (void**)&m_commandList);
7673
}
7774

7875
void LoadAndEvaluate(ID3D12CommandQueue* commandQueue)
@@ -123,4 +120,7 @@ int main()
123120
TryEnsurePIXFunctions();
124121
init_apartment();
125122
CaptureWithUserSetMarker();
123+
m_commandList->Release();
124+
m_commandQueue->Release();
125+
m_d3d12Device->Release();
126126
}

0 commit comments

Comments
 (0)