Skip to content
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

Maxwell GM107/GM108 support #227

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ The following environment variables tweak DXVK-NVAPI's runtime behavior:
- `DXVK_NVAPI_DISABLE_ENTRYPOINTS`, when set to a comma-separated list of NVAPI entrypoint names, will hide their implementation from the application. For example, `DXVK_NVAPI_DISABLE_ENTRYPOINTS=NvAPI_D3D11_BeginUAVOverlap,NvAPI_D3D11_EndUAVOverlap` will report D3D11 barrier control extensions as not available.
- `DXVK_NVAPI_GPU_ARCH`, when set to one of supported NVIDIA GPU architecture IDs will override reported GPU architecture. Currently supported values are:
- `GK100` (Kepler)
- `GM200` (Maxwell)
- `GM000` (Maxwell Gen1)
- `GM200` (Maxwell Gen2)
- `GP100` (Pascal)
- `GV100` (Volta)
- `TU100` (Turing)
Expand Down
4 changes: 4 additions & 0 deletions src/nvapi/nvapi_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ namespace dxvk {
|| (HasNvkDriver() && IsVkDeviceExtensionSupported(VK_EXT_SHADER_VIEWPORT_INDEX_LAYER_EXTENSION_NAME)))
return NV_GPU_ARCHITECTURE_GM200;

// VK_EXT_shader_image_atomic_int64 is supported on Maxwell 1 (GM10x) and newer
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the soure ;) so no double check.
As double check I filtered all devices by this thing on vulkan.gpuinfo.org with additional finter for NV -- only gen1 maxwells and some weird setups was lowest.

if (IsVkDeviceExtensionSupported(VK_EXT_SHADER_IMAGE_ATOMIC_INT64_EXTENSION_NAME))
return NV_GPU_ARCHITECTURE_GM000;

// Fall back to Kepler
return NV_GPU_ARCHITECTURE_GK100;
}
Expand Down
1 change: 1 addition & 0 deletions src/nvapi_d3d12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ extern "C" {
pGraphicsCaps->minorSMVersion = 0;
break;
case NV_GPU_ARCHITECTURE_GM200:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accoording to https://en.wikipedia.org/wiki/Maxwell_(microarchitecture) we should correct this and report sm52 for Maxwell Gen2 and sm50 for Maxwell Gen2.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See info about Series_* too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case NV_GPU_ARCHITECTURE_GM000:
pGraphicsCaps->majorSMVersion = 5;
pGraphicsCaps->minorSMVersion = 0;
break;
Expand Down
5 changes: 3 additions & 2 deletions src/nvapi_gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ extern "C" {
}
}

if (adapter->GetArchitectureId() >= NV_GPU_ARCHITECTURE_GM200)
if (adapter->GetArchitectureId() >= NV_GPU_ARCHITECTURE_GM000)
*pBusType = NVAPI_GPU_BUS_TYPE_PCI_EXPRESS; // Assume PCIe on Maxwell like generation and newer
else
*pBusType = NVAPI_GPU_BUS_TYPE_UNDEFINED;
Expand Down Expand Up @@ -595,6 +595,7 @@ extern "C" {
implementationId = NV_GPU_ARCH_IMPLEMENTATION_GP102;
break;
case NV_GPU_ARCHITECTURE_GM200:
case NV_GPU_ARCHITECTURE_GM000:
implementationId = NV_GPU_ARCH_IMPLEMENTATION_GM204;
break;
case NV_GPU_ARCHITECTURE_GK100:
Expand Down Expand Up @@ -644,7 +645,7 @@ extern "C" {
auto cudaCapableGpus = std::vector<NvPhysicalGpuHandle>(0);
for (auto i = 0U; i < nvapiAdapterRegistry->GetAdapterCount(); i++) {
auto adapter = nvapiAdapterRegistry->GetAdapter(i);
if (!adapter->HasNvProprietaryDriver() || adapter->GetArchitectureId() < NV_GPU_ARCHITECTURE_GM200) // Maxwell is the oldest generation we can detect
if (!adapter->HasNvProprietaryDriver() || adapter->GetArchitectureId() < NV_GPU_ARCHITECTURE_GM000) // Maxwell is the oldest generation we can detect
continue;

cudaCapableGpus.push_back(reinterpret_cast<NvPhysicalGpuHandle>(adapter));
Expand Down
1 change: 1 addition & 0 deletions src/util/util_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ namespace dxvk::env {
if (overrideStr == #arch) \
override = NV_GPU_ARCHITECTURE_##arch;
CHECK_ARCH(GK100)
CHECK_ARCH(GM000)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHECK_ARCH(GM200)
CHECK_ARCH(GP100)
CHECK_ARCH(GV100)
Expand Down