-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update Multithreading project to include Application Identity #950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,7 @@ | |
| D3D12Multithreading* D3D12Multithreading::s_app = nullptr; | ||
| bool D3D12Multithreading::s_bIsEnhancedBarriersEnabled = false; | ||
|
|
||
| extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = 618; } | ||
| extern "C" { __declspec(dllexport) extern const UINT D3D12SDKVersion = 619; } | ||
| extern "C" { __declspec(dllexport) extern const char* D3D12SDKPath = u8".\\D3D12\\"; } | ||
|
|
||
| D3D12Multithreading::D3D12Multithreading(UINT width, UINT height, std::wstring name) : | ||
|
|
@@ -37,13 +37,41 @@ D3D12Multithreading::D3D12Multithreading(UINT width, UINT height, std::wstring n | |
| m_keyboardInput.animate = true; | ||
|
|
||
| ThrowIfFailed(DXGIDeclareAdapterRemovalSupport()); | ||
|
|
||
| SetApplicationIdentity(); | ||
| } | ||
|
|
||
| D3D12Multithreading::~D3D12Multithreading() | ||
| { | ||
| s_app = nullptr; | ||
| } | ||
|
|
||
| void D3D12Multithreading::SetApplicationIdentity() | ||
| { | ||
| ComPtr<ID3D12ApplicationIdentity> pApplicationIdentity; | ||
| HRESULT hr = D3D12GetInterface(CLSID_D3D12ApplicationIdentity, IID_PPV_ARGS(&pApplicationIdentity)); | ||
| if (E_NOINTERFACE == hr) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| D3D12_APPLICATION_DESC appDesc; | ||
| appDesc.pExeFilename = L"D3D12Multithreading.exe"; | ||
| appDesc.pName = L"D3D12 Multithreading"; | ||
| appDesc.Version.Version = 0x0001000000000000; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not necessarily asking for a change, but we should consider if there's something we should do to make this nicer to read.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, that's the main reason why I was looking for comments/suggestions. appDesc.pEngineName = L"D3D12 Multithreading Engine";
appDesc.EngineVersion.Version = 0x0001000000000000; // 1.0.0.0And name it based on the sample. |
||
| appDesc.pEngineName = nullptr; | ||
| appDesc.EngineVersion.Version = 0x0000000000000000; | ||
|
|
||
| GUID D3D12MultithreadingAppID = { /* 8367fc8a-d739-485a-a473-12dfaa190567 */ | ||
| 0x8367fc8a, | ||
| 0xd739, | ||
| 0x485a, | ||
| { 0xa4, 0x73, 0x12, 0xdf, 0xaa, 0x19, 0x05, 0x67 } | ||
| }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably explain how you came up with this GUID as well, might help developers understand what is within the range of "Yes this is ok" vs "no this ID won't work". |
||
|
|
||
| pApplicationIdentity->SetApplicationIdentity(&appDesc, D3D12MultithreadingAppID); | ||
| } | ||
|
|
||
| void D3D12Multithreading::OnInit() | ||
| { | ||
| LoadPipeline(); | ||
|
|
@@ -1282,3 +1310,4 @@ void D3D12Multithreading::SetCommonPipelineState(ID3D12GraphicsCommandList* pCom | |
| // SRVs are set elsewhere because they change based on the object | ||
| // being drawn. | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <packages> | ||
| <package id="Microsoft.Direct3D.D3D12" version="1.618.3" targetFramework="native" /> | ||
| <package id="Microsoft.Direct3D.D3D12" version="1.619.1" targetFramework="native" /> | ||
| <package id="Microsoft.Direct3D.DXC" version="1.8.2505.32" targetFramework="native" /> | ||
| <package id="WinPixEventRuntime" version="1.0.240308001" targetFramework="native" /> | ||
| </packages> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its not super clear from the PR what Application Identify is, and how would devs would benefit from this. Perhaps here you can add some comments and context for the developers.