mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-24 19:14:40 +00:00
Merge branch 'vk_device_autoselect' of github.com:psucien/shadPS4 into vk_device_autoselect
This commit is contained in:
commit
5c778723cb
@ -10,7 +10,7 @@ if grep -nrI '\s$' src *.yml *.txt *.md Doxyfile .gitignore .gitmodules .ci* dis
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Default clang-format points to default 3.5 version one
|
# Default clang-format points to default 3.5 version one
|
||||||
CLANG_FORMAT=clang-format-15
|
CLANG_FORMAT=clang-format-17
|
||||||
$CLANG_FORMAT --version
|
$CLANG_FORMAT --version
|
||||||
|
|
||||||
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
|
||||||
|
6
.github/workflows/format.yml
vendored
6
.github/workflows/format.yml
vendored
@ -17,7 +17,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Install
|
- name: Install
|
||||||
run: sudo apt-get install clang-format-15
|
run: |
|
||||||
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
|
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main'
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install clang-format-17
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}
|
||||||
|
@ -37,7 +37,7 @@ endfunction()
|
|||||||
# against all the src files. This should be used before making a pull request.
|
# against all the src files. This should be used before making a pull request.
|
||||||
# =======================================================================
|
# =======================================================================
|
||||||
|
|
||||||
set(CLANG_FORMAT_POSTFIX "-15")
|
set(CLANG_FORMAT_POSTFIX "-17")
|
||||||
find_program(CLANG_FORMAT
|
find_program(CLANG_FORMAT
|
||||||
NAMES clang-format${CLANG_FORMAT_POSTFIX}
|
NAMES clang-format${CLANG_FORMAT_POSTFIX}
|
||||||
clang-format
|
clang-format
|
||||||
|
@ -52,15 +52,13 @@ Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index)
|
|||||||
for (auto const& physical : physical_devices) {
|
for (auto const& physical : physical_devices) {
|
||||||
properties2.emplace_back(properties2.size(), physical.getProperties2());
|
properties2.emplace_back(properties2.size(), physical.getProperties2());
|
||||||
}
|
}
|
||||||
std::sort(properties2.begin(), properties2.end(),
|
std::sort(properties2.begin(), properties2.end(), [](const auto& left, const auto& right) {
|
||||||
[](const auto& left, const auto& right) {
|
if (std::get<1>(left).properties.deviceType ==
|
||||||
if (std::get<1>(left).properties.deviceType ==
|
std::get<1>(right).properties.deviceType) {
|
||||||
std::get<1>(right).properties.deviceType) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
return std::get<1>(left).properties.deviceType == vk::PhysicalDeviceType::eDiscreteGpu;
|
||||||
return std::get<1>(left).properties.deviceType ==
|
});
|
||||||
vk::PhysicalDeviceType::eDiscreteGpu;
|
|
||||||
});
|
|
||||||
physical_device = physical_devices[std::get<0>(properties2[0])];
|
physical_device = physical_devices[std::get<0>(properties2[0])];
|
||||||
} else {
|
} else {
|
||||||
ASSERT_MSG(physical_device_index < num_physical_devices,
|
ASSERT_MSG(physical_device_index < num_physical_devices,
|
||||||
|
Loading…
Reference in New Issue
Block a user