graphics: make raw image synchronization an opt-in setting

This commit is contained in:
nmzik
2026-10-07 20:39:11 +04:00
parent dd754065d8
commit 470669c677
10 changed files with 44 additions and 7 deletions
@@ -3,6 +3,7 @@
#include "common/alignment.h"
#include "common/assert.h"
#include "common/common.h"
#include "common/emulatorConfig.h"
#include "common/file.h"
#include "common/logging/log.h"
#include "common/profiler.h"
@@ -127,7 +128,8 @@ NativeStorageBuffer(RenderContext& context, const PreparedBindings::BufferSource
EXIT("storage buffer range is unsupported\n");
}
auto [buffer, offset] = context.GetBufferCache().ObtainBuffer(
address, size, resource.written, resource.read || resource.formatted, id);
address, size, resource.written,
resource.formatted || (resource.read && Config::SyncRawImageBuffersEnabled()), id);
const auto aligned_offset = Common::AlignDown(offset, alignment);
const auto adjustment = offset - aligned_offset;
const auto max_range = graphics.GetPhysicalDeviceProperties().limits.maxStorageBufferRange;