Allow shader patching (#1633)

This commit is contained in:
Vinicius Rangel 2024-11-30 16:15:55 -03:00 committed by GitHub
parent 07f4a0305b
commit 2002e37ce9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 58 additions and 1 deletions

View file

@ -52,6 +52,7 @@ static bool isAutoUpdate = false;
static bool isNullGpu = false;
static bool shouldCopyGPUBuffers = false;
static bool shouldDumpShaders = false;
static bool shouldPatchShaders = true;
static u32 vblankDivider = 1;
static bool vkValidation = false;
static bool vkValidationSync = false;
@ -178,6 +179,10 @@ bool dumpShaders() {
return shouldDumpShaders;
}
bool patchShaders() {
return shouldPatchShaders;
}
bool isRdocEnabled() {
return rdocEnable;
}
@ -546,6 +551,7 @@ void load(const std::filesystem::path& path) {
isNullGpu = toml::find_or<bool>(gpu, "nullGpu", false);
shouldCopyGPUBuffers = toml::find_or<bool>(gpu, "copyGPUBuffers", false);
shouldDumpShaders = toml::find_or<bool>(gpu, "dumpShaders", false);
shouldPatchShaders = toml::find_or<bool>(gpu, "patchShaders", true);
vblankDivider = toml::find_or<int>(gpu, "vblankDivider", 1);
}
@ -646,6 +652,7 @@ void save(const std::filesystem::path& path) {
data["GPU"]["nullGpu"] = isNullGpu;
data["GPU"]["copyGPUBuffers"] = shouldCopyGPUBuffers;
data["GPU"]["dumpShaders"] = shouldDumpShaders;
data["GPU"]["patchShaders"] = shouldPatchShaders;
data["GPU"]["vblankDivider"] = vblankDivider;
data["Vulkan"]["gpuId"] = gpuId;
data["Vulkan"]["validation"] = vkValidation;