WIP: Prototype for older A6XX devices #50

Closed
Bix wants to merge 2 commits from Legacy into master
2 changed files with 14 additions and 8 deletions

View file

@ -103,7 +103,7 @@ android {
signingConfigs.getByName("default") signingConfigs.getByName("default")
} }
resValue("string", "app_name_suffixed", "Eden") resValue("string", "app_name_suffixed", "Eden Legacy")
isMinifyEnabled = true isMinifyEnabled = true
isDebuggable = false isDebuggable = false
proguardFiles( proguardFiles(
@ -116,7 +116,7 @@ android {
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build. // Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
register("relWithDebInfo") { register("relWithDebInfo") {
isDefault = true isDefault = true
resValue("string", "app_name_suffixed", "Eden Debug Release") resValue("string", "app_name_suffixed", "Eden Legacy Debug Release")
signingConfig = signingConfigs.getByName("default") signingConfig = signingConfigs.getByName("default")
isDebuggable = true isDebuggable = true
proguardFiles( proguardFiles(
@ -132,7 +132,7 @@ android {
// Attaches 'debug' suffix to version and package name, allowing installation alongside the release build. // Attaches 'debug' suffix to version and package name, allowing installation alongside the release build.
debug { debug {
signingConfig = signingConfigs.getByName("default") signingConfig = signingConfigs.getByName("default")
resValue("string", "app_name_suffixed", "Eden Debug") resValue("string", "app_name_suffixed", "Eden Legacy Debug")
isDebuggable = true isDebuggable = true
isJniDebuggable = true isJniDebuggable = true
versionNameSuffix = "-debug" versionNameSuffix = "-debug"

View file

@ -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-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@ -351,7 +354,7 @@ std::optional<StorageBufferAddr> Track(const IR::Value& value, const Bias* bias)
.index = index.U32(), .index = index.U32(),
.offset = offset.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)) { if (!Common::IsAligned(storage_buffer.offset, alignment)) {
// The SSBO pointer has to be aligned // The SSBO pointer has to be aligned
return std::nullopt; return std::nullopt;
@ -372,9 +375,9 @@ void CollectStorageBuffers(IR::Block& block, IR::Inst& inst, StorageInfo& info)
// avoid getting false positives // avoid getting false positives
static constexpr Bias nvn_bias{ static constexpr Bias nvn_bias{
.index = 0, .index = 0,
.offset_begin = 0x100, .offset_begin = 0x110,
.offset_end = 0x700, .offset_end = 0x800,
.alignment = 16, .alignment = 32,
}; };
// Track the low address of the instruction // Track the low address of the instruction
const std::optional<LowAddrInfo> low_addr_info{TrackLowAddress(&inst)}; const std::optional<LowAddrInfo> low_addr_info{TrackLowAddress(&inst)};
@ -426,7 +429,10 @@ IR::U32 StorageOffset(IR::Block& block, IR::Inst& inst, StorageBufferAddr buffer
// Align the offset base to match the host alignment requirements // Align the offset base to match the host alignment requirements
low_cbuf = ir.BitwiseAnd(low_cbuf, ir.Imm32(~(alignment - 1U))); low_cbuf = ir.BitwiseAnd(low_cbuf, ir.Imm32(~(alignment - 1U)));
return ir.ISub(offset, low_cbuf);
// It aligns the memory strongly
IR::U32 res = ir.ISub(offset, low_cbuf);
return res;
} }
/// Replace a global memory load instruction with its storage buffer equivalent /// Replace a global memory load instruction with its storage buffer equivalent