mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-13 05:05:57 +00:00
config: Add toggle for DMA (#3185)
* config: Add toggle for DMA * config: Log new config
This commit is contained in:
parent
48460d1cbe
commit
df22c4225e
9 changed files with 52 additions and 24 deletions
|
@ -52,6 +52,7 @@ static std::string isSideTrophy = "right";
|
|||
static bool isNullGpu = false;
|
||||
static bool shouldCopyGPUBuffers = false;
|
||||
static bool readbacksEnabled = false;
|
||||
static bool directMemoryAccessEnabled = false;
|
||||
static bool shouldDumpShaders = false;
|
||||
static bool shouldPatchShaders = true;
|
||||
static u32 vblankDivider = 1;
|
||||
|
@ -245,6 +246,10 @@ bool readbacks() {
|
|||
return readbacksEnabled;
|
||||
}
|
||||
|
||||
bool directMemoryAccess() {
|
||||
return directMemoryAccessEnabled;
|
||||
}
|
||||
|
||||
bool dumpShaders() {
|
||||
return shouldDumpShaders;
|
||||
}
|
||||
|
@ -353,6 +358,10 @@ void setReadbacks(bool enable) {
|
|||
readbacksEnabled = enable;
|
||||
}
|
||||
|
||||
void setDirectMemoryAccess(bool enable) {
|
||||
directMemoryAccessEnabled = enable;
|
||||
}
|
||||
|
||||
void setDumpShaders(bool enable) {
|
||||
shouldDumpShaders = enable;
|
||||
}
|
||||
|
@ -596,6 +605,7 @@ void load(const std::filesystem::path& path) {
|
|||
isNullGpu = toml::find_or<bool>(gpu, "nullGpu", false);
|
||||
shouldCopyGPUBuffers = toml::find_or<bool>(gpu, "copyGPUBuffers", false);
|
||||
readbacksEnabled = toml::find_or<bool>(gpu, "readbacks", false);
|
||||
directMemoryAccessEnabled = toml::find_or<bool>(gpu, "directMemoryAccess", 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);
|
||||
|
@ -746,6 +756,7 @@ void save(const std::filesystem::path& path) {
|
|||
data["GPU"]["nullGpu"] = isNullGpu;
|
||||
data["GPU"]["copyGPUBuffers"] = shouldCopyGPUBuffers;
|
||||
data["GPU"]["readbacks"] = readbacksEnabled;
|
||||
data["GPU"]["directMemoryAccess"] = directMemoryAccessEnabled;
|
||||
data["GPU"]["dumpShaders"] = shouldDumpShaders;
|
||||
data["GPU"]["patchShaders"] = shouldPatchShaders;
|
||||
data["GPU"]["vblankDivider"] = vblankDivider;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue