mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 05:40:04 +00:00
Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115)
This commit is contained in:
parent
90b418fd1a
commit
cbd5d1c15c
67 changed files with 6837 additions and 7475 deletions
|
@ -205,7 +205,7 @@ public:
|
|||
// printing the character '{' is desirable. Ditto for }} and '}',
|
||||
// etc).
|
||||
template <typename... Args>
|
||||
void AddLine(std::string_view text, Args&&... args) {
|
||||
void AddLine(fmt::format_string<Args...> text, Args&&... args) {
|
||||
AddExpression(fmt::format(text, std::forward<Args>(args)...));
|
||||
AddNewLine();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <set>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/variant.hpp>
|
||||
#include "core/frontend/scope_acquire_context.h"
|
||||
#include "video_core/renderer_opengl/gl_resource_manager.h"
|
||||
|
@ -21,12 +20,14 @@ namespace OpenGL {
|
|||
static u64 GetUniqueIdentifier(const Pica::Regs& regs, const ProgramCode& code) {
|
||||
std::size_t hash = 0;
|
||||
u64 regs_uid = Common::ComputeHash64(regs.reg_array.data(), Pica::Regs::NUM_REGS * sizeof(u32));
|
||||
boost::hash_combine(hash, regs_uid);
|
||||
hash = Common::HashCombine(hash, regs_uid);
|
||||
|
||||
if (code.size() > 0) {
|
||||
u64 code_uid = Common::ComputeHash64(code.data(), code.size() * sizeof(u32));
|
||||
boost::hash_combine(hash, code_uid);
|
||||
hash = Common::HashCombine(hash, code_uid);
|
||||
}
|
||||
return static_cast<u64>(hash);
|
||||
|
||||
return hash;
|
||||
}
|
||||
|
||||
static OGLProgram GeneratePrecompiledProgram(const ShaderDiskCacheDump& dump,
|
||||
|
@ -336,14 +337,14 @@ public:
|
|||
}
|
||||
|
||||
struct ShaderTuple {
|
||||
GLuint vs = 0;
|
||||
GLuint gs = 0;
|
||||
GLuint fs = 0;
|
||||
|
||||
std::size_t vs_hash = 0;
|
||||
std::size_t gs_hash = 0;
|
||||
std::size_t fs_hash = 0;
|
||||
|
||||
GLuint vs = 0;
|
||||
GLuint gs = 0;
|
||||
GLuint fs = 0;
|
||||
|
||||
bool operator==(const ShaderTuple& rhs) const {
|
||||
return std::tie(vs, gs, fs) == std::tie(rhs.vs, rhs.gs, rhs.fs);
|
||||
}
|
||||
|
@ -353,14 +354,14 @@ public:
|
|||
}
|
||||
|
||||
std::size_t GetConfigHash() const {
|
||||
std::size_t hash = 0;
|
||||
boost::hash_combine(hash, vs_hash);
|
||||
boost::hash_combine(hash, gs_hash);
|
||||
boost::hash_combine(hash, fs_hash);
|
||||
return hash;
|
||||
return Common::ComputeHash64(this, sizeof(std::size_t) * 3);
|
||||
}
|
||||
};
|
||||
|
||||
static_assert(offsetof(ShaderTuple, vs_hash) == 0, "ShaderTuple layout changed!");
|
||||
static_assert(offsetof(ShaderTuple, fs_hash) == sizeof(std::size_t) * 2,
|
||||
"ShaderTuple layout changed!");
|
||||
|
||||
bool is_amd;
|
||||
bool separable;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue