Sampler state caching.
This commit is contained in:
@@ -134,6 +134,16 @@ typedef XECACHEALIGN volatile void xe_aligned_void_t;
|
||||
#endif // GNUC
|
||||
#endif // !MIN
|
||||
|
||||
XEFORCEINLINE size_t hash_combine(size_t seed) {
|
||||
return seed;
|
||||
}
|
||||
template <typename T, typename... Ts>
|
||||
size_t hash_combine(size_t seed, const T& v, const Ts&... vs) {
|
||||
std::hash<T> hasher;
|
||||
seed ^= hasher(v) + 0x9E3779B9 + (seed << 6) + (seed >> 2);
|
||||
return hash_combine(seed, vs...);
|
||||
}
|
||||
|
||||
#if XE_PLATFORM_WIN32
|
||||
#define XESAFERELEASE(p) if (p) { p->Release(); }
|
||||
#endif // WIN32
|
||||
|
||||
Reference in New Issue
Block a user