mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 15:05:59 +00:00
rsx/prog: Use a proper cache hint key instead of disjointed counters
This commit is contained in:
parent
26495a8455
commit
a1c8f3a528
9 changed files with 110 additions and 101 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue