-
Notifications
You must be signed in to change notification settings - Fork 32
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: Report other capabilities #200
Conversation
|
a6a632c
to
f4c3bde
Compare
Good suggestion. Did that, which should result in the same.
I couldn't find anything related to d3d12 either, this hints in your direction https://developer.nvidia.com/vulkan-turing though. Returning false seems sensible. |
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.
One warning but it's not necessarily something we need to act on.
src/nvapi_d3d12.cpp
Outdated
@@ -203,6 +207,8 @@ extern "C" { | |||
if (adapter == nullptr || (!adapter->HasNvProprietaryDriver() && !adapter->HasNvkDriver())) | |||
return Ok(str::format(n, " (sm_0)")); | |||
|
|||
pGraphicsCaps->bVariablePixelRateShadingSupported = adapter->IsVariablePixelRateShadingSupported(); |
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.
In the incredibly unlikely scenario that we are running this code alongside some ancient version of vkd3d-proton (or usage of the ext is disabled via VKD3D_DISABLE_EXTENSIONS
), the safer choice would be to check which extensions were actually enabled on the logical device instead. That would look something like
Com<ID3D12DXVKInteropDevice> device;
if (SUCCEEDED(pDevice->QueryInterface(IID_PPV_ARGS(&device)))) {
std::vector<const char*> extensions;
UINT count;
if (SUCCEEDED(device->GetDeviceExtensions(&count, nullptr))) {
extensions.resize(count);
if (SUCCEEDED(device->GetDeviceExtensions(&count, extensions.data())))
pGraphicsCaps->bVariablePixelRateShadingSupported = std::any_of(extensions.begin(), extensions.end(), [](auto ext) { return ext == std::string_view{VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME}; });
}
}
but it's fairly disgusting and probably overcomplicated for such a rare corner-case, so if you are fine with this small risk then let's just leave a comment that would explain potential mismatch and ignore the problem for now.
For Turing+ only.
f4c3bde
to
6b837dc
Compare
For Turing+ only.
I'm tempted to report those two also for Turing+.
Since there are no
NvAPI_D3D12
equivalents toNvAPI_D3D11_RSSetExclusiveScissorRects
orNvAPI_D3D11_RSSetViewportsPixelShadingRates
I guess those capabilities refer to D3D12 core functionalities, but should do some research into it first.Reporting those probably makes no difference in practice.