upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/device_proxy_test.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 19:55:23 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 19:55:23 -0500
commit1d28e6e361c5c7e66ad6ea5ff59df483ff9d5c94 (patch)
tree417e90220293a94fc51296f4c285b6ceb49baeea /runtime/test/device_proxy_test.cpp
parent595a147cf3d034497414de9505ce210194cba3a4 (diff)
device_proxy_test: made-up digests in the synthetic shader library case
The case that loads fspx/, fspx_gfx/ and bvh/ indexes calls itself synthetic and runs against index files it writes itself, but two of its keys were the SHA-256 digests of two programs of the game's pipeline library (the ones docs/fspx.md cites as programs 842 and 843), with those numbers in the file names. A hash is not content, but a synthetic test has no reason to carry real ones, and nothing in the case depends on the values. They are 3333... and 4444... now, next to the 1111... and 2222... the case already used, with file names _00001 and _00002. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/device_proxy_test.cpp')
-rw-r--r--runtime/test/device_proxy_test.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/runtime/test/device_proxy_test.cpp b/runtime/test/device_proxy_test.cpp
index b80fb2c2e..0d1d09973 100644
--- a/runtime/test/device_proxy_test.cpp
+++ b/runtime/test/device_proxy_test.cpp
@@ -1298,15 +1298,15 @@ int main(int argc, char** argv) {
1298 << "}\n"; 1298 << "}\n";
1299 std::ofstream(tmp_dir / "fspx_gfx" / "index.json") 1299 std::ofstream(tmp_dir / "fspx_gfx" / "index.json")
1300 << "{\n" 1300 << "{\n"
1301 << " \"9e5ffd2c6c521c037cf57582a23f8ff7ba494a71ca63bb899357caee8baab850\": {\n" 1301 << " \"3333333333333333333333333333333333333333333333333333333333333333\": {\n"
1302 << " \"stage\": \"ps\",\n" 1302 << " \"stage\": \"ps\",\n"
1303 << " \"spv\": \"9e5ffd2c6c521c03_libps_00842.spv\",\n" 1303 << " \"spv\": \"3333333333333333_libps_00001.spv\",\n"
1304 << " \"fspx_code_sha256\": \"9e5ffd2c6c521c037cf57582a23f8ff7ba494a71ca63bb899357caee8baab850\"\n" 1304 << " \"fspx_code_sha256\": \"3333333333333333333333333333333333333333333333333333333333333333\"\n"
1305 << " },\n" 1305 << " },\n"
1306 << " \"160fbe4368fb1a6349a2683bf72817f183d780c42a35cf25c86560917228061a\": {\n" 1306 << " \"4444444444444444444444444444444444444444444444444444444444444444\": {\n"
1307 << " \"stage\": \"vs\",\n" 1307 << " \"stage\": \"vs\",\n"
1308 << " \"spv\": \"160fbe4368fb1a63_libvs_00843.spv\",\n" 1308 << " \"spv\": \"4444444444444444_libvs_00002.spv\",\n"
1309 << " \"fspx_code_sha256\": \"160fbe4368fb1a6349a2683bf72817f183d780c42a35cf25c86560917228061a\"\n" 1309 << " \"fspx_code_sha256\": \"4444444444444444444444444444444444444444444444444444444444444444\"\n"
1310 << " }\n" 1310 << " }\n"
1311 << "}\n"; 1311 << "}\n";
1312 std::ofstream(tmp_dir / "bvh" / "index.json") 1312 std::ofstream(tmp_dir / "bvh" / "index.json")
@@ -1325,12 +1325,12 @@ int main(int argc, char** argv) {
1325 check(lib.fspx_gfx_size() == 2, "ShaderLibrary::fspx_gfx_size() counts only fspx_gfx/ entries"); 1325 check(lib.fspx_gfx_size() == 2, "ShaderLibrary::fspx_gfx_size() counts only fspx_gfx/ entries");
1326 check(lib.bvh_size() == 1, "ShaderLibrary::bvh_size() counts only bvh/ entries"); 1326 check(lib.bvh_size() == 1, "ShaderLibrary::bvh_size() counts only bvh/ entries");
1327 const auto* ps_entry = 1327 const auto* ps_entry =
1328 lib.find_fspx_by_code("9e5ffd2c6c521c037cf57582a23f8ff7ba494a71ca63bb899357caee8baab850"); 1328 lib.find_fspx_by_code("3333333333333333333333333333333333333333333333333333333333333333");
1329 const auto* vs_entry = 1329 const auto* vs_entry =
1330 lib.find_fspx_by_code("160fbe4368fb1a6349a2683bf72817f183d780c42a35cf25c86560917228061a"); 1330 lib.find_fspx_by_code("4444444444444444444444444444444444444444444444444444444444444444");
1331 check(ps_entry && ps_entry->stage == "ps" && ps_entry->spv_file == "fspx_gfx/9e5ffd2c6c521c03_libps_00842.spv", 1331 check(ps_entry && ps_entry->stage == "ps" && ps_entry->spv_file == "fspx_gfx/3333333333333333_libps_00001.spv",
1332 "fspx_gfx PS entry preserves stage and its spv filename, under the folder prefix"); 1332 "fspx_gfx PS entry preserves stage and its spv filename, under the folder prefix");
1333 check(vs_entry && vs_entry->stage == "vs" && vs_entry->spv_file == "fspx_gfx/160fbe4368fb1a63_libvs_00843.spv", 1333 check(vs_entry && vs_entry->stage == "vs" && vs_entry->spv_file == "fspx_gfx/4444444444444444_libvs_00002.spv",
1334 "fspx_gfx VS entry preserves stage and its spv filename, under the folder prefix"); 1334 "fspx_gfx VS entry preserves stage and its spv filename, under the folder prefix");
1335 std::filesystem::remove_all(tmp_dir, ec); 1335 std::filesystem::remove_all(tmp_dir, ec);
1336 } 1336 }