mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
Fix compilation with gcc
This commit is contained in:
parent
6019477fcb
commit
9a9006f2b4
16
.github/workflows/rpcsx.yml
vendored
16
.github/workflows/rpcsx.yml
vendored
|
|
@ -25,21 +25,23 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y cmake build-essential libunwind-dev \
|
sudo apt install -y cmake build-essential libunwind-dev \
|
||||||
libglfw3-dev libvulkan-dev vulkan-validationlayers-dev \
|
libglfw3-dev libvulkan-dev vulkan-validationlayers \
|
||||||
libsox-dev
|
libsox-dev
|
||||||
|
echo "deb http://azure.archive.ubuntu.com/ubuntu noble main universe" | sudo tee /etc/apt/sources.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install g++-14
|
||||||
VULKANVER=1.3.259
|
VULKANVER=1.3.259
|
||||||
curl -sSfLo Vulkan-Headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VULKANVER}.tar.gz
|
curl -sSfLo Vulkan-Headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VULKANVER}.tar.gz
|
||||||
tar -xf Vulkan-Headers*.tar.gz
|
tar -xf Vulkan-Headers*.tar.gz
|
||||||
cd Vulkan-Headers*/
|
cd Vulkan-Headers*/
|
||||||
mkdir build && cd build
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_INSTALL_PREFIX=/usr
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
cmake --build build -j$(nproc)
|
||||||
make -j$(nproc)
|
sudo cmake --build build --target install
|
||||||
sudo make install
|
|
||||||
|
|
||||||
- name: Build RPCSX
|
- name: Build RPCSX
|
||||||
run: |
|
run: |
|
||||||
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_INIT="-march=native" && \
|
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_CXX_FLAGS_INIT="-march=native" && \
|
||||||
cmake --build build -j4
|
cmake --build build -j$(nproc)
|
||||||
|
|
||||||
- name: Upload RPCSX
|
- name: Upload RPCSX
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
||||||
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -3,7 +3,7 @@
|
||||||
url = ../../RPCSX/xbyak.git
|
url = ../../RPCSX/xbyak.git
|
||||||
[submodule "3rdparty/SPIRV-Tools"]
|
[submodule "3rdparty/SPIRV-Tools"]
|
||||||
path = 3rdparty/SPIRV-Tools
|
path = 3rdparty/SPIRV-Tools
|
||||||
url = ../../KhronosGroup/SPIRV-Tools.git
|
url = ../../RPCSX/SPIRV-Tools.git
|
||||||
[submodule "3rdparty/SPIRV-Headers"]
|
[submodule "3rdparty/SPIRV-Headers"]
|
||||||
path = 3rdparty/SPIRV-Headers
|
path = 3rdparty/SPIRV-Headers
|
||||||
url = ../../KhronosGroup/SPIRV-Headers.git
|
url = ../../KhronosGroup/SPIRV-Headers.git
|
||||||
|
|
|
||||||
32
3rdparty/CMakeLists.txt
vendored
32
3rdparty/CMakeLists.txt
vendored
|
|
@ -13,28 +13,32 @@ if(NOT SPIRV-Tools-opt_FOUND)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT SPIRV-Cross_FOUND)
|
if(NOT SPIRV-Cross_FOUND)
|
||||||
set(SPIRV_CROSS_SHARED on)
|
option(SPIRV_CROSS_SHARED "" on)
|
||||||
set(SPIRV_CROSS_STATIC on)
|
option(SPIRV_CROSS_STATIC "" on)
|
||||||
set(SPIRV_CROSS_ENABLE_GLSL on)
|
option(SPIRV_CROSS_ENABLE_GLSL "" on)
|
||||||
set(SPIRV_CROSS_ENABLE_HLSL off)
|
option(SPIRV_CROSS_ENABLE_HLSL "" off)
|
||||||
set(SPIRV_CROSS_ENABLE_MSL off)
|
option(SPIRV_CROSS_ENABLE_MSL "" off)
|
||||||
set(SPIRV_CROSS_ENABLE_CPP off)
|
option(SPIRV_CROSS_ENABLE_CPP "" off)
|
||||||
set(SPIRV_CROSS_ENABLE_REFLECT off)
|
option(SPIRV_CROSS_ENABLE_REFLECT "" off)
|
||||||
set(SPIRV_CROSS_ENABLE_C_API off)
|
option(SPIRV_CROSS_ENABLE_C_API "" off)
|
||||||
set(SPIRV_CROSS_ENABLE_UTIL off)
|
option(SPIRV_CROSS_ENABLE_UTIL "" off)
|
||||||
set(SPIRV_CROSS_CLI off)
|
option(SPIRV_CROSS_CLI "" off)
|
||||||
set(SPIRV_CROSS_ENABLE_TESTS off)
|
option(SPIRV_CROSS_ENABLE_TESTS "" off)
|
||||||
set(SPIRV_CROSS_SKIP_INSTALL on)
|
option(SPIRV_CROSS_SKIP_INSTALL "" on)
|
||||||
add_subdirectory(SPIRV-Cross)
|
add_subdirectory(SPIRV-Cross)
|
||||||
|
|
||||||
|
install(TARGETS spirv-cross-c-shared LIBRARY DESTINATION bin)
|
||||||
|
set_target_properties(spirv-cross-c-shared PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT glslang_FOUND)
|
# if(NOT glslang_FOUND)
|
||||||
add_subdirectory(glslang)
|
add_subdirectory(glslang)
|
||||||
if(NOT TARGET glslang::glslang-standalone)
|
if(NOT TARGET glslang::glslang-standalone)
|
||||||
add_executable(glslang::glslang-standalone ALIAS glslang-standalone)
|
add_executable(glslang::glslang-standalone ALIAS glslang-standalone)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
# endif()
|
||||||
|
|
||||||
if(NOT nlohmann_json_FOUND)
|
if(NOT nlohmann_json_FOUND)
|
||||||
add_subdirectory(json)
|
add_subdirectory(json)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
2
3rdparty/SPIRV-Cross
vendored
2
3rdparty/SPIRV-Cross
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit 6a1fb66eef1bdca14acf7d0a51a3f883499d79f0
|
Subproject commit f84c1fbe3cbb69fa99e9115f658e52df0e95f1bf
|
||||||
2
3rdparty/SPIRV-Tools
vendored
2
3rdparty/SPIRV-Tools
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit b21dda0ee7a3ea4e0192a7b2b09db1df1de9d5e7
|
Subproject commit dafc684588304bdf3b745457fd517ec8f2edc3c6
|
||||||
|
|
@ -49,4 +49,3 @@ amdgpu::Registers::Context amdgpu::Registers::Context::Default = [] {
|
||||||
result.vgtOutDeallocCntl = 0x10;
|
result.vgtOutDeallocCntl = 0x10;
|
||||||
return result;
|
return result;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -928,4 +928,4 @@ struct Registers {
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
} // namespace amdgpu
|
} // namespace amdgpu
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <gnm/constants.hpp>
|
#include <gnm/constants.hpp>
|
||||||
#include <gnm/descriptors.hpp>
|
#include <gnm/descriptors.hpp>
|
||||||
|
#include <bit>
|
||||||
|
|
||||||
namespace amdgpu {
|
namespace amdgpu {
|
||||||
inline constexpr uint32_t kMicroTileWidth = 8;
|
inline constexpr uint32_t kMicroTileWidth = 8;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#include "gnm/constants.hpp"
|
#include "gnm/constants.hpp"
|
||||||
#include <amdgpu/tiler.hpp>
|
#include <amdgpu/tiler.hpp>
|
||||||
#include <gnm/gnm.hpp>
|
|
||||||
#include <bit>
|
#include <bit>
|
||||||
|
#include <gnm/gnm.hpp>
|
||||||
|
|
||||||
using namespace amdgpu;
|
using namespace amdgpu;
|
||||||
|
|
||||||
static constexpr SurfaceInfo
|
static SurfaceInfo
|
||||||
computeTexture1dInfo(ArrayMode arrayMode, gnm::TextureType type,
|
computeTexture1dInfo(ArrayMode arrayMode, gnm::TextureType type,
|
||||||
gnm::DataFormat dfmt, std::uint32_t width,
|
gnm::DataFormat dfmt, std::uint32_t width,
|
||||||
std::uint32_t height, std::uint32_t depth,
|
std::uint32_t height, std::uint32_t depth,
|
||||||
|
|
@ -167,7 +167,7 @@ computeTexture1dInfo(ArrayMode arrayMode, gnm::TextureType type,
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr SurfaceInfo computeTextureLinearInfo(
|
static SurfaceInfo computeTextureLinearInfo(
|
||||||
ArrayMode arrayMode, gnm::TextureType type, gnm::DataFormat dfmt,
|
ArrayMode arrayMode, gnm::TextureType type, gnm::DataFormat dfmt,
|
||||||
std::uint32_t width, std::uint32_t height, std::uint32_t depth,
|
std::uint32_t width, std::uint32_t height, std::uint32_t depth,
|
||||||
std::uint32_t pitch, int baseArrayLayer, int arrayCount, int baseMipLevel,
|
std::uint32_t pitch, int baseArrayLayer, int arrayCount, int baseMipLevel,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ constexpr int getTexelsPerElement(gnm::DataFormat dfmt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int getBitsPerElement(DataFormat dfmt) {
|
constexpr int getBitsPerElement(DataFormat dfmt) {
|
||||||
switch (dfmt) {
|
switch (dfmt) {
|
||||||
case kDataFormatInvalid:
|
case kDataFormatInvalid:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue