mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-06-03 06:05:01 -06:00
Merge branch 'shadps4-emu:main' into fontlib
This commit is contained in:
commit
8b44502b1d
@ -113,6 +113,7 @@ bool PSF::Encode(const std::filesystem::path& filepath) const {
|
|||||||
LOG_ERROR(Core, "Failed to write PSF file. Written {} Expected {}", written,
|
LOG_ERROR(Core, "Failed to write PSF file. Written {} Expected {}", written,
|
||||||
psf_buffer.size());
|
psf_buffer.size());
|
||||||
}
|
}
|
||||||
|
file.Close();
|
||||||
return written == psf_buffer.size();
|
return written == psf_buffer.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -252,6 +252,10 @@ s32 loadModuleInternal(s32 index, s32 argc, const void* argv, s32* res_out) {
|
|||||||
if (init_func) {
|
if (init_func) {
|
||||||
LOG_INFO(Loader, "Can't Load {} switching to HLE", mod_name);
|
LOG_INFO(Loader, "Can't Load {} switching to HLE", mod_name);
|
||||||
init_func(&linker->GetHLESymbols());
|
init_func(&linker->GetHLESymbols());
|
||||||
|
|
||||||
|
// When loading HLEs, we need to relocate imports
|
||||||
|
// This ensures later module loads can see our HLE functions.
|
||||||
|
linker->RelocateAllImports();
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO(Loader, "No HLE available for {} module", mod_name);
|
LOG_INFO(Loader, "No HLE available for {} module", mod_name);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,11 +125,10 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadSharedLibraries() {
|
void RelocateAllImports() {
|
||||||
|
std::scoped_lock lk{mutex};
|
||||||
for (auto& module : m_modules) {
|
for (auto& module : m_modules) {
|
||||||
if (module->IsSharedLib()) {
|
Relocate(module.get());
|
||||||
module->Start(0, nullptr, nullptr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -142,6 +142,14 @@ int main(int argc, char* argv[]) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!gameArgs.empty()) {
|
||||||
|
if (gameArgs.front() == "--") {
|
||||||
|
gameArgs.erase(gameArgs.begin());
|
||||||
|
} else {
|
||||||
|
std::cerr << "Error: unhandled flags\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ---- Apply flags ----
|
// ---- Apply flags ----
|
||||||
if (patchFile)
|
if (patchFile)
|
||||||
|
|||||||
@ -147,7 +147,7 @@ Id ImageAtomicU32CmpSwap(EmitContext& ctx, IR::Inst* inst, u32 handle, Id coords
|
|||||||
const auto& texture = ctx.images[handle & 0xFFFF];
|
const auto& texture = ctx.images[handle & 0xFFFF];
|
||||||
const Id pointer{ctx.OpImageTexelPointer(ctx.image_u32, texture.id, coords, ctx.ConstU32(0U))};
|
const Id pointer{ctx.OpImageTexelPointer(ctx.image_u32, texture.id, coords, ctx.ConstU32(0U))};
|
||||||
const auto [scope, semantics]{AtomicArgs(ctx)};
|
const auto [scope, semantics]{AtomicArgs(ctx)};
|
||||||
return (ctx.*atomic_func)(ctx.F32[1], pointer, scope, semantics, semantics, value, cmp_value);
|
return (ctx.*atomic_func)(ctx.U32[1], pointer, scope, semantics, semantics, value, cmp_value);
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user