mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
On an RTX 4060 (Ada, driver 617.42) the optimized link of a pipeline built from libraries loses the device (VK_ERROR_DEVICE_LOST) as soon as it is bound, which fails agc_driver_pixel_valid_mask in 16 of 20 runs. With APS5_NO_PIPELINE_LTO=1 it passes 20 of 20. Reporters see the same loss on an Ampere card with a depth attachment; two Blackwell cards do not lose it. A device whose driver is VK_DRIVER_ID_NVIDIA_PROPRIETARY keeps the fast-linked pipeline and no longer queues the link-time-optimized relink. Other drivers are unchanged. Refs #2866 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
33 lines
893 B
C++
33 lines
893 B
C++
#include "prx/libSceAgcDriver/Execution/include/PipelineLinkOptimization.hpp"
|
|
#include <cstdio>
|
|
|
|
namespace {
|
|
|
|
struct Case {
|
|
VkDriverId driver;
|
|
bool usable;
|
|
};
|
|
|
|
constexpr Case Cases[]{
|
|
{VK_DRIVER_ID_NVIDIA_PROPRIETARY, false},
|
|
{VK_DRIVER_ID_MESA_RADV, true},
|
|
{VK_DRIVER_ID_AMD_PROPRIETARY, true},
|
|
{VK_DRIVER_ID_AMD_OPEN_SOURCE, true},
|
|
{VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS, true},
|
|
{VK_DRIVER_ID_MESA_LLVMPIPE, true},
|
|
{VK_DRIVER_ID_MOLTENVK, true},
|
|
};
|
|
|
|
}
|
|
|
|
int main() {
|
|
int failures = 0;
|
|
for (const auto& item : Cases) {
|
|
if (AgcDriver::PipelineLinkTimeOptimizationUsable(item.driver) != item.usable) {
|
|
std::fprintf(stderr, "driver %d: expected %s background link-time optimization\n", static_cast<int>(item.driver), item.usable ? "usable" : "unusable");
|
|
++failures;
|
|
}
|
|
}
|
|
return failures == 0 ? 0 : 1;
|
|
}
|