forked from eden-emu/eden
[compat] fix solaris Qt build
This commit is contained in:
parent
ae89b5e1b9
commit
6e661266f2
9 changed files with 55 additions and 30 deletions
|
@ -7,6 +7,11 @@ project(yuzu)
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/externals/cmake-modules")
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
|
||||||
|
# Terrific Solaris pkg shenanigans
|
||||||
|
list(APPEND CMAKE_PREFIX_PATH "/usr/lib/qt/6.6/lib/amd64/cmake")
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "/usr/lib/qt/6.6/lib/amd64/cmake")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
|
set(CPM_SOURCE_CACHE ${CMAKE_SOURCE_DIR}/.cache/cpm)
|
||||||
|
|
||||||
|
|
|
@ -104,6 +104,7 @@ Then type `target remote localhost:1234` and type `c` (for continue) - and then
|
||||||
- `br <expr>`: Set breakpoint at `<expr>`.
|
- `br <expr>`: Set breakpoint at `<expr>`.
|
||||||
- `delete`: Deletes all breakpoints.
|
- `delete`: Deletes all breakpoints.
|
||||||
- `catch throw`: Breakpoint at throw. Can also use `br __cxa_throw`
|
- `catch throw`: Breakpoint at throw. Can also use `br __cxa_throw`
|
||||||
|
- `br _mesa_error`: Break on mesa errors (set environment variable `MESA_DEBUG=1` beforehand), see [MESA_DEBUG](https://mesa-docs.readthedocs.io/en/latest/debugging.html).
|
||||||
|
|
||||||
Expressions can be `variable_names` or `1234` (numbers) or `*var` (dereference of a pointer) or `*(1 + var)` (computed expression).
|
Expressions can be `variable_names` or `1234` (numbers) or `*var` (dereference of a pointer) or `*(1 + var)` (computed expression).
|
||||||
|
|
||||||
|
|
13
docs/build/Solaris.md
vendored
13
docs/build/Solaris.md
vendored
|
@ -87,6 +87,19 @@ export PATH="$PATH:$PWD"
|
||||||
- **Build**: `cmake --build build`.
|
- **Build**: `cmake --build build`.
|
||||||
- **Installing**: `sudo cmake --install build`.
|
- **Installing**: `sudo cmake --install build`.
|
||||||
|
|
||||||
|
### Running
|
||||||
|
|
||||||
|
Default Mesa is a bit outdated, the following environment variables should be set for a smoother experience:
|
||||||
|
```sh
|
||||||
|
export MESA_GL_VERSION_OVERRIDE=4.6
|
||||||
|
export MESA_GLSL_VERSION_OVERRIDE=460
|
||||||
|
export MESA_EXTENSION_MAX_YEAR=2025
|
||||||
|
export MESA_DEBUG=1
|
||||||
|
export MESA_VK_VERSION_OVERRIDE=1.3
|
||||||
|
# Only if nvidia/intel drm drivers cause crashes, will severely hinder performance
|
||||||
|
export LIBGL_ALWAYS_SOFTWARE=1
|
||||||
|
```
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
- Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`).
|
- Modify the generated ffmpeg.make (in build dir) if using multiple threads (base system `make` doesn't use `-j4`, so change for `gmake`).
|
||||||
|
|
|
@ -442,8 +442,7 @@ static int shm_open_anon(int flags, mode_t mode) {
|
||||||
for (char *fill = start; fill < limit; r /= 8)
|
for (char *fill = start; fill < limit; r /= 8)
|
||||||
*fill++ = '0' + (r % 8);
|
*fill++ = '0' + (r % 8);
|
||||||
int fd = shm_open(name, flags, mode);
|
int fd = shm_open(name, flags, mode);
|
||||||
if (fd != -1)
|
if (fd != -1) {
|
||||||
return ([](const char *name, int fd) {
|
|
||||||
if (shm_unlink(name) == -1) {
|
if (shm_unlink(name) == -1) {
|
||||||
int tmp = errno;
|
int tmp = errno;
|
||||||
close(fd);
|
close(fd);
|
||||||
|
@ -451,7 +450,7 @@ static int shm_open_anon(int flags, mode_t mode) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
})(name, fd);
|
}
|
||||||
if (errno != EEXIST)
|
if (errno != EEXIST)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -464,7 +463,6 @@ static int shm_open_anon(int flags, mode_t mode) {
|
||||||
int fd;
|
int fd;
|
||||||
if ((fd = shm_mkstemp(name)) == -1)
|
if ((fd = shm_mkstemp(name)) == -1)
|
||||||
return -1;
|
return -1;
|
||||||
return ([](const char *name, int fd) {
|
|
||||||
if (shm_unlink(name) == -1) {
|
if (shm_unlink(name) == -1) {
|
||||||
int tmp = errno;
|
int tmp = errno;
|
||||||
close(fd);
|
close(fd);
|
||||||
|
@ -472,7 +470,6 @@ static int shm_open_anon(int flags, mode_t mode) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
})(name, fd);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
#include "common/settings.h"
|
#include "common/settings.h"
|
||||||
#include "network/network.h"
|
#include "network/network.h"
|
||||||
|
|
||||||
//#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
#include "web_service/announce_room_json.h"
|
#include "web_service/announce_room_json.h"
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
|
@ -23,13 +23,13 @@ namespace Core {
|
||||||
static constexpr std::chrono::seconds announce_time_interval(15);
|
static constexpr std::chrono::seconds announce_time_interval(15);
|
||||||
|
|
||||||
AnnounceMultiplayerSession::AnnounceMultiplayerSession() {
|
AnnounceMultiplayerSession::AnnounceMultiplayerSession() {
|
||||||
//#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
|
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
|
||||||
Settings::values.eden_username.GetValue(),
|
Settings::values.eden_username.GetValue(),
|
||||||
Settings::values.eden_token.GetValue());
|
Settings::values.eden_token.GetValue());
|
||||||
//#else
|
#else
|
||||||
// backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>();
|
backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>();
|
||||||
//#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
WebService::WebResult AnnounceMultiplayerSession::Register() {
|
WebService::WebResult AnnounceMultiplayerSession::Register() {
|
||||||
|
@ -155,12 +155,13 @@ bool AnnounceMultiplayerSession::IsRunning() const {
|
||||||
|
|
||||||
void AnnounceMultiplayerSession::UpdateCredentials() {
|
void AnnounceMultiplayerSession::UpdateCredentials() {
|
||||||
ASSERT_MSG(!IsRunning(), "Credentials can only be updated when session is not running");
|
ASSERT_MSG(!IsRunning(), "Credentials can only be updated when session is not running");
|
||||||
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
//#ifdef ENABLE_WEB_SERVICE
|
|
||||||
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
|
backend = std::make_unique<WebService::RoomJson>(Settings::values.web_api_url.GetValue(),
|
||||||
Settings::values.eden_username.GetValue(),
|
Settings::values.eden_username.GetValue(),
|
||||||
Settings::values.eden_token.GetValue());
|
Settings::values.eden_token.GetValue());
|
||||||
//#endif
|
#else
|
||||||
|
backend = std::make_unique<AnnounceMultiplayerRoom::NullBackend>();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
|
@ -24,6 +24,8 @@ using namespace Common::Literals;
|
||||||
|
|
||||||
namespace OpenGL {
|
namespace OpenGL {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
// TODO: Needs to explicitly enable ARB_TESSELLATION_SHADER for GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS
|
||||||
constexpr std::array LIMIT_UBOS = {
|
constexpr std::array LIMIT_UBOS = {
|
||||||
GL_MAX_VERTEX_UNIFORM_BLOCKS, GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS,
|
GL_MAX_VERTEX_UNIFORM_BLOCKS, GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS,
|
||||||
GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, GL_MAX_GEOMETRY_UNIFORM_BLOCKS,
|
GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS, GL_MAX_GEOMETRY_UNIFORM_BLOCKS,
|
||||||
|
@ -62,7 +64,7 @@ bool HasExtension(std::span<const std::string_view> extensions, std::string_view
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<u32, Shader::MaxStageTypes> BuildMaxUniformBuffers() noexcept {
|
std::array<u32, Shader::MaxStageTypes> BuildMaxUniformBuffers() noexcept {
|
||||||
std::array<u32, Shader::MaxStageTypes> max;
|
std::array<u32, Shader::MaxStageTypes> max{};
|
||||||
std::ranges::transform(LIMIT_UBOS, max.begin(), &GetInteger<u32>);
|
std::ranges::transform(LIMIT_UBOS, max.begin(), &GetInteger<u32>);
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ size_t StagingBuffers::RequestBuffer(size_t requested_size) {
|
||||||
storage_flags | GL_MAP_PERSISTENT_BIT);
|
storage_flags | GL_MAP_PERSISTENT_BIT);
|
||||||
alloc.map = static_cast<u8*>(glMapNamedBufferRange(alloc.buffer.handle, 0, next_pow2_size,
|
alloc.map = static_cast<u8*>(glMapNamedBufferRange(alloc.buffer.handle, 0, next_pow2_size,
|
||||||
map_flags | GL_MAP_PERSISTENT_BIT));
|
map_flags | GL_MAP_PERSISTENT_BIT));
|
||||||
|
DEBUG_ASSERT(alloc.map != nullptr);
|
||||||
alloc.size = next_pow2_size;
|
alloc.size = next_pow2_size;
|
||||||
allocs.emplace_back(std::move(alloc));
|
allocs.emplace_back(std::move(alloc));
|
||||||
return allocs.size() - 1;
|
return allocs.size() - 1;
|
||||||
|
|
|
@ -492,6 +492,11 @@ if (YUZU_ROOM)
|
||||||
target_link_libraries(yuzu PRIVATE yuzu-room)
|
target_link_libraries(yuzu PRIVATE yuzu-room)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Explicit linking required
|
||||||
|
if (${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
|
||||||
|
target_link_libraries(yuzu PRIVATE X11)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Extra deps
|
# Extra deps
|
||||||
add_subdirectory(externals)
|
add_subdirectory(externals)
|
||||||
target_link_libraries(yuzu PRIVATE QuaZip::QuaZip)
|
target_link_libraries(yuzu PRIVATE QuaZip::QuaZip)
|
||||||
|
|
|
@ -2429,7 +2429,7 @@ void PlayerControlPreview::DrawProJoystick(QPainter& p, const QPointF center, co
|
||||||
1.0 - std::sqrt((offset.x() * offset.x()) + (offset.y() * offset.y())) * 0.1f);
|
1.0 - std::sqrt((offset.x() * offset.x()) + (offset.y() * offset.y())) * 0.1f);
|
||||||
|
|
||||||
const float rotation =
|
const float rotation =
|
||||||
((offset.x() == 0) ? atan(1) * 2 : atan(offset.y() / offset.x())) * (180 / (atan(1) * 4));
|
((offset.x() == 0.f) ? std::atan(1.f) * 2.f : std::atan(offset.y() / offset.x())) * (180.f / (std::atan(1.f) * 4.f));
|
||||||
|
|
||||||
p.save();
|
p.save();
|
||||||
p.translate(offset_center);
|
p.translate(offset_center);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue