upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authorASTROWwwW <astrxwledev@gmail.com>2026-11-23 19:39:53 +0100
committerASTROWwwW <astrxwledev@gmail.com>2026-11-23 19:39:53 +0100
commitb487b6d8ccf1d15d723367752a71439c3db077e5 (patch)
treec3f78c0e21c56e7da1dd4e5a024c845389dd4da0 /runtime/src
parent5caef48a194d1a39d0568427cdbb4da22a482817 (diff)
parentbc5fc47b9c7b57f155166963b880154a7c0aa95d (diff)
Merge branch 'pr7746' into ladder-frame
# Conflicts: # make_game.py # runtime/src/shader_library.h # runtime/test/shader_library_test.cpp
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/shader_library.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/runtime/src/shader_library.h b/runtime/src/shader_library.h
index 1513432e3..210b54ec6 100644
--- a/runtime/src/shader_library.h
+++ b/runtime/src/shader_library.h
@@ -729,7 +729,9 @@ public:
729 // fssm_sha256 like the game's own shaders (docs/embedded_shaders.md); 729 // fssm_sha256 like the game's own shaders (docs/embedded_shaders.md);
730 // - <dir>/library/index.json, the compute programs of the pipeline library in shaders.rpf, which the executable 730 // - <dir>/library/index.json, the compute programs of the pipeline library in shaders.rpf, which the executable
731 // creates with slot 67; entries named "library/<name>" and found by fspx_code_sha256 and fspx_state_sha256 731 // creates with slot 67; entries named "library/<name>" and found by fspx_code_sha256 and fspx_state_sha256
732 // like the FSPX ones (docs/shader_library.md). 732 // like the FSPX ones (docs/shader_library.md);
733 // - <dir>/exe/index.json, game_scarlett_master.exe's embedded FSSM programs, entries named "exe/<name>" and
734 // found by fssm_sha256 like the game's own shaders (docs/embedded_shaders.md).
733 // Entries with neither fssm_sha256 nor fspx_code_sha256 cannot be found by content and are skipped. The folders 735 // Entries with neither fssm_sha256 nor fspx_code_sha256 cannot be found by content and are skipped. The folders
734 // are optional: a missing or unreadable index there leaves the main one, and the other folders', loaded. 736 // are optional: a missing or unreadable index there leaves the main one, and the other folders', loaded.
735 bool load(const std::filesystem::path& dir, std::string* error = nullptr) { 737 bool load(const std::filesystem::path& dir, std::string* error = nullptr) {
@@ -743,7 +745,7 @@ public:
743 } catch (...) { 745 } catch (...) {
744 return fail("index.json could not be read"); 746 return fail("index.json could not be read");
745 } 747 }
746 for (const char* folder : {"fspx", "bvh", "library"}) { 748 for (const char* folder : {"fspx", "bvh", "library", "exe"}) {
747 try { 749 try {
748 const auto ignore = [](const std::string&) { return false; }; 750 const auto ignore = [](const std::string&) { return false; };
749 const std::filesystem::path sub = dir / folder; 751 const std::filesystem::path sub = dir / folder;
@@ -764,6 +766,9 @@ public:
764 // Entries loaded from <dir>/bvh/index.json. No RPF container reaches these either: XboxBvhBuilder.dll passes 766 // Entries loaded from <dir>/bvh/index.json. No RPF container reaches these either: XboxBvhBuilder.dll passes
765 // their containers itself. 767 // their containers itself.
766 std::size_t bvh_size() const { return bvh_count_; } 768 std::size_t bvh_size() const { return bvh_count_; }
769 // Entries loaded from <dir>/exe/index.json. No RPF container reaches these either: game_scarlett_master.exe
770 // embeds their containers itself.
771 std::size_t exe_size() const { return exe_count_; }
767 772
768 // The first entry for this program. Two containers can hold the same FSSM program with different input 773 // The first entry for this program. Two containers can hold the same FSSM program with different input
769 // signatures; `candidates` returns all of them. 774 // signatures; `candidates` returns all of them.
@@ -867,6 +872,7 @@ private:
867 count_ = 0; 872 count_ = 0;
868 fspx_count_ = 0; 873 fspx_count_ = 0;
869 bvh_count_ = 0; 874 bvh_count_ = 0;
875 exe_count_ = 0;
870 } 876 }
871 for (const auto& [name, meta] : root.object) { 877 for (const auto& [name, meta] : root.object) {
872 const Json* hash = meta.find("fssm_sha256"); 878 const Json* hash = meta.find("fssm_sha256");
@@ -932,6 +938,7 @@ private:
932 if (by_fssm) entries_[{e.stage, e.fssm_sha256}].push_back(std::move(e)); 938 if (by_fssm) entries_[{e.stage, e.fssm_sha256}].push_back(std::move(e));
933 if (by_fspx && (prefix == "fspx/" || prefix == "library/")) ++fspx_count_; 939 if (by_fspx && (prefix == "fspx/" || prefix == "library/")) ++fspx_count_;
934 if (prefix == "bvh/") ++bvh_count_; 940 if (prefix == "bvh/") ++bvh_count_;
941 if (prefix == "exe/") ++exe_count_;
935 ++count_; 942 ++count_;
936 } 943 }
937 return true; 944 return true;
@@ -941,6 +948,7 @@ private:
941 std::size_t count_ = 0; 948 std::size_t count_ = 0;
942 std::size_t fspx_count_ = 0; 949 std::size_t fspx_count_ = 0;
943 std::size_t bvh_count_ = 0; 950 std::size_t bvh_count_ = 0;
951 std::size_t exe_count_ = 0;
944 // Entries by (stage, fssm_sha256) and by (stage, fspx_code_sha256), in index order. 952 // Entries by (stage, fssm_sha256) and by (stage, fspx_code_sha256), in index order.
945 Entries entries_; 953 Entries entries_;
946 Entries fspx_entries_; 954 Entries fspx_entries_;