From 73d60b7e8db64c64ef34468f454f1390378556e6 Mon Sep 17 00:00:00 2001 From: IndecisiveTurtle <47210458+raphaelthegreat@users.noreply.github.com> Date: Sat, 22 Jun 2024 13:40:01 +0300 Subject: [PATCH] linker: Set rela bits for all symbol types --- src/core/linker.cpp | 2 ++ src/shader_recompiler/ir/passes/resource_tracking_pass.cpp | 3 ++- src/video_core/texture_cache/tile_manager.cpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/linker.cpp b/src/core/linker.cpp index b5613970..1e1d4301 100644 --- a/src/core/linker.cpp +++ b/src/core/linker.cpp @@ -150,11 +150,13 @@ void Linker::Relocate(Module* module) { case R_X86_64_RELATIVE: rel_value = rel_base_virtual_addr + addend; rel_is_resolved = true; + module->SetRelaBit(bit_idx); break; case R_X86_64_DTPMOD64: rel_value = static_cast(module->tls.modid); rel_is_resolved = true; rel_sym_type = Loader::SymbolType::Tls; + module->SetRelaBit(bit_idx); break; case R_X86_64_GLOB_DAT: case R_X86_64_JUMP_SLOT: diff --git a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp index 306a96f0..ca489114 100644 --- a/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp +++ b/src/shader_recompiler/ir/passes/resource_tracking_pass.cpp @@ -251,7 +251,8 @@ IR::Value PatchCubeCoord(IR::IREmitter& ir, const IR::Value& s, const IR::Value& void PatchImageInstruction(IR::Block& block, IR::Inst& inst, Info& info, Descriptors& descriptors) { IR::Inst* producer = inst.Arg(0).InstRecursive(); - ASSERT(producer->GetOpcode() == IR::Opcode::CompositeConstructU32x2 || // IMAGE_SAMPLE (image+sampler) + ASSERT(producer->GetOpcode() == + IR::Opcode::CompositeConstructU32x2 || // IMAGE_SAMPLE (image+sampler) producer->GetOpcode() == IR::Opcode::ReadConst || // IMAGE_LOAD (image only) producer->GetOpcode() == IR::Opcode::GetUserData); const auto [tsharp_handle, ssharp_handle] = [&] -> std::pair { diff --git a/src/video_core/texture_cache/tile_manager.cpp b/src/video_core/texture_cache/tile_manager.cpp index 4d96e96d..94f0439c 100644 --- a/src/video_core/texture_cache/tile_manager.cpp +++ b/src/video_core/texture_cache/tile_manager.cpp @@ -226,7 +226,8 @@ static constexpr vk::BufferUsageFlags StagingFlags = vk::BufferUsageFlagBits::eT vk::BufferUsageFlagBits::eStorageBuffer; TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler) - : instance{instance}, scheduler{scheduler}, staging{instance, scheduler, StagingFlags, 64_MB, Vulkan::BufferType::Upload} { + : instance{instance}, scheduler{scheduler}, + staging{instance, scheduler, StagingFlags, 64_MB, Vulkan::BufferType::Upload} { static const std::array detiler_shaders{ HostShaders::DETILE_M8X1_COMP,