mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-23 17:49:57 -04:00
The 0.6 crashes after warps and area changes fixed (no write-back into memory the capture leaves out), invisible objects fixed (occlusion gate), DLSS frame generation flicker fixed, achievements, the renderer built with a play profile, faster translated game code, helper threads judged on settled scenes, memory, shader preparation, audio effects, launcher, controls and Linux fixes.
33 lines
1.5 KiB
C++
33 lines
1.5 KiB
C++
// tests/test_warm_computes.py: gpu/vk/warm_computes.h's rule, no game or GPU
|
|
#include "../gpu/vk/warm_computes.h"
|
|
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
|
|
static int failures = 0;
|
|
static void check(bool ok, const char* what) {
|
|
if (!ok) std::printf("FAIL: %s\n", what), failures++;
|
|
}
|
|
|
|
int main() {
|
|
using namespace warm_computes;
|
|
// (unset: listed on Intel, every one on the others)
|
|
check(listed_only(nullptr, 0x8086), "Intel, unset: listed");
|
|
check(!listed_only(nullptr, 0x10DE), "NVIDIA, unset: all");
|
|
check(!listed_only(nullptr, 0x1002), "AMD, unset: all");
|
|
// (the switch decides on any GPU; anything else is as unset)
|
|
check(listed_only("listed", 0x10DE), "NVIDIA, listed");
|
|
check(listed_only("listed", 0x1002), "AMD, listed");
|
|
check(!listed_only("all", 0x8086), "Intel, all");
|
|
check(listed_only("", 0x8086) && !listed_only("", 0x10DE), "empty: as unset");
|
|
check(listed_only("1", 0x8086) && !listed_only("1", 0x1002), "other text: as unset");
|
|
// (built: without listed_only every one; with it the listed ones, and every one while there is no list)
|
|
check(build(false, false, false) && build(false, true, false) && build(false, false, true), "all: every one");
|
|
check(build(true, true, false), "listed, no list yet: every one");
|
|
check(build(true, false, true), "listed: a listed program");
|
|
check(!build(true, false, false), "listed: a program play has not dispatched is left");
|
|
if (failures) return 1;
|
|
std::printf("warm_computes: all checks passed\n");
|
|
return 0;
|
|
}
|