mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
Refresh cached resources in one SRT walk
This commit is contained in:
@@ -219,19 +219,13 @@ void TestUnbasedFlatCacheHitMaterializes() {
|
||||
"unbased FLAT plan produced unexpected descriptors");
|
||||
}
|
||||
|
||||
void TestFailedMaterializationPreservesPriorStage() {
|
||||
void TestFailedMaterializationRejectsStage() {
|
||||
using namespace Libs::Graphics::ShaderRecompiler::IR;
|
||||
auto plan = UserDataBufferPlan();
|
||||
ResourceSnapshot snapshot;
|
||||
snapshot.user_data.push_back(0xfeedbeefu);
|
||||
ResourceSpecialization specialization;
|
||||
specialization.buffers.push_back({.packed_stride = 7});
|
||||
Check(!MaterializeResources(plan, {}, snapshot, specialization),
|
||||
"missing runtime user data did not reject the cached stage");
|
||||
Check(snapshot.user_data == std::vector<uint32_t>{0xfeedbeefu} &&
|
||||
specialization.buffers.size() == 1 &&
|
||||
specialization.buffers[0].packed_stride == 7,
|
||||
"failed cache materialization changed its destinations");
|
||||
}
|
||||
|
||||
void TestMixedSamplerDuplicatesTheCorrectSnapshot() {
|
||||
@@ -268,7 +262,7 @@ int main() {
|
||||
TestMappedSrtUsesDirectReaderByDefault();
|
||||
TestIntegerRuntimeValueFollowsSrtReads();
|
||||
TestUnbasedFlatCacheHitMaterializes();
|
||||
TestFailedMaterializationPreservesPriorStage();
|
||||
TestFailedMaterializationRejectsStage();
|
||||
TestMixedSamplerDuplicatesTheCorrectSnapshot();
|
||||
std::puts("ResourceMaterializationTests: all cases passed");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user