mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-29 04:18:49 -04:00
Triforce v0.8.5
A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
@@ -38,11 +38,17 @@ def main():
|
||||
#include <mutex>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include "cpuwordsseen.h"
|
||||
struct Pool { uint64_t lo; };
|
||||
struct VkBufferCopy { uint64_t srcOffset, dstOffset, size; };
|
||||
std::mutex cpu_words_mu;
|
||||
bool wb_notes_off() { return false; } // ((Triforce, 11-22, MEM-51) the mirrors are on here: tests/test_mirror_bookkeeping.py has the case without
|
||||
std::vector<uint64_t> cpu_words, cpu_words_recent, cpu_words_new; // (the big and the recent sorted sets, and noted since: vk_memory.cpp)
|
||||
// ((Triforce, 11-26) the table of the words the sets hold, on as by default: tests/test_cpuwordsseen.py has its cases. The
|
||||
// cases here empty the sets by hand and tell the table (reset, check), so it never knows a word the sets do not hold; it
|
||||
// does not hear of the words they put in by hand, so it only knows fewer words than the sets hold)
|
||||
cpu_words_seen::Table cpu_words_table;
|
||||
int cpu_words_seen_mode() { return cpu_words_seen::ON; }
|
||||
#define CHECK(ok) do { if (!(ok)) { std::fprintf(stderr, "failed line %d\n", __LINE__); std::exit(1); } } while (0)
|
||||
''' + helper + r'''
|
||||
// after a merge: both sets sorted with no repeats, no word in both, nothing left noted, and together exactly the words in want
|
||||
@@ -63,6 +69,7 @@ void reset() {
|
||||
cpu_words.clear();
|
||||
cpu_words_recent.clear();
|
||||
cpu_words_new.clear();
|
||||
cpu_words_table.forget(); // (the sets emptied by hand: the table forgets with them, as memory_cpu_owned's clear does)
|
||||
}
|
||||
// owned: words noted since the last merge; kept: words merged before (in the big set already)
|
||||
void check(uint64_t start, uint64_t end, std::initializer_list<uint64_t> owned, std::initializer_list<uint64_t> kept = {}) {
|
||||
@@ -70,6 +77,7 @@ void check(uint64_t start, uint64_t end, std::initializer_list<uint64_t> owned,
|
||||
cpu_words.clear();
|
||||
cpu_words_recent.clear();
|
||||
cpu_words_new.clear();
|
||||
cpu_words_table.forget();
|
||||
std::set<uint64_t> owned_words;
|
||||
for (uint64_t offset : kept) cpu_words.push_back(pool.lo + offset), owned_words.insert(pool.lo + offset);
|
||||
std::sort(cpu_words.begin(), cpu_words.end());
|
||||
@@ -197,7 +205,7 @@ int main() {
|
||||
cpp = Path(tmp) / 'fixture.cpp'
|
||||
exe = Path(tmp) / 'fixture.exe'
|
||||
cpp.write_text(fixture, encoding='utf-8')
|
||||
subprocess.run([args.cxx, '-std=c++20', '-Wall', '-Wextra', '-Werror', str(cpp), '-o', str(exe)], check=True)
|
||||
subprocess.run([args.cxx, '-std=c++20', '-Wall', '-Wextra', '-Werror', '-I', str(ROOT / 'gpu' / 'vk'), str(cpp), '-o', str(exe)], check=True)
|
||||
# (memory_cpu_owned does nothing with RX_VK_WB_REPORTS set: not from the caller's environment)
|
||||
env = {k: v for k, v in os.environ.items() if k != 'RX_VK_WB_REPORTS'}
|
||||
subprocess.run([str(exe)], check=True, env=env)
|
||||
|
||||
Reference in New Issue
Block a user