linux fix

This commit is contained in:
Jake Jasmin 2024-09-26 09:14:51 -06:00
parent 1d23f40e02
commit 4474f97478
2 changed files with 18 additions and 8 deletions

View file

@ -1063,15 +1063,25 @@ ScePthread PThreadPool::Create(const char* name) {
}
}
auto* ret = new PthreadInternal{};
ret->is_free = false;
ret->is_detached = false;
ret->is_almost_done = false;
ret->attr = nullptr;
#ifdef _WIN64
auto* ret = new PthreadInternal{};
#else
// TODO: Linux specific hack
static u8* hint_address = reinterpret_cast<u8*>(0x7FFFFC000ULL);
auto* ret = reinterpret_cast<PthreadInternal*>(
mmap(hint_address, sizeof(PthreadInternal), PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0));
hint_address += Common::AlignUp(sizeof(PthreadInternal), 4_KB);
#endif
ret->is_free = false;
ret->is_detached = false;
ret->is_almost_done = false;
ret->attr = nullptr;
m_threads.push_back(ret);
m_threads.push_back(ret);
return ret;
return ret;
}
void PS4_SYSV_ABI scePthreadYield() {

View file

@ -295,7 +295,7 @@ TileManager::TileManager(const Vulkan::Instance& instance, Vulkan::Scheduler& sc
.bindingCount = static_cast<u32>(bindings.size()),
.pBindings = bindings.data(),
};
static auto [desc_layout_result, desc_layout] =
auto [desc_layout_result, desc_layout] =
instance.GetDevice().createDescriptorSetLayoutUnique(desc_layout_ci);
ASSERT_MSG(desc_layout_result == vk::Result::eSuccess,
"Failed to create descriptor set layout: {}", vk::to_string(desc_layout_result));