mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-24 16:30:44 +00:00
revert 91a662431c (#240)
revert [Texture_cache] Better memory handling for devices with lower memory allocations (#233) Means games like Minecraft Dungeons, Sea of Stars, Luigi Mansion 2, Astroneer, Alan Wake, etc are now playable. It also cleans up the recent abi.cpp and bindless texture commits a bit. Everything is in #ifdef ANDROID - The biggest change is CACHING_PAGEBITS = 12. Without that the way the buffercache grows and joins buffers can cause Android to run out of memory (as you end up with just one big buffer that needs to be copied every time it grows) Also patches up ffmpeg issues. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/233 Co-authored-by: JPikachu <jpikachu.eden@gmail.com> Co-committed-by: JPikachu <jpikachu.eden@gmail.com> Had showed some regressions on devices with higher specifications, will be refined to return as a toggle in a later commit. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/240
This commit is contained in:
@@ -327,14 +327,30 @@ std::optional<ConstBufferAddr> TryGetConstBuffer(const IR::Inst* inst, Environme
|
||||
};
|
||||
}
|
||||
|
||||
// TODO:xbzk: shall be dropped when Track method cover all bindless stuff
|
||||
static ConstBufferAddr last_valid_addr = ConstBufferAddr{
|
||||
.index = 0,
|
||||
.offset = 0,
|
||||
.shift_left = 0,
|
||||
.secondary_index = 0,
|
||||
.secondary_offset = 0,
|
||||
.secondary_shift_left = 0,
|
||||
.dynamic_offset = {},
|
||||
.count = 1,
|
||||
.has_secondary = false,
|
||||
};
|
||||
|
||||
TextureInst MakeInst(Environment& env, IR::Block* block, IR::Inst& inst) {
|
||||
ConstBufferAddr addr{};
|
||||
ConstBufferAddr addr;
|
||||
if (IsBindless(inst)) {
|
||||
const std::optional<ConstBufferAddr> track_addr{Track(inst.Arg(0), env)};
|
||||
|
||||
if (!track_addr) {
|
||||
LOG_WARNING(Shader, "Failed to track bindless texture constant buffer");
|
||||
//throw NotImplementedException("Failed to track bindless texture constant buffer");
|
||||
addr = last_valid_addr; // TODO:xbzk: shall be dropped when Track method cover all bindless stuff
|
||||
} else {
|
||||
addr = *track_addr;
|
||||
last_valid_addr = addr; // TODO:xbzk: shall be dropped when Track method cover all bindless stuff
|
||||
}
|
||||
} else {
|
||||
addr = ConstBufferAddr{
|
||||
|
||||
Reference in New Issue
Block a user