rsx/prog: Use a proper cache hint key instead of disjointed counters

This commit is contained in:
kd-11 2025-03-08 19:03:05 +03:00 committed by kd-11
parent 26495a8455
commit a1c8f3a528
9 changed files with 110 additions and 101 deletions

View file

@ -1,6 +1,7 @@
#include "stdafx.h"
#include "ProgramStateCache.h"
#include "Emu/system_config.h"
#include "Emu/RSX/Core/RSXDriverState.h"
#include "util/sysinfo.hpp"
#include <stack>
@ -851,4 +852,17 @@ namespace rsx
write_fragment_constants_to_buffer_fallback(buffer, rsx_prog, offsets_cache, sanitize);
#endif
}
void program_cache_hint_t::invalidate(u32 flags)
{
if (flags & rsx::vertex_program_dirty)
{
cached_vertex_program = nullptr;
}
if (flags & rsx::fragment_program_dirty)
{
cached_fragment_program = nullptr;
}
}
}