-
Notifications
You must be signed in to change notification settings - Fork 203
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
d3d12: Add D3D12PIXEventsReplaceBlock and D3D12PIXGetThreadInfo stub … #1582
base: master
Are you sure you want to change the base?
Conversation
This is very questionable. Does the native d3d12.dll runtime export these symbols? |
Yeah. It should be. You can try to use GetProcAddress to get that symbol from the system d3d12.dll. And I found the MinGW runtime also exports the symbols. This link d3d12.def should be helpful. |
libs/d3d12/main.c
Outdated
@@ -206,3 +206,13 @@ HRESULT WINAPI DLLEXPORT D3D12GetInterface(REFCLSID rcslid, REFIID iid, void **d | |||
return E_NOINTERFACE; | |||
return IVKD3DCoreInterface_GetInterface(core, rcslid, iid, debug); | |||
} | |||
|
|||
void WINAPI DLLEXPORT D3D12PIXEventsReplaceBlock() |
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.
At least the return types should be correct here and return E_NOTIMPL. I doubt these functions return void.
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.
Similarly, printing a FIXME probably screws with some registers so all these should probably do is return.... something.
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.
Yes. I approve. I've updated the codes to return the E_NOTIMPL. Could you help review them?
…to fix failing to load DirectML.dll If we use vkd3d-proton in an application with DirectML enabled. The program will error out Entry Point Not Found. The procedure entry point D3D12PIXEventsReplaceBlock/D3D12PIXGetThreadInfo could not be located in the dynamic link library C:\Windows\SYSTEM32\DirectML.dll And the DirectML.dll will be unloaded. Signed-off-by: Jianhua Wu <[email protected]>
@@ -206,3 +206,15 @@ HRESULT WINAPI DLLEXPORT D3D12GetInterface(REFCLSID rcslid, REFIID iid, void **d | |||
return E_NOINTERFACE; | |||
return IVKD3DCoreInterface_GetInterface(core, rcslid, iid, debug); | |||
} | |||
|
|||
HRESULT WINAPI DLLEXPORT D3D12PIXEventsReplaceBlock() |
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.
Does it really take no arguments? () != (void) in C fwiw. Proper argument types is important for WINAPI calling convention at least on 32-bit.
…to fix failing to load DirectML.dll
If we use vkd3d-proton in an application with DirectML enabled. The program will error out Entry Point Not Found.
The procedure entry point D3D12PIXEventsReplaceBlock/D3D12PIXGetThreadInfo could not be located in the dynamic link library C:\Windows\SYSTEM32\DirectML.dll
And the DirectML.dll will be unloaded.