Verify NoGraphicsAPI memory and shader toolchain prerequisites

This commit is contained in:
Matthew Stanley
2026-09-06 00:38:13 -07:00
parent b961a565ef
commit ad2c1bf54e
3 changed files with 114 additions and 2 deletions
+54
View File
@@ -44,10 +44,64 @@ correctly reports **skipped**, not a successful device test. A separate direct
Vulkan enumeration confirmed the same matrix. Installing newer headers does
not add missing driver extensions. No system driver was changed.
Follow-up eligibility check: the probe now prints the NVIDIA driver version
directly from Vulkan (`610.74.0.0`) and checks coherent host-visible device-local
memory types. RTX 3080 Ti type 5 exposes a 12,670,992,384-byte device-local heap;
the AMD adapter also exposes qualifying types. This clears the memory-type
existence check, but does not prove allocation budget, format compatibility or
the remaining feature gates that upstream checks after extensions.
The probe also compiles an experimental texture upload/readback round trip for
a future compatible device. That path has **not executed here**. It transports
raw packed bytes; it does not implement PSX texture interpretation or rendering.
### Concrete driver candidate (not installed)
NVIDIA's [616.64 release notes](https://us.download.nvidia.com/Windows/616.64/616.64-win11-win10-release-notes.pdf)
list RTX 3080 Ti support. NoGraphicsAPI reports RTX 30 compatibility with that
release. NVIDIA's separate [Vulkan developer-driver history](https://developer.nvidia.com/vulkan-driver)
also records introduction of device-address commands in beta 595.92. Branch
version numbers alone do not establish extension support on the installed
general-release driver.
The [616.86 hotfix](https://nvidia.custhelp.com/app/answers/detail/a_id/5906), based
on 616.64, fixes virtual-display creation and RDP regressions after 616.56.
This machine has Meta Virtual Monitor, making those fixes relevant. 616.86 is
an optional beta hotfix with abbreviated QA, not a WHQL release. It is a
candidate for testing, not a verified successful NoGraphicsAPI device.
The official installer was downloaded from NVIDIA's linked URL and verified
with Windows Authenticode: **Valid**, signer **NVIDIA Corporation**. It is saved
outside the source checkout at
`F:/Projects/psxrecomp/_probe-nographics/drivers/616.86-desktop-notebook-win10-win11-64bit-international-dch.hf.exe`.
Size: 984,119,224 bytes. Recorded SHA-256:
`e14b1c806bd7d7657c612da6144a3412ed9f055a067548ea05ecd30a7d7ed7e4`.
Installation awaits user approval because replacing the system display driver
can interrupt displays and may require a reboot. The decisive next check is
still the included probe reporting `create_device.error=none`, followed by a
successful resource smoke and actual renderer validation.
### Shader toolchain prepared
The installed SDK's Slang `2026.1-52-gc8ddf20bb` and SPIRV-Tools 2026.1 are
below upstream's example requirements. Separate local tools now provide:
- Slang 2026.14.1, official Windows x64 release archive, SHA-256
`5ed0a59d650a0af0aca45d5db4e083b3d8fb5cea05748747dd95dfbe9c580658`,
verified against the GitHub release asset digest.
- SPIRV-Tools v2026.3, commit `b707790a898e44038547df54580022fc1cf89c3d`,
built locally with SPIRV-Headers `29981f65241605e08b0ede4cfeb999fe3b723c6a`.
The unmodified pinned upstream project builds all three examples (triangle,
cube, deferred renderer), compiling and validating their vertex, fragment,
compute and mesh shaders. CTest: five host-side tests passed, two GPU tests
skipped because device creation is unsupported. Examples have not rendered on
this host. Build location: `F:/Projects/psxrecomp/_build-nographics-examples-vs`.
Commands are in the [probe README](../../tools/nographics_probe/README.md).
These checks prepare the actual NoGraphicsAPI path; they do not validate a PSX
shader port. All backend baselines must be rerun after a driver change to avoid
attributing driver-only performance changes to the new renderer.
## Changes to the existing Vulkan backend
Master's status comment was stale: geometry, textures/CLUT, mask bits, blending,
+34 -2
View File
@@ -48,12 +48,15 @@ Build and run from a native x64 Visual Studio environment:
--test-dir F:\Projects\psxrecomp\_build-nographics-create-device -C Debug --output-on-failure
```
The executable first prints device names, API versions, and the four required
NoGraphicsAPI extension names, then calls the real upstream
The executable first prints device names, API/driver versions, coherent
CPU-visible device-local memory types and the four required NoGraphicsAPI
extension names, then calls the real upstream
`gpu::create_device({})` path. The extension-only check is diagnostic; full
eligibility is the `create_device.error` line. On a compatible device, the
`psx_vram_smoke=` line then reports whether the resource path needed for a
NoGraphicsAPI-backed PSX VRAM texture is viable.
The memory diagnostic reports heap capacity, not available allocation budget
or buffer/image compatibility. It does not replace upstream device creation.
```bat
F:\Projects\psxrecomp\_build-nographics-create-device\Debug\nographics_create_device_probe.exe
@@ -70,3 +73,32 @@ presentation.
is unavailable, the checkout is at another commit, or the checkout is dirty.
Set `-DNOGRAPHICSAPI_EXPECTED_REVISION=` only when intentionally testing another
revision or a local NoGraphicsAPI patch.
## Upstream shader and host-test verification
The installed SDK tools are too old for upstream's examples. The investigation
prepared separate Slang 2026.14.1 and SPIRV-Tools v2026.3 under
`F:/Projects/psxrecomp/_probe-nographics`; pinned revisions and archive digest
are in [the status report](../../docs/internal/nographics-vulkan-status.md).
With those tools present, the following PowerShell commands build the original
upstream examples and validate their SPIR-V without changing runtime toolchains:
```powershell
$taskProbe = 'F:/Projects/psxrecomp/_probe-nographics'
$taskBuild = 'F:/Projects/psxrecomp/_build-nographics-examples-vs'
$taskCmake = "$env:ProgramFiles/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin"
& "$taskCmake/cmake.exe" -S "$taskProbe/NoGraphicsAPI" -B $taskBuild `
-G 'Visual Studio 17 2022' -A x64 `
"-DVulkan_INCLUDE_DIR=$taskProbe/Vulkan-Headers-1.4.357/include" `
'-DVulkan_LIBRARY=C:/VulkanSDK/1.4.341.1/Lib/vulkan-1.lib' `
'-DNOGRAPHICSAPI_BUILD_EXAMPLES=ON' '-DNOGRAPHICSAPI_BUILD_TESTS=ON' `
"-DNOGRAPHICSAPI_SLANGC=$taskProbe/slang-2026.14.1/bin/slangc.exe" `
"-DNOGRAPHICSAPI_SPIRV_VAL=$taskProbe/build-spirv-tools-v2026.3/tools/spirv-val.exe"
& "$taskCmake/cmake.exe" --build $taskBuild --config Debug --parallel 8
$env:VK_LAYER_PATH = 'C:/VulkanSDK/1.4.341.1/Bin'
& "$taskCmake/ctest.exe" --test-dir $taskBuild -C Debug --output-on-failure
```
Observed: all three example binaries built, all generated shaders validated,
five host-side tests passed, and both GPU tests skipped. A skipped GPU test is
not evidence of successful NoGraphicsAPI execution or PSX rendering accuracy.
@@ -95,6 +95,32 @@ static void print_extension_matrix()
VK_VERSION_MAJOR(props.apiVersion),
VK_VERSION_MINOR(props.apiVersion),
VK_VERSION_PATCH(props.apiVersion));
std::printf("device[%u].driver_version_raw=%u\n", device_index, props.driverVersion);
if (props.vendorID == 0x10de)
std::printf("device[%u].nvidia_driver=%u.%u.%u.%u\n", device_index,
props.driverVersion >> 22, (props.driverVersion >> 14) & 0xff,
(props.driverVersion >> 6) & 0xff, props.driverVersion & 0x3f);
/* Detect another prerequisite before proposing a driver change.
* Existence alone does not prove buffer/image memory compatibility;
* upstream create_device remains the authoritative eligibility test. */
VkPhysicalDeviceMemoryProperties memory{};
vkGetPhysicalDeviceMemoryProperties(devices[device_index], &memory);
constexpr VkMemoryPropertyFlags required_memory = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT |
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
bool mapped_device_memory = false;
for (uint32_t type = 0; type < memory.memoryTypeCount; ++type)
{
const uint32_t heap = memory.memoryTypes[type].heapIndex;
if ((memory.memoryTypes[type].propertyFlags & required_memory) == required_memory &&
heap < memory.memoryHeapCount && (memory.memoryHeaps[heap].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT))
{
mapped_device_memory = true;
std::printf("device[%u].coherent_device_local_type[%u].heap_bytes=%llu\n", device_index, type,
static_cast<unsigned long long>(memory.memoryHeaps[heap].size));
}
}
std::printf("device[%u].coherent_device_local_memory=%s\n", device_index, mapped_device_memory ? "yes" : "no");
uint32_t extension_count = 0;
result = vkEnumerateDeviceExtensionProperties(devices[device_index], nullptr, &extension_count, nullptr);