From c18662d039d8f55fdab0c627e030b7b7716e3c78 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Thu, 27 Nov 2025 05:33:42 +0100 Subject: [PATCH] [ir, nvn] Tightened SSBO tracking heuristics --- .../ir_opt/global_memory_to_storage_buffer_pass.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp b/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp index 2d4feca02c..c3d5a0ea50 100644 --- a/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp +++ b/src/shader_recompiler/ir_opt/global_memory_to_storage_buffer_pass.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -351,7 +354,7 @@ std::optional Track(const IR::Value& value, const Bias* bias) .index = index.U32(), .offset = offset.U32(), }; - const u32 alignment{bias ? bias->alignment : 8U}; + const u32 alignment{bias ? bias->alignment : 16U}; if (!Common::IsAligned(storage_buffer.offset, alignment)) { // The SSBO pointer has to be aligned return std::nullopt; @@ -372,9 +375,9 @@ void CollectStorageBuffers(IR::Block& block, IR::Inst& inst, StorageInfo& info) // avoid getting false positives static constexpr Bias nvn_bias{ .index = 0, - .offset_begin = 0x100, - .offset_end = 0x700, - .alignment = 16, + .offset_begin = 0x110, + .offset_end = 0x800, + .alignment = 32, }; // Track the low address of the instruction const std::optional low_addr_info{TrackLowAddress(&inst)};