A texture cache that never invalidates.
This commit is contained in:
@@ -9,12 +9,16 @@
|
||||
|
||||
#include <xenia/gpu/sampler_info.h>
|
||||
|
||||
#include <third_party/xxhash/xxhash.h>
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
|
||||
bool SamplerInfo::Prepare(const xenos::xe_gpu_texture_fetch_t& fetch,
|
||||
const ucode::instr_fetch_tex_t& fetch_instr,
|
||||
SamplerInfo* out_info) {
|
||||
std::memset(out_info, 0, sizeof(SamplerInfo));
|
||||
|
||||
out_info->min_filter = static_cast<ucode::instr_tex_filter_t>(
|
||||
fetch_instr.min_filter == 3 ? fetch.min_filter : fetch_instr.min_filter);
|
||||
out_info->mag_filter = static_cast<ucode::instr_tex_filter_t>(
|
||||
@@ -27,5 +31,9 @@ bool SamplerInfo::Prepare(const xenos::xe_gpu_texture_fetch_t& fetch,
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64_t SamplerInfo::hash() const {
|
||||
return XXH64(this, sizeof(SamplerInfo), 0);
|
||||
}
|
||||
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
Reference in New Issue
Block a user