mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 18:04:56 +00:00
shader_recompiler: Implement most integer image atomics, workgroup barriers and shared memory load/store (#231)
* shader_recompiler: Add LDEXP * shader_recompiler: Add most image integer atomic ops * shader_recompiler: Implement shared memory load/store * shader_recompiler: More image atomics * externals: Update sirit * clang format * cmake: Add missing files * shader_recompiler: Fix some atomic bugs * shader_recompiler: Vs outputs * shader_recompiler: Shared mem has side-effects, fix format component order * shader_recompiler: Inline constant buffer impl * video_core: Fix regressions * Work * Fixup a few things
This commit is contained in:
parent
af3bbc33e9
commit
6ceab6dfac
69 changed files with 1597 additions and 310 deletions
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <algorithm>
|
||||
#include "common/string_util.h"
|
||||
#include "core/file_sys/fs.h"
|
||||
|
||||
namespace Core::FileSys {
|
||||
|
@ -13,6 +14,7 @@ void MntPoints::Mount(const std::filesystem::path& host_folder, const std::strin
|
|||
|
||||
MntPair pair;
|
||||
pair.host_path = host_folder.string();
|
||||
std::replace(pair.host_path.begin(), pair.host_path.end(), '\\', '/');
|
||||
pair.guest_path = guest_folder;
|
||||
|
||||
m_mnt_pairs.push_back(pair);
|
||||
|
@ -46,11 +48,24 @@ std::string MntPoints::GetHostFile(const std::string& guest_file) {
|
|||
for (auto& pair : m_mnt_pairs) {
|
||||
// horrible code but it works :D
|
||||
int find = guest_file.find(pair.guest_path);
|
||||
if (find == 0) {
|
||||
std::string npath = guest_file.substr(pair.guest_path.size(), guest_file.size() - 1);
|
||||
std::replace(pair.host_path.begin(), pair.host_path.end(), '\\', '/');
|
||||
return pair.host_path + npath;
|
||||
if (find != 0) {
|
||||
continue;
|
||||
}
|
||||
std::string npath = guest_file.substr(pair.guest_path.size(), guest_file.size() - 1);
|
||||
const auto host_path = pair.host_path + npath;
|
||||
#ifndef _WIN64
|
||||
const std::filesystem::path path{host_path};
|
||||
if (!std::filesystem::exists(path)) {
|
||||
const auto filename = Common::ToLower(path.filename());
|
||||
for (const auto& file : std::filesystem::directory_iterator(path.parent_path())) {
|
||||
const auto exist_filename = Common::ToLower(file.path().filename());
|
||||
if (filename == exist_filename) {
|
||||
return file.path();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return host_path;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue