mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-21 00:59:59 -04:00
Triforce v0.6.0 "Sage Of Power"
Faster frames (the replay's memory work, held submits, helper threads, collection and capture cuts), the game letting old areas go (QueryMemoryInfo), the 0.5.2 stutter fixed, AMD RX 5000/6000 and integrated-GPU fixes, the GPU device chosen by name, the in-game menus and launcher reworked, controller, Linux and benchmark fixes.
This commit is contained in:
@@ -32,6 +32,34 @@ def save_function(path):
|
||||
return source[start:end]
|
||||
|
||||
|
||||
def checkpoint_function(path):
|
||||
"""(Triforce) vk_draw.cpp's pcache_checkpoint_save, as it is (gpu/vk/warm_checkpoint.h): the preparation's checkpoint save
|
||||
through pipeline_cache_save, always the source under test's own"""
|
||||
source = path.read_text(encoding='utf-8')
|
||||
marker = 'size_t pcache_checkpoint_save() {'
|
||||
if source.count(marker) != 1:
|
||||
raise AssertionError('expected exactly one checkpoint save function')
|
||||
start = source.index(marker)
|
||||
end = source.index('{', start) + 1
|
||||
depth = 1
|
||||
while depth:
|
||||
depth += (source[end] == '{') - (source[end] == '}')
|
||||
end += 1
|
||||
return source[start:end]
|
||||
|
||||
|
||||
def carry_part(path):
|
||||
"""(Triforce) vk_draw.cpp's carry part (pcache_carry_past, pcache_carry_save_ok, pcache_carry_check, pcache_carry_held,
|
||||
pcache_carry_early, pcache_carry_saved),
|
||||
as it is: always the source under test's own, also for the optional original's save function"""
|
||||
source = path.read_text(encoding='utf-8')
|
||||
start_mark = "// ---- (Triforce) The carry's state and its rules in use"
|
||||
end_mark = "// ---- (Triforce) The carry's part ends ----"
|
||||
if source.count(start_mark) != 1 or source.count(end_mark) != 1:
|
||||
raise AssertionError('expected exactly one carry part')
|
||||
return source[source.index(start_mark):source.index(end_mark)]
|
||||
|
||||
|
||||
class PipelineCacheSaveTests(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
@@ -48,6 +76,9 @@ class PipelineCacheSaveTests(unittest.TestCase):
|
||||
directory = cls.directory / name
|
||||
directory.mkdir()
|
||||
(directory / 'pipeline_cache_save.inc').write_text(save_function(source), encoding='utf-8')
|
||||
(directory / 'pcache_carry_part.inc').write_text(carry_part(ROOT / 'gpu/vk/vk_draw.cpp'), encoding='utf-8')
|
||||
(directory / 'pcache_checkpoint_save.inc').write_text(checkpoint_function(ROOT / 'gpu/vk/vk_draw.cpp'),
|
||||
encoding='utf-8')
|
||||
executable = directory / 'check.exe'
|
||||
command = [compiler, '-std=c++20', '-O1', '-Wall', '-Wextra', '-Werror', '-pthread',
|
||||
'-I' + str(directory), '-I' + str(ROOT / 'gpu/vk'), str(ROOT / 'tests/pipeline_cache_save_test.cpp'),
|
||||
@@ -112,6 +143,51 @@ class PipelineCacheSaveTests(unittest.TestCase):
|
||||
# gpu/vk/pcache_bound.h: the file keeps its last save, which the next start reads.
|
||||
self.check_case('over-bound')
|
||||
|
||||
def test_carried_cache_is_not_written_past_its_cap(self):
|
||||
# (Triforce) gpu/vk/pcache_carry.h: carried over a stamp change, up to 1.25 x its base; a fresh cache after.
|
||||
self.check_case('carry-cap')
|
||||
|
||||
def test_carried_cache_over_the_bound_is_past_what_it_may_hold(self):
|
||||
# (Triforce) Over the bound and under the cap: a rebuild is asked, not the bound's silent refusal with the old file.
|
||||
self.check_case('carry-bound')
|
||||
|
||||
def test_carried_history_is_open_until_the_preparation_is_done(self):
|
||||
# (Triforce) pcache_carry.h Side::open: a stopped carried preparation's save stays capped when begun again.
|
||||
self.check_case('carry-done')
|
||||
|
||||
def test_checkpoint_keeps_a_carried_preparation_capped(self):
|
||||
# (Triforce) gpu/vk/warm_checkpoint.h: a checkpoint mid-warm in a carried session saves under the new stamp with its
|
||||
# history open, as a stopped one's save, so the start after a crash there is carried still and capped; the RAM, the
|
||||
# cap and nothing new each leave the file as it was.
|
||||
self.check_case('checkpoint')
|
||||
|
||||
def test_checkpoint_fetches_a_growing_cache_with_room(self):
|
||||
# (Triforce) gpu/vk/warm_checkpoint.h: the workers build while a checkpoint fetches; fetched with room, the cap and the
|
||||
# bound looked at again on what was fetched, asked again past the room, flushed and put in place written through.
|
||||
self.check_case('checkpoint-grow')
|
||||
|
||||
def test_checkpoint_gives_up_on_a_stop_and_a_short_disk(self):
|
||||
# (Triforce) a stop asked before the fetch or in the write, the disk short of room: nothing written, no .tmp left.
|
||||
self.check_case('checkpoint-stop')
|
||||
|
||||
def test_carried_history_is_written_before_the_data(self):
|
||||
# (Triforce) gpu/vk/pcache_carry.h begun: a carried save cut before its .for is read as that session's, capped.
|
||||
self.check_case('carry-begun')
|
||||
|
||||
def test_own_marker_names_a_file_of_the_part_alone(self):
|
||||
# (Triforce) <file>.own: a checkpoint's file before a crash is not taken for an older build's (warm_libraries).
|
||||
self.check_case('own')
|
||||
|
||||
def test_carried_cache_size_is_looked_at_while_preparing(self):
|
||||
# (Triforce) pcache_carry_check: only a carried cache is asked; not on Intel while workers build; once past, it stays.
|
||||
self.check_case('carry-check')
|
||||
|
||||
def test_carried_cache_is_dropped_early_on_its_projection(self):
|
||||
# (Triforce) pcache_carry_early: a carried cache that would grow past what it may hold by the margin is dropped as past
|
||||
# it once its sample is built, and not saved; a sample too small, under the margin, past it already, on Intel or
|
||||
# switched off it is not (and on Intel or switched off no sample is taken: the warm keeps its own order).
|
||||
self.check_case('carry-early')
|
||||
|
||||
def test_save_in_play_waits_while_the_copy_does_not_fit_in_ram(self):
|
||||
# (Triforce) gpu/vk/mem_parts.h copy_fits: the whole cache fetched in play is what Windows pages out with the RAM
|
||||
# short; the save waits for the next check, and the one at the game's close does not ask.
|
||||
|
||||
Reference in New Issue
Block a user