Compare commits
29 Commits
__refs_pul
...
__refs_pul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
437cd1dd0f | ||
|
|
207240414d | ||
|
|
0be8ce5c54 | ||
|
|
5f0a916af4 | ||
|
|
5d7c0d5e70 | ||
|
|
d75d845c6c | ||
|
|
14dee96cb0 | ||
|
|
a90a608261 | ||
|
|
57b00fcb29 | ||
|
|
b1ca59f95d | ||
|
|
5a84eb5836 | ||
|
|
cc1cf02779 | ||
|
|
7c21395a95 | ||
|
|
6a88ae713a | ||
|
|
9671bfb8e1 | ||
|
|
ddea13570f | ||
|
|
9c850124b7 | ||
|
|
9de9ad3023 | ||
|
|
ae534e0585 | ||
|
|
20f1de42bc | ||
|
|
0f52cc13f7 | ||
|
|
4bc31ea849 | ||
|
|
27a0000e2f | ||
|
|
40cfdc424e | ||
|
|
c6a9039e94 | ||
|
|
12d78ed65b | ||
|
|
e8174032d9 | ||
|
|
b634f554fc | ||
|
|
0ab76cacb5 |
@@ -113,6 +113,9 @@ if (NOT DEFINED ARCHITECTURE)
|
||||
endif()
|
||||
message(STATUS "Target architecture: ${ARCHITECTURE}")
|
||||
|
||||
if (UNIX)
|
||||
add_definitions(-DYUZU_UNIX=1)
|
||||
endif()
|
||||
|
||||
# Configure C++ standard
|
||||
# ===========================
|
||||
|
||||
@@ -67,6 +67,7 @@ else()
|
||||
-Wmissing-declarations
|
||||
-Wno-attributes
|
||||
-Wno-unused-parameter
|
||||
-Wno-invalid-offsetof
|
||||
)
|
||||
|
||||
# TODO: Remove when we update to a GCC compiler that enables this
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
const std::array<float, AudioCommon::MAX_MIX_BUFFERS>& GetLastMixVolume() const;
|
||||
|
||||
private:
|
||||
s32 id{};
|
||||
[[maybe_unused]] s32 id{};
|
||||
std::array<float, AudioCommon::MAX_MIX_BUFFERS> mix_volume{};
|
||||
std::array<float, AudioCommon::MAX_MIX_BUFFERS> last_mix_volume{};
|
||||
bool in_use{};
|
||||
|
||||
@@ -211,9 +211,4 @@ create_target_directory_groups(common)
|
||||
find_package(Boost 1.71 COMPONENTS context headers REQUIRED)
|
||||
|
||||
target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile)
|
||||
target_link_libraries(common PRIVATE lz4::lz4 xbyak)
|
||||
if (MSVC)
|
||||
target_link_libraries(common PRIVATE zstd::zstd)
|
||||
else()
|
||||
target_link_libraries(common PRIVATE zstd)
|
||||
endif()
|
||||
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd xbyak)
|
||||
|
||||
@@ -54,8 +54,9 @@ assert_noinline_call(const Fn& fn) {
|
||||
#define DEBUG_ASSERT_MSG(_a_, _desc_, ...)
|
||||
#endif
|
||||
|
||||
#define UNIMPLEMENTED() ASSERT_MSG(false, "Unimplemented code!")
|
||||
#define UNIMPLEMENTED_MSG(...) ASSERT_MSG(false, __VA_ARGS__)
|
||||
#define UNIMPLEMENTED() assert_noinline_call([] { LOG_CRITICAL(Debug, "Unimplemented code!"); })
|
||||
#define UNIMPLEMENTED_MSG(...) \
|
||||
assert_noinline_call([&] { LOG_CRITICAL(Debug, "Unimplemented code!\n" __VA_ARGS__); })
|
||||
|
||||
#define UNIMPLEMENTED_IF(cond) ASSERT_MSG(!(cond), "Unimplemented code!")
|
||||
#define UNIMPLEMENTED_IF_MSG(cond, ...) ASSERT_MSG(!(cond), __VA_ARGS__)
|
||||
|
||||
@@ -38,8 +38,8 @@ public:
|
||||
Fiber(const Fiber&) = delete;
|
||||
Fiber& operator=(const Fiber&) = delete;
|
||||
|
||||
Fiber(Fiber&&) = default;
|
||||
Fiber& operator=(Fiber&&) = default;
|
||||
Fiber(Fiber&&) = delete;
|
||||
Fiber& operator=(Fiber&&) = delete;
|
||||
|
||||
/// Yields control from Fiber 'from' to Fiber 'to'
|
||||
/// Fiber 'from' must be the currently running fiber.
|
||||
|
||||
@@ -71,13 +71,6 @@ public:
|
||||
}
|
||||
|
||||
void ExceptionRaised(u32 pc, Dynarmic::A32::Exception exception) override {
|
||||
switch (exception) {
|
||||
case Dynarmic::A32::Exception::UndefinedInstruction:
|
||||
case Dynarmic::A32::Exception::UnpredictableInstruction:
|
||||
break;
|
||||
case Dynarmic::A32::Exception::Breakpoint:
|
||||
break;
|
||||
}
|
||||
LOG_CRITICAL(Core_ARM, "ExceptionRaised(exception = {}, pc = {:08X}, code = {:08X})",
|
||||
static_cast<std::size_t>(exception), pc, MemoryReadCode(pc));
|
||||
UNIMPLEMENTED();
|
||||
|
||||
@@ -133,8 +133,9 @@ VirtualFile RealVfsFilesystem::MoveFile(std::string_view old_path_, std::string_
|
||||
}
|
||||
|
||||
cache.erase(old_path);
|
||||
file->Open(new_path, "r+b");
|
||||
cache.insert_or_assign(new_path, std::move(file));
|
||||
if (file->Open(new_path, "r+b")) {
|
||||
cache.insert_or_assign(new_path, std::move(file));
|
||||
}
|
||||
} else {
|
||||
UNREACHABLE();
|
||||
return nullptr;
|
||||
@@ -214,9 +215,10 @@ VirtualDir RealVfsFilesystem::MoveDirectory(std::string_view old_path_,
|
||||
}
|
||||
|
||||
auto file = cached.lock();
|
||||
file->Open(file_new_path, "r+b");
|
||||
cache.erase(file_old_path);
|
||||
cache.insert_or_assign(std::move(file_new_path), std::move(file));
|
||||
if (file->Open(file_new_path, "r+b")) {
|
||||
cache.insert_or_assign(std::move(file_new_path), std::move(file));
|
||||
}
|
||||
}
|
||||
|
||||
return OpenDirectory(new_path, Mode::ReadWrite);
|
||||
|
||||
@@ -166,8 +166,23 @@ public:
|
||||
ValidateHeader();
|
||||
}
|
||||
|
||||
void PushImpl(s8 value);
|
||||
void PushImpl(s16 value);
|
||||
void PushImpl(s32 value);
|
||||
void PushImpl(s64 value);
|
||||
void PushImpl(u8 value);
|
||||
void PushImpl(u16 value);
|
||||
void PushImpl(u32 value);
|
||||
void PushImpl(u64 value);
|
||||
void PushImpl(float value);
|
||||
void PushImpl(double value);
|
||||
void PushImpl(bool value);
|
||||
void PushImpl(ResultCode value);
|
||||
|
||||
template <typename T>
|
||||
void Push(T value);
|
||||
void Push(T value) {
|
||||
return PushImpl(value);
|
||||
}
|
||||
|
||||
template <typename First, typename... Other>
|
||||
void Push(const First& first_value, const Other&... other_values);
|
||||
@@ -215,13 +230,11 @@ private:
|
||||
|
||||
/// Push ///
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(s32 value) {
|
||||
inline void ResponseBuilder::PushImpl(s32 value) {
|
||||
cmdbuf[index++] = static_cast<u32>(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(u32 value) {
|
||||
inline void ResponseBuilder::PushImpl(u32 value) {
|
||||
cmdbuf[index++] = value;
|
||||
}
|
||||
|
||||
@@ -233,62 +246,52 @@ void ResponseBuilder::PushRaw(const T& value) {
|
||||
index += (sizeof(T) + 3) / 4; // round up to word length
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(ResultCode value) {
|
||||
inline void ResponseBuilder::PushImpl(ResultCode value) {
|
||||
// Result codes are actually 64-bit in the IPC buffer, but only the high part is discarded.
|
||||
Push(value.raw);
|
||||
Push<u32>(0);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(s8 value) {
|
||||
inline void ResponseBuilder::PushImpl(s8 value) {
|
||||
PushRaw(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(s16 value) {
|
||||
inline void ResponseBuilder::PushImpl(s16 value) {
|
||||
PushRaw(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(s64 value) {
|
||||
Push(static_cast<u32>(value));
|
||||
Push(static_cast<u32>(value >> 32));
|
||||
inline void ResponseBuilder::PushImpl(s64 value) {
|
||||
PushImpl(static_cast<u32>(value));
|
||||
PushImpl(static_cast<u32>(value >> 32));
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(u8 value) {
|
||||
inline void ResponseBuilder::PushImpl(u8 value) {
|
||||
PushRaw(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(u16 value) {
|
||||
inline void ResponseBuilder::PushImpl(u16 value) {
|
||||
PushRaw(value);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(u64 value) {
|
||||
Push(static_cast<u32>(value));
|
||||
Push(static_cast<u32>(value >> 32));
|
||||
inline void ResponseBuilder::PushImpl(u64 value) {
|
||||
PushImpl(static_cast<u32>(value));
|
||||
PushImpl(static_cast<u32>(value >> 32));
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(float value) {
|
||||
inline void ResponseBuilder::PushImpl(float value) {
|
||||
u32 integral;
|
||||
std::memcpy(&integral, &value, sizeof(u32));
|
||||
Push(integral);
|
||||
PushImpl(integral);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(double value) {
|
||||
inline void ResponseBuilder::PushImpl(double value) {
|
||||
u64 integral;
|
||||
std::memcpy(&integral, &value, sizeof(u64));
|
||||
Push(integral);
|
||||
PushImpl(integral);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void ResponseBuilder::Push(bool value) {
|
||||
Push(static_cast<u8>(value));
|
||||
inline void ResponseBuilder::PushImpl(bool value) {
|
||||
PushImpl(static_cast<u8>(value));
|
||||
}
|
||||
|
||||
template <typename First, typename... Other>
|
||||
|
||||
@@ -57,8 +57,8 @@ public:
|
||||
private:
|
||||
void MergeAdjacent(iterator it, iterator& next_it);
|
||||
|
||||
const VAddr start_addr;
|
||||
const VAddr end_addr;
|
||||
[[maybe_unused]] const VAddr start_addr;
|
||||
[[maybe_unused]] const VAddr end_addr;
|
||||
|
||||
MemoryBlockTree memory_block_tree;
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
PhysicalCore& operator=(const PhysicalCore&) = delete;
|
||||
|
||||
PhysicalCore(PhysicalCore&&) = default;
|
||||
PhysicalCore& operator=(PhysicalCore&&) = default;
|
||||
PhysicalCore& operator=(PhysicalCore&&) = delete;
|
||||
|
||||
void Idle();
|
||||
/// Interrupt this physical core.
|
||||
|
||||
@@ -41,11 +41,10 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor(
|
||||
Handle event_handle = InvalidHandle;
|
||||
{
|
||||
SchedulerLockAndSleep lock(kernel, event_handle, thread, nano_seconds);
|
||||
const auto itr =
|
||||
std::find_if(sync_objects.begin(), sync_objects.end(),
|
||||
[thread](const std::shared_ptr<SynchronizationObject>& object) {
|
||||
return object->IsSignaled();
|
||||
});
|
||||
const auto itr = std::find_if(sync_objects.begin(), sync_objects.end(),
|
||||
[](const std::shared_ptr<SynchronizationObject>& object) {
|
||||
return object->IsSignaled();
|
||||
});
|
||||
|
||||
if (itr != sync_objects.end()) {
|
||||
// We found a ready object, acquire it and set the result value
|
||||
|
||||
@@ -310,7 +310,7 @@ private:
|
||||
void GetPopFromGeneralChannelEvent(Kernel::HLERequestContext& ctx);
|
||||
|
||||
Kernel::EventPair pop_from_general_channel_event;
|
||||
Kernel::KernelCore& kernel;
|
||||
[[maybe_unused]] Kernel::KernelCore& kernel;
|
||||
};
|
||||
|
||||
class IGlobalStateController final : public ServiceFramework<IGlobalStateController> {
|
||||
|
||||
@@ -211,7 +211,6 @@ void Controller::Execute() {
|
||||
case ControllerSupportMode::ShowControllerFirmwareUpdate:
|
||||
UNIMPLEMENTED_MSG("ControllerSupportMode={} is not implemented",
|
||||
controller_private_arg.mode);
|
||||
[[fallthrough]];
|
||||
default: {
|
||||
ConfigurationComplete();
|
||||
break;
|
||||
|
||||
@@ -483,7 +483,7 @@ Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global,
|
||||
global = json["global"].get<std::string>();
|
||||
|
||||
if (json["games"].is_array()) {
|
||||
for (const auto object : json["games"]) {
|
||||
for (const auto& object : json["games"]) {
|
||||
if (object.is_object() && object.find("name") != object.end()) {
|
||||
EventStatus detail{};
|
||||
if (object["header"].is_string()) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
FileSys::StorageId storage;
|
||||
[[maybe_unused]] FileSys::StorageId storage;
|
||||
};
|
||||
|
||||
class IRegisteredLocationResolver final : public ServiceFramework<IRegisteredLocationResolver> {
|
||||
|
||||
@@ -217,7 +217,7 @@ private:
|
||||
const auto& amiibo = nfp_interface.GetAmiiboBuffer();
|
||||
const TagInfo tag_info{
|
||||
.uuid = amiibo.uuid,
|
||||
.uuid_length = static_cast<u8>(tag_info.uuid.size()),
|
||||
.uuid_length = static_cast<u8>(amiibo.uuid.size()),
|
||||
.padding_1 = {},
|
||||
.protocol = 1, // TODO(ogniK): Figure out actual values
|
||||
.tag_type = 2,
|
||||
|
||||
@@ -18,38 +18,6 @@ public:
|
||||
explicit nvhost_nvdec_common(Core::System& system, std::shared_ptr<nvmap> nvmap_dev);
|
||||
~nvhost_nvdec_common() override;
|
||||
|
||||
/**
|
||||
* Handles an ioctl1 request.
|
||||
* @param command The ioctl command id.
|
||||
* @param input A buffer containing the input data for the ioctl.
|
||||
* @param output A buffer where the output data will be written to.
|
||||
* @returns The result code of the ioctl.
|
||||
*/
|
||||
virtual NvResult Ioctl1(Ioctl command, const std::vector<u8>& input,
|
||||
std::vector<u8>& output) = 0;
|
||||
|
||||
/**
|
||||
* Handles an ioctl2 request.
|
||||
* @param command The ioctl command id.
|
||||
* @param input A buffer containing the input data for the ioctl.
|
||||
* @param inline_input A buffer containing the input data for the ioctl which has been inlined.
|
||||
* @param output A buffer where the output data will be written to.
|
||||
* @returns The result code of the ioctl.
|
||||
*/
|
||||
virtual NvResult Ioctl2(Ioctl command, const std::vector<u8>& input,
|
||||
const std::vector<u8>& inline_input, std::vector<u8>& output) = 0;
|
||||
|
||||
/**
|
||||
* Handles an ioctl3 request.
|
||||
* @param command The ioctl command id.
|
||||
* @param input A buffer containing the input data for the ioctl.
|
||||
* @param output A buffer where the output data will be written to.
|
||||
* @param inline_output A buffer where the inlined output data will be written to.
|
||||
* @returns The result code of the ioctl.
|
||||
*/
|
||||
virtual NvResult Ioctl3(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output,
|
||||
std::vector<u8>& inline_output) = 0;
|
||||
|
||||
protected:
|
||||
class BufferMap final {
|
||||
public:
|
||||
|
||||
@@ -158,9 +158,10 @@ u32 BufferQueue::Query(QueryType type) {
|
||||
switch (type) {
|
||||
case QueryType::NativeWindowFormat:
|
||||
return static_cast<u32>(PixelFormat::RGBA8888);
|
||||
default:
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
UNIMPLEMENTED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -489,18 +489,18 @@ std::pair<s32, Errno> BSD::PollImpl(std::vector<u8>& write_buffer, std::vector<u
|
||||
}
|
||||
|
||||
for (PollFD& pollfd : fds) {
|
||||
ASSERT(pollfd.revents == 0);
|
||||
ASSERT(False(pollfd.revents));
|
||||
|
||||
if (pollfd.fd > static_cast<s32>(MAX_FD) || pollfd.fd < 0) {
|
||||
LOG_ERROR(Service, "File descriptor handle={} is invalid", pollfd.fd);
|
||||
pollfd.revents = 0;
|
||||
pollfd.revents = PollEvents{};
|
||||
return {0, Errno::SUCCESS};
|
||||
}
|
||||
|
||||
const std::optional<FileDescriptor>& descriptor = file_descriptors[pollfd.fd];
|
||||
if (!descriptor) {
|
||||
LOG_ERROR(Service, "File descriptor handle={} is not allocated", pollfd.fd);
|
||||
pollfd.revents = POLL_NVAL;
|
||||
pollfd.revents = PollEvents::NVAL;
|
||||
return {0, Errno::SUCCESS};
|
||||
}
|
||||
}
|
||||
@@ -510,7 +510,7 @@ std::pair<s32, Errno> BSD::PollImpl(std::vector<u8>& write_buffer, std::vector<u
|
||||
Network::PollFD result;
|
||||
result.socket = file_descriptors[pollfd.fd]->socket.get();
|
||||
result.events = TranslatePollEventsToHost(pollfd.events);
|
||||
result.revents = 0;
|
||||
result.revents = Network::PollEvents{};
|
||||
return result;
|
||||
});
|
||||
|
||||
|
||||
@@ -69,10 +69,21 @@ struct SockAddrIn {
|
||||
std::array<u8, 8> zeroes;
|
||||
};
|
||||
|
||||
enum class PollEvents : u16 {
|
||||
IN = 1 << 0,
|
||||
PRI = 1 << 1,
|
||||
OUT = 1 << 2,
|
||||
ERR = 1 << 3,
|
||||
HUP = 1 << 4,
|
||||
NVAL = 1 << 5,
|
||||
};
|
||||
|
||||
DECLARE_ENUM_FLAG_OPERATORS(PollEvents);
|
||||
|
||||
struct PollFD {
|
||||
s32 fd;
|
||||
u16 events;
|
||||
u16 revents;
|
||||
PollEvents events;
|
||||
PollEvents revents;
|
||||
};
|
||||
|
||||
struct Linger {
|
||||
@@ -80,13 +91,6 @@ struct Linger {
|
||||
u32 linger;
|
||||
};
|
||||
|
||||
constexpr u16 POLL_IN = 0x01;
|
||||
constexpr u16 POLL_PRI = 0x02;
|
||||
constexpr u16 POLL_OUT = 0x04;
|
||||
constexpr u16 POLL_ERR = 0x08;
|
||||
constexpr u16 POLL_HUP = 0x10;
|
||||
constexpr u16 POLL_NVAL = 0x20;
|
||||
|
||||
constexpr u32 FLAG_MSG_DONTWAIT = 0x80;
|
||||
|
||||
constexpr u32 FLAG_O_NONBLOCK = 0x800;
|
||||
|
||||
@@ -89,43 +89,43 @@ Network::Protocol Translate(Type type, Protocol protocol) {
|
||||
}
|
||||
}
|
||||
|
||||
u16 TranslatePollEventsToHost(u32 flags) {
|
||||
u32 result = 0;
|
||||
const auto translate = [&result, &flags](u32 from, u32 to) {
|
||||
if ((flags & from) != 0) {
|
||||
Network::PollEvents TranslatePollEventsToHost(PollEvents flags) {
|
||||
Network::PollEvents result{};
|
||||
const auto translate = [&result, &flags](PollEvents from, Network::PollEvents to) {
|
||||
if (True(flags & from)) {
|
||||
flags &= ~from;
|
||||
result |= to;
|
||||
}
|
||||
};
|
||||
translate(POLL_IN, Network::POLL_IN);
|
||||
translate(POLL_PRI, Network::POLL_PRI);
|
||||
translate(POLL_OUT, Network::POLL_OUT);
|
||||
translate(POLL_ERR, Network::POLL_ERR);
|
||||
translate(POLL_HUP, Network::POLL_HUP);
|
||||
translate(POLL_NVAL, Network::POLL_NVAL);
|
||||
translate(PollEvents::IN, Network::PollEvents::IN);
|
||||
translate(PollEvents::PRI, Network::PollEvents::PRI);
|
||||
translate(PollEvents::OUT, Network::PollEvents::OUT);
|
||||
translate(PollEvents::ERR, Network::PollEvents::ERR);
|
||||
translate(PollEvents::HUP, Network::PollEvents::HUP);
|
||||
translate(PollEvents::NVAL, Network::PollEvents::NVAL);
|
||||
|
||||
UNIMPLEMENTED_IF_MSG(flags != 0, "Unimplemented flags={}", flags);
|
||||
return static_cast<u16>(result);
|
||||
UNIMPLEMENTED_IF_MSG((u16)flags != 0, "Unimplemented flags={}", (u16)flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
u16 TranslatePollEventsToGuest(u32 flags) {
|
||||
u32 result = 0;
|
||||
const auto translate = [&result, &flags](u32 from, u32 to) {
|
||||
if ((flags & from) != 0) {
|
||||
PollEvents TranslatePollEventsToGuest(Network::PollEvents flags) {
|
||||
PollEvents result{};
|
||||
const auto translate = [&result, &flags](Network::PollEvents from, PollEvents to) {
|
||||
if (True(flags & from)) {
|
||||
flags &= ~from;
|
||||
result |= to;
|
||||
}
|
||||
};
|
||||
|
||||
translate(Network::POLL_IN, POLL_IN);
|
||||
translate(Network::POLL_PRI, POLL_PRI);
|
||||
translate(Network::POLL_OUT, POLL_OUT);
|
||||
translate(Network::POLL_ERR, POLL_ERR);
|
||||
translate(Network::POLL_HUP, POLL_HUP);
|
||||
translate(Network::POLL_NVAL, POLL_NVAL);
|
||||
translate(Network::PollEvents::IN, PollEvents::IN);
|
||||
translate(Network::PollEvents::PRI, PollEvents::PRI);
|
||||
translate(Network::PollEvents::OUT, PollEvents::OUT);
|
||||
translate(Network::PollEvents::ERR, PollEvents::ERR);
|
||||
translate(Network::PollEvents::HUP, PollEvents::HUP);
|
||||
translate(Network::PollEvents::NVAL, PollEvents::NVAL);
|
||||
|
||||
UNIMPLEMENTED_IF_MSG(flags != 0, "Unimplemented flags={}", flags);
|
||||
return static_cast<u16>(result);
|
||||
UNIMPLEMENTED_IF_MSG((u16)flags != 0, "Unimplemented flags={}", (u16)flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
Network::SockAddrIn Translate(SockAddrIn value) {
|
||||
|
||||
@@ -31,10 +31,10 @@ Network::Type Translate(Type type);
|
||||
Network::Protocol Translate(Type type, Protocol protocol);
|
||||
|
||||
/// Translate abstract poll event flags to guest poll event flags
|
||||
u16 TranslatePollEventsToHost(u32 flags);
|
||||
Network::PollEvents TranslatePollEventsToHost(PollEvents flags);
|
||||
|
||||
/// Translate guest poll event flags to abstract poll event flags
|
||||
u16 TranslatePollEventsToGuest(u32 flags);
|
||||
PollEvents TranslatePollEventsToGuest(Network::PollEvents flags);
|
||||
|
||||
/// Translate guest socket address structure to abstract socket address structure
|
||||
Network::SockAddrIn Translate(SockAddrIn value);
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
|
||||
private:
|
||||
std::shared_ptr<Kernel::SharedMemory> shared_memory_holder;
|
||||
Core::System& system;
|
||||
[[maybe_unused]] Core::System& system;
|
||||
Format shared_memory_format{};
|
||||
};
|
||||
|
||||
|
||||
@@ -1229,8 +1229,8 @@ private:
|
||||
const auto height = rp.Pop<u64>();
|
||||
LOG_DEBUG(Service_VI, "called width={}, height={}", width, height);
|
||||
|
||||
constexpr std::size_t base_size = 0x20000;
|
||||
constexpr std::size_t alignment = 0x1000;
|
||||
constexpr u64 base_size = 0x20000;
|
||||
constexpr u64 alignment = 0x1000;
|
||||
const auto texture_size = width * height * 4;
|
||||
const auto out_size = (texture_size + base_size - 1) / base_size * base_size;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#ifdef _WIN32
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS // gethostname
|
||||
#include <winsock2.h>
|
||||
#elif __unix__
|
||||
#elif YUZU_UNIX
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
@@ -54,7 +54,7 @@ constexpr IPv4Address TranslateIPv4(in_addr addr) {
|
||||
sockaddr TranslateFromSockAddrIn(SockAddrIn input) {
|
||||
sockaddr_in result;
|
||||
|
||||
#ifdef __unix__
|
||||
#if YUZU_UNIX
|
||||
result.sin_len = sizeof(result);
|
||||
#endif
|
||||
|
||||
@@ -99,7 +99,7 @@ bool EnableNonBlock(SOCKET fd, bool enable) {
|
||||
return ioctlsocket(fd, FIONBIO, &value) != SOCKET_ERROR;
|
||||
}
|
||||
|
||||
#elif __unix__ // ^ _WIN32 v __unix__
|
||||
#elif YUZU_UNIX // ^ _WIN32 v YUZU_UNIX
|
||||
|
||||
using SOCKET = int;
|
||||
using WSAPOLLFD = pollfd;
|
||||
@@ -238,49 +238,49 @@ SockAddrIn TranslateToSockAddrIn(sockaddr input_) {
|
||||
return result;
|
||||
}
|
||||
|
||||
u16 TranslatePollEvents(u32 events) {
|
||||
u32 result = 0;
|
||||
short TranslatePollEvents(PollEvents events) {
|
||||
short result = 0;
|
||||
|
||||
if ((events & POLL_IN) != 0) {
|
||||
events &= ~POLL_IN;
|
||||
if (True(events & PollEvents::IN)) {
|
||||
events &= ~PollEvents::IN;
|
||||
result |= POLLIN;
|
||||
}
|
||||
if ((events & POLL_PRI) != 0) {
|
||||
events &= ~POLL_PRI;
|
||||
if (True(events & PollEvents::PRI)) {
|
||||
events &= ~PollEvents::PRI;
|
||||
#ifdef _WIN32
|
||||
LOG_WARNING(Service, "Winsock doesn't support POLLPRI");
|
||||
#else
|
||||
result |= POLL_PRI;
|
||||
#endif
|
||||
}
|
||||
if ((events & POLL_OUT) != 0) {
|
||||
events &= ~POLL_OUT;
|
||||
if (True(events & PollEvents::OUT)) {
|
||||
events &= ~PollEvents::OUT;
|
||||
result |= POLLOUT;
|
||||
}
|
||||
|
||||
UNIMPLEMENTED_IF_MSG(events != 0, "Unhandled guest events=0x{:x}", events);
|
||||
UNIMPLEMENTED_IF_MSG((u16)events != 0, "Unhandled guest events=0x{:x}", (u16)events);
|
||||
|
||||
return static_cast<u16>(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
u16 TranslatePollRevents(u32 revents) {
|
||||
u32 result = 0;
|
||||
const auto translate = [&result, &revents](u32 host, u32 guest) {
|
||||
PollEvents TranslatePollRevents(short revents) {
|
||||
PollEvents result{};
|
||||
const auto translate = [&result, &revents](u32 host, PollEvents guest) {
|
||||
if ((revents & host) != 0) {
|
||||
revents &= ~host;
|
||||
result |= guest;
|
||||
}
|
||||
};
|
||||
|
||||
translate(POLLIN, POLL_IN);
|
||||
translate(POLLPRI, POLL_PRI);
|
||||
translate(POLLOUT, POLL_OUT);
|
||||
translate(POLLERR, POLL_ERR);
|
||||
translate(POLLHUP, POLL_HUP);
|
||||
translate(POLLIN, PollEvents::IN);
|
||||
translate(POLLPRI, PollEvents::PRI);
|
||||
translate(POLLOUT, PollEvents::OUT);
|
||||
translate(POLLERR, PollEvents::ERR);
|
||||
translate(POLLHUP, PollEvents::HUP);
|
||||
|
||||
UNIMPLEMENTED_IF_MSG(revents != 0, "Unhandled host revents=0x{:x}", revents);
|
||||
|
||||
return static_cast<u16>(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -350,7 +350,7 @@ std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) {
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < num; ++i) {
|
||||
pollfds[i].revents = TranslatePollRevents(static_cast<u32>(host_pollfds[i].revents));
|
||||
pollfds[i].revents = TranslatePollRevents(host_pollfds[i].revents);
|
||||
}
|
||||
|
||||
if (result > 0) {
|
||||
|
||||
@@ -61,18 +61,23 @@ struct SockAddrIn {
|
||||
};
|
||||
|
||||
/// Cross-platform poll fd structure
|
||||
struct PollFD {
|
||||
Socket* socket;
|
||||
u16 events;
|
||||
u16 revents;
|
||||
|
||||
enum class PollEvents : u16 {
|
||||
IN = 1 << 0,
|
||||
PRI = 1 << 1,
|
||||
OUT = 1 << 2,
|
||||
ERR = 1 << 3,
|
||||
HUP = 1 << 4,
|
||||
NVAL = 1 << 5,
|
||||
};
|
||||
|
||||
constexpr u16 POLL_IN = 1 << 0;
|
||||
constexpr u16 POLL_PRI = 1 << 1;
|
||||
constexpr u16 POLL_OUT = 1 << 2;
|
||||
constexpr u16 POLL_ERR = 1 << 3;
|
||||
constexpr u16 POLL_HUP = 1 << 4;
|
||||
constexpr u16 POLL_NVAL = 1 << 5;
|
||||
DECLARE_ENUM_FLAG_OPERATORS(PollEvents);
|
||||
|
||||
struct PollFD {
|
||||
Socket* socket;
|
||||
PollEvents events;
|
||||
PollEvents revents;
|
||||
};
|
||||
|
||||
class NetworkInstance {
|
||||
public:
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <winsock.h>
|
||||
#elif !defined(__unix__)
|
||||
#elif !YUZU_UNIX
|
||||
#error "Platform not implemented"
|
||||
#endif
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
#if defined(_WIN32)
|
||||
SOCKET fd = INVALID_SOCKET;
|
||||
#elif defined(__unix__)
|
||||
#elif YUZU_UNIX
|
||||
int fd = -1;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -52,9 +52,9 @@ else()
|
||||
-Werror=reorder
|
||||
-Werror=shadow
|
||||
-Werror=sign-compare
|
||||
-Werror=unused-but-set-parameter
|
||||
-Werror=unused-but-set-variable
|
||||
-Werror=unused-variable
|
||||
$<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-parameter>
|
||||
$<$<CXX_COMPILER_ID:GNU>:-Werror=unused-but-set-variable>
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -871,8 +871,9 @@ Common::ParamPackage BuildParamPackageForBinding(int port, const std::string& gu
|
||||
case SDL_CONTROLLER_BINDTYPE_HAT:
|
||||
return BuildHatParamPackageForButton(port, guid, binding.value.hat.hat,
|
||||
binding.value.hat.hat_mask);
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
Common::ParamPackage BuildParamPackageForAnalog(int port, const std::string& guid, int axis_x,
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
|
||||
private:
|
||||
const std::string ip;
|
||||
const int port;
|
||||
[[maybe_unused]] const int port;
|
||||
const u32 pad;
|
||||
CemuhookUDP::Client* client;
|
||||
mutable std::mutex mutex;
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
|
||||
private:
|
||||
const std::string ip;
|
||||
const int port;
|
||||
[[maybe_unused]] const int port;
|
||||
const u32 pad;
|
||||
CemuhookUDP::Client* client;
|
||||
mutable std::mutex mutex;
|
||||
|
||||
@@ -68,7 +68,7 @@ TEST_CASE("BitField", "[common]") {
|
||||
}});
|
||||
|
||||
// bit fields: 01101100111101'10101110'1011'101100
|
||||
REQUIRE(be_bitfield.raw == 0b01101100'11110110'10111010'11101100);
|
||||
REQUIRE(be_bitfield.raw == 0b01101100'11110110'10111010'11101100u);
|
||||
REQUIRE(be_bitfield.a == 0b101100);
|
||||
REQUIRE(be_bitfield.b == -5); // 1011 as two's complement
|
||||
REQUIRE(be_bitfield.c == TestEnum::B);
|
||||
@@ -80,7 +80,7 @@ TEST_CASE("BitField", "[common]") {
|
||||
be_bitfield.d.Assign(0b01010101010101);
|
||||
std::memcpy(&raw, &be_bitfield, sizeof(raw));
|
||||
// bit fields: 01010101010101'00001111'1111'000111
|
||||
REQUIRE(be_bitfield.raw == 0b01010101'01010100'00111111'11000111);
|
||||
REQUIRE(be_bitfield.raw == 0b01010101'01010100'00111111'11000111u);
|
||||
REQUIRE(raw == std::array<u8, 4>{{
|
||||
0b01010101,
|
||||
0b01010100,
|
||||
|
||||
@@ -301,7 +301,7 @@ if (MSVC)
|
||||
else()
|
||||
target_compile_options(video_core PRIVATE
|
||||
-Werror=conversion
|
||||
-Wno-error=sign-conversion
|
||||
-Wno-sign-conversion
|
||||
-Werror=pessimizing-move
|
||||
-Werror=redundant-move
|
||||
-Werror=switch
|
||||
|
||||
@@ -84,9 +84,10 @@ private:
|
||||
void FillFreeList(Chunk& chunk);
|
||||
|
||||
std::vector<MapInterval*> free_list;
|
||||
std::unique_ptr<Chunk>* new_chunk = &first_chunk.next;
|
||||
|
||||
Chunk first_chunk;
|
||||
|
||||
std::unique_ptr<Chunk>* new_chunk = &first_chunk.next;
|
||||
};
|
||||
|
||||
} // namespace VideoCommon
|
||||
|
||||
@@ -115,7 +115,7 @@ private:
|
||||
/// Write arguments value to the ThiRegisters member at the specified offset
|
||||
void ThiStateWrite(ThiRegisters& state, u32 offset, const std::vector<u32>& arguments);
|
||||
|
||||
GPU& gpu;
|
||||
[[maybe_unused]] GPU& gpu;
|
||||
|
||||
std::shared_ptr<Tegra::Nvdec> nvdec_processor;
|
||||
std::unique_ptr<Tegra::Vic> vic_processor;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
extern "C" {
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#endif
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
|
||||
u32 syncpoint_value{};
|
||||
Host1xClassRegisters state{};
|
||||
GPU& gpu;
|
||||
[[maybe_unused]] GPU& gpu;
|
||||
};
|
||||
|
||||
} // namespace Tegra
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "video_core/dirty_flags.h"
|
||||
|
||||
#define OFF(field_name) MAXWELL3D_REG_INDEX(field_name)
|
||||
#define NUM(field_name) (sizeof(::Tegra::Engines::Maxwell3D::Regs::field_name) / sizeof(u32))
|
||||
#define NUM(field_name) (sizeof(::Tegra::Engines::Maxwell3D::Regs::field_name) / (sizeof(u32)))
|
||||
|
||||
namespace VideoCommon::Dirty {
|
||||
|
||||
|
||||
@@ -1500,8 +1500,6 @@ private:
|
||||
|
||||
bool execute_on{true};
|
||||
|
||||
std::array<u8, Regs::NUM_REGS> dirty_pointers{};
|
||||
|
||||
/// Retrieves information about a specific TIC entry from the TIC buffer.
|
||||
Texture::TICEntry GetTICEntry(u32 tic_index) const;
|
||||
|
||||
|
||||
@@ -72,8 +72,8 @@ public:
|
||||
|
||||
struct RenderEnable {
|
||||
enum class Mode : u32 {
|
||||
FALSE = 0,
|
||||
TRUE = 1,
|
||||
_FALSE = 0,
|
||||
_TRUE = 1,
|
||||
CONDITIONAL = 2,
|
||||
RENDER_IF_EQUAL = 3,
|
||||
RENDER_IF_NOT_EQUAL = 4,
|
||||
|
||||
@@ -266,8 +266,6 @@ private:
|
||||
|
||||
static constexpr std::size_t STREAM_BUFFER_SIZE = 128 * 1024 * 1024;
|
||||
|
||||
GLint vertex_binding = 0;
|
||||
|
||||
std::array<OGLBuffer, Tegra::Engines::Maxwell3D::Regs::NumTransformFeedbackBuffers>
|
||||
transform_feedback_buffers;
|
||||
std::bitset<Tegra::Engines::Maxwell3D::Regs::NumTransformFeedbackBuffers>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "video_core/renderer_opengl/gl_state_tracker.h"
|
||||
|
||||
#define OFF(field_name) MAXWELL3D_REG_INDEX(field_name)
|
||||
#define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32))
|
||||
#define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / (sizeof(u32)))
|
||||
|
||||
namespace OpenGL {
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ Common::DynamicLibrary OpenVulkanLibrary() {
|
||||
// Use the libvulkan.dylib from the application bundle.
|
||||
const std::string filename =
|
||||
Common::FS::GetBundleDirectory() + "/Contents/Frameworks/libvulkan.dylib";
|
||||
library.Open(filename.c_str());
|
||||
(void)library.Open(filename.c_str());
|
||||
}
|
||||
#else
|
||||
std::string filename = Common::DynamicLibrary::GetVersionedFilename("vulkan", 1);
|
||||
|
||||
@@ -49,7 +49,7 @@ private:
|
||||
vk::Pipeline CreatePipeline() const;
|
||||
|
||||
const VKDevice& device;
|
||||
VKScheduler& scheduler;
|
||||
[[maybe_unused]] VKScheduler& scheduler;
|
||||
ShaderEntries entries;
|
||||
|
||||
vk::DescriptorSetLayout descriptor_set_layout;
|
||||
|
||||
@@ -93,7 +93,7 @@ private:
|
||||
const SPIRVProgram& program) const;
|
||||
|
||||
const VKDevice& device;
|
||||
VKScheduler& scheduler;
|
||||
[[maybe_unused]] VKScheduler& scheduler;
|
||||
const GraphicsPipelineCacheKey cache_key;
|
||||
const u64 hash;
|
||||
|
||||
|
||||
@@ -84,10 +84,10 @@ private:
|
||||
/// Unmaps memory.
|
||||
void Unmap() const;
|
||||
|
||||
const VKDevice& device; ///< Vulkan device.
|
||||
const vk::DeviceMemory& memory; ///< Vulkan device memory handler.
|
||||
std::pair<u64, u64> interval{}; ///< Interval where the commit exists.
|
||||
VKMemoryAllocation* allocation{}; ///< Pointer to the large memory allocation.
|
||||
[[maybe_unused]] const VKDevice& device; ///< Vulkan device.
|
||||
const vk::DeviceMemory& memory; ///< Vulkan device memory handler.
|
||||
std::pair<u64, u64> interval{}; ///< Interval where the commit exists.
|
||||
VKMemoryAllocation* allocation{}; ///< Pointer to the large memory allocation.
|
||||
};
|
||||
|
||||
/// Holds ownership of a memory map.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "video_core/renderer_vulkan/vk_state_tracker.h"
|
||||
|
||||
#define OFF(field_name) MAXWELL3D_REG_INDEX(field_name)
|
||||
#define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / sizeof(u32))
|
||||
#define NUM(field_name) (sizeof(Maxwell3D::Regs::field_name) / (sizeof(u32)))
|
||||
|
||||
namespace Vulkan {
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
void DecorateSurfaceName();
|
||||
void DecorateSurfaceName() override;
|
||||
|
||||
View CreateView(const ViewParams& params) override;
|
||||
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
VkImageSubresourceRange GetImageSubresourceRange() const;
|
||||
|
||||
const VKDevice& device;
|
||||
VKMemoryManager& memory_manager;
|
||||
[[maybe_unused]] VKMemoryManager& memory_manager;
|
||||
VKScheduler& scheduler;
|
||||
VKStagingBufferPool& staging_pool;
|
||||
|
||||
|
||||
@@ -167,116 +167,116 @@ struct InstanceDispatch {
|
||||
|
||||
/// Table holding Vulkan device function pointers.
|
||||
struct DeviceDispatch : public InstanceDispatch {
|
||||
PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR;
|
||||
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
|
||||
PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets;
|
||||
PFN_vkAllocateMemory vkAllocateMemory;
|
||||
PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
|
||||
PFN_vkBindBufferMemory vkBindBufferMemory;
|
||||
PFN_vkBindImageMemory vkBindImageMemory;
|
||||
PFN_vkCmdBeginQuery vkCmdBeginQuery;
|
||||
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass;
|
||||
PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT;
|
||||
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets;
|
||||
PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer;
|
||||
PFN_vkCmdBindPipeline vkCmdBindPipeline;
|
||||
PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT;
|
||||
PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers;
|
||||
PFN_vkCmdBlitImage vkCmdBlitImage;
|
||||
PFN_vkCmdClearAttachments vkCmdClearAttachments;
|
||||
PFN_vkCmdCopyBuffer vkCmdCopyBuffer;
|
||||
PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage;
|
||||
PFN_vkCmdCopyImage vkCmdCopyImage;
|
||||
PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer;
|
||||
PFN_vkCmdDispatch vkCmdDispatch;
|
||||
PFN_vkCmdDraw vkCmdDraw;
|
||||
PFN_vkCmdDrawIndexed vkCmdDrawIndexed;
|
||||
PFN_vkCmdEndQuery vkCmdEndQuery;
|
||||
PFN_vkCmdEndRenderPass vkCmdEndRenderPass;
|
||||
PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT;
|
||||
PFN_vkCmdFillBuffer vkCmdFillBuffer;
|
||||
PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier;
|
||||
PFN_vkCmdPushConstants vkCmdPushConstants;
|
||||
PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants;
|
||||
PFN_vkCmdSetDepthBias vkCmdSetDepthBias;
|
||||
PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds;
|
||||
PFN_vkCmdSetEvent vkCmdSetEvent;
|
||||
PFN_vkCmdSetScissor vkCmdSetScissor;
|
||||
PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask;
|
||||
PFN_vkCmdSetStencilReference vkCmdSetStencilReference;
|
||||
PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask;
|
||||
PFN_vkCmdSetViewport vkCmdSetViewport;
|
||||
PFN_vkCmdWaitEvents vkCmdWaitEvents;
|
||||
PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT;
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT;
|
||||
PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT;
|
||||
PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT;
|
||||
PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT;
|
||||
PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT;
|
||||
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT;
|
||||
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT;
|
||||
PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT;
|
||||
PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT;
|
||||
PFN_vkCreateBuffer vkCreateBuffer;
|
||||
PFN_vkCreateBufferView vkCreateBufferView;
|
||||
PFN_vkCreateCommandPool vkCreateCommandPool;
|
||||
PFN_vkCreateComputePipelines vkCreateComputePipelines;
|
||||
PFN_vkCreateDescriptorPool vkCreateDescriptorPool;
|
||||
PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout;
|
||||
PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR;
|
||||
PFN_vkCreateEvent vkCreateEvent;
|
||||
PFN_vkCreateFence vkCreateFence;
|
||||
PFN_vkCreateFramebuffer vkCreateFramebuffer;
|
||||
PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines;
|
||||
PFN_vkCreateImage vkCreateImage;
|
||||
PFN_vkCreateImageView vkCreateImageView;
|
||||
PFN_vkCreatePipelineLayout vkCreatePipelineLayout;
|
||||
PFN_vkCreateQueryPool vkCreateQueryPool;
|
||||
PFN_vkCreateRenderPass vkCreateRenderPass;
|
||||
PFN_vkCreateSampler vkCreateSampler;
|
||||
PFN_vkCreateSemaphore vkCreateSemaphore;
|
||||
PFN_vkCreateShaderModule vkCreateShaderModule;
|
||||
PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR;
|
||||
PFN_vkDestroyBuffer vkDestroyBuffer;
|
||||
PFN_vkDestroyBufferView vkDestroyBufferView;
|
||||
PFN_vkDestroyCommandPool vkDestroyCommandPool;
|
||||
PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool;
|
||||
PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout;
|
||||
PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR;
|
||||
PFN_vkDestroyEvent vkDestroyEvent;
|
||||
PFN_vkDestroyFence vkDestroyFence;
|
||||
PFN_vkDestroyFramebuffer vkDestroyFramebuffer;
|
||||
PFN_vkDestroyImage vkDestroyImage;
|
||||
PFN_vkDestroyImageView vkDestroyImageView;
|
||||
PFN_vkDestroyPipeline vkDestroyPipeline;
|
||||
PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout;
|
||||
PFN_vkDestroyQueryPool vkDestroyQueryPool;
|
||||
PFN_vkDestroyRenderPass vkDestroyRenderPass;
|
||||
PFN_vkDestroySampler vkDestroySampler;
|
||||
PFN_vkDestroySemaphore vkDestroySemaphore;
|
||||
PFN_vkDestroyShaderModule vkDestroyShaderModule;
|
||||
PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR;
|
||||
PFN_vkDeviceWaitIdle vkDeviceWaitIdle;
|
||||
PFN_vkEndCommandBuffer vkEndCommandBuffer;
|
||||
PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
|
||||
PFN_vkFreeDescriptorSets vkFreeDescriptorSets;
|
||||
PFN_vkFreeMemory vkFreeMemory;
|
||||
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
|
||||
PFN_vkGetDeviceQueue vkGetDeviceQueue;
|
||||
PFN_vkGetEventStatus vkGetEventStatus;
|
||||
PFN_vkGetFenceStatus vkGetFenceStatus;
|
||||
PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
|
||||
PFN_vkGetQueryPoolResults vkGetQueryPoolResults;
|
||||
PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR;
|
||||
PFN_vkMapMemory vkMapMemory;
|
||||
PFN_vkQueueSubmit vkQueueSubmit;
|
||||
PFN_vkResetFences vkResetFences;
|
||||
PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT;
|
||||
PFN_vkUnmapMemory vkUnmapMemory;
|
||||
PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR;
|
||||
PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets;
|
||||
PFN_vkWaitForFences vkWaitForFences;
|
||||
PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR;
|
||||
PFN_vkAcquireNextImageKHR vkAcquireNextImageKHR = nullptr;
|
||||
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers = nullptr;
|
||||
PFN_vkAllocateDescriptorSets vkAllocateDescriptorSets = nullptr;
|
||||
PFN_vkAllocateMemory vkAllocateMemory = nullptr;
|
||||
PFN_vkBeginCommandBuffer vkBeginCommandBuffer = nullptr;
|
||||
PFN_vkBindBufferMemory vkBindBufferMemory = nullptr;
|
||||
PFN_vkBindImageMemory vkBindImageMemory = nullptr;
|
||||
PFN_vkCmdBeginQuery vkCmdBeginQuery = nullptr;
|
||||
PFN_vkCmdBeginRenderPass vkCmdBeginRenderPass = nullptr;
|
||||
PFN_vkCmdBeginTransformFeedbackEXT vkCmdBeginTransformFeedbackEXT = nullptr;
|
||||
PFN_vkCmdBindDescriptorSets vkCmdBindDescriptorSets = nullptr;
|
||||
PFN_vkCmdBindIndexBuffer vkCmdBindIndexBuffer = nullptr;
|
||||
PFN_vkCmdBindPipeline vkCmdBindPipeline = nullptr;
|
||||
PFN_vkCmdBindTransformFeedbackBuffersEXT vkCmdBindTransformFeedbackBuffersEXT = nullptr;
|
||||
PFN_vkCmdBindVertexBuffers vkCmdBindVertexBuffers = nullptr;
|
||||
PFN_vkCmdBlitImage vkCmdBlitImage = nullptr;
|
||||
PFN_vkCmdClearAttachments vkCmdClearAttachments = nullptr;
|
||||
PFN_vkCmdCopyBuffer vkCmdCopyBuffer = nullptr;
|
||||
PFN_vkCmdCopyBufferToImage vkCmdCopyBufferToImage = nullptr;
|
||||
PFN_vkCmdCopyImage vkCmdCopyImage = nullptr;
|
||||
PFN_vkCmdCopyImageToBuffer vkCmdCopyImageToBuffer = nullptr;
|
||||
PFN_vkCmdDispatch vkCmdDispatch = nullptr;
|
||||
PFN_vkCmdDraw vkCmdDraw = nullptr;
|
||||
PFN_vkCmdDrawIndexed vkCmdDrawIndexed = nullptr;
|
||||
PFN_vkCmdEndQuery vkCmdEndQuery = nullptr;
|
||||
PFN_vkCmdEndRenderPass vkCmdEndRenderPass = nullptr;
|
||||
PFN_vkCmdEndTransformFeedbackEXT vkCmdEndTransformFeedbackEXT = nullptr;
|
||||
PFN_vkCmdFillBuffer vkCmdFillBuffer = nullptr;
|
||||
PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier = nullptr;
|
||||
PFN_vkCmdPushConstants vkCmdPushConstants = nullptr;
|
||||
PFN_vkCmdSetBlendConstants vkCmdSetBlendConstants = nullptr;
|
||||
PFN_vkCmdSetDepthBias vkCmdSetDepthBias = nullptr;
|
||||
PFN_vkCmdSetDepthBounds vkCmdSetDepthBounds = nullptr;
|
||||
PFN_vkCmdSetEvent vkCmdSetEvent = nullptr;
|
||||
PFN_vkCmdSetScissor vkCmdSetScissor = nullptr;
|
||||
PFN_vkCmdSetStencilCompareMask vkCmdSetStencilCompareMask = nullptr;
|
||||
PFN_vkCmdSetStencilReference vkCmdSetStencilReference = nullptr;
|
||||
PFN_vkCmdSetStencilWriteMask vkCmdSetStencilWriteMask = nullptr;
|
||||
PFN_vkCmdSetViewport vkCmdSetViewport = nullptr;
|
||||
PFN_vkCmdWaitEvents vkCmdWaitEvents = nullptr;
|
||||
PFN_vkCmdBindVertexBuffers2EXT vkCmdBindVertexBuffers2EXT = nullptr;
|
||||
PFN_vkCmdSetCullModeEXT vkCmdSetCullModeEXT = nullptr;
|
||||
PFN_vkCmdSetDepthBoundsTestEnableEXT vkCmdSetDepthBoundsTestEnableEXT = nullptr;
|
||||
PFN_vkCmdSetDepthCompareOpEXT vkCmdSetDepthCompareOpEXT = nullptr;
|
||||
PFN_vkCmdSetDepthTestEnableEXT vkCmdSetDepthTestEnableEXT = nullptr;
|
||||
PFN_vkCmdSetDepthWriteEnableEXT vkCmdSetDepthWriteEnableEXT = nullptr;
|
||||
PFN_vkCmdSetFrontFaceEXT vkCmdSetFrontFaceEXT = nullptr;
|
||||
PFN_vkCmdSetPrimitiveTopologyEXT vkCmdSetPrimitiveTopologyEXT = nullptr;
|
||||
PFN_vkCmdSetStencilOpEXT vkCmdSetStencilOpEXT = nullptr;
|
||||
PFN_vkCmdSetStencilTestEnableEXT vkCmdSetStencilTestEnableEXT = nullptr;
|
||||
PFN_vkCreateBuffer vkCreateBuffer = nullptr;
|
||||
PFN_vkCreateBufferView vkCreateBufferView = nullptr;
|
||||
PFN_vkCreateCommandPool vkCreateCommandPool = nullptr;
|
||||
PFN_vkCreateComputePipelines vkCreateComputePipelines = nullptr;
|
||||
PFN_vkCreateDescriptorPool vkCreateDescriptorPool = nullptr;
|
||||
PFN_vkCreateDescriptorSetLayout vkCreateDescriptorSetLayout = nullptr;
|
||||
PFN_vkCreateDescriptorUpdateTemplateKHR vkCreateDescriptorUpdateTemplateKHR = nullptr;
|
||||
PFN_vkCreateEvent vkCreateEvent = nullptr;
|
||||
PFN_vkCreateFence vkCreateFence = nullptr;
|
||||
PFN_vkCreateFramebuffer vkCreateFramebuffer = nullptr;
|
||||
PFN_vkCreateGraphicsPipelines vkCreateGraphicsPipelines = nullptr;
|
||||
PFN_vkCreateImage vkCreateImage = nullptr;
|
||||
PFN_vkCreateImageView vkCreateImageView = nullptr;
|
||||
PFN_vkCreatePipelineLayout vkCreatePipelineLayout = nullptr;
|
||||
PFN_vkCreateQueryPool vkCreateQueryPool = nullptr;
|
||||
PFN_vkCreateRenderPass vkCreateRenderPass = nullptr;
|
||||
PFN_vkCreateSampler vkCreateSampler = nullptr;
|
||||
PFN_vkCreateSemaphore vkCreateSemaphore = nullptr;
|
||||
PFN_vkCreateShaderModule vkCreateShaderModule = nullptr;
|
||||
PFN_vkCreateSwapchainKHR vkCreateSwapchainKHR = nullptr;
|
||||
PFN_vkDestroyBuffer vkDestroyBuffer = nullptr;
|
||||
PFN_vkDestroyBufferView vkDestroyBufferView = nullptr;
|
||||
PFN_vkDestroyCommandPool vkDestroyCommandPool = nullptr;
|
||||
PFN_vkDestroyDescriptorPool vkDestroyDescriptorPool = nullptr;
|
||||
PFN_vkDestroyDescriptorSetLayout vkDestroyDescriptorSetLayout = nullptr;
|
||||
PFN_vkDestroyDescriptorUpdateTemplateKHR vkDestroyDescriptorUpdateTemplateKHR = nullptr;
|
||||
PFN_vkDestroyEvent vkDestroyEvent = nullptr;
|
||||
PFN_vkDestroyFence vkDestroyFence = nullptr;
|
||||
PFN_vkDestroyFramebuffer vkDestroyFramebuffer = nullptr;
|
||||
PFN_vkDestroyImage vkDestroyImage = nullptr;
|
||||
PFN_vkDestroyImageView vkDestroyImageView = nullptr;
|
||||
PFN_vkDestroyPipeline vkDestroyPipeline = nullptr;
|
||||
PFN_vkDestroyPipelineLayout vkDestroyPipelineLayout = nullptr;
|
||||
PFN_vkDestroyQueryPool vkDestroyQueryPool = nullptr;
|
||||
PFN_vkDestroyRenderPass vkDestroyRenderPass = nullptr;
|
||||
PFN_vkDestroySampler vkDestroySampler = nullptr;
|
||||
PFN_vkDestroySemaphore vkDestroySemaphore = nullptr;
|
||||
PFN_vkDestroyShaderModule vkDestroyShaderModule = nullptr;
|
||||
PFN_vkDestroySwapchainKHR vkDestroySwapchainKHR = nullptr;
|
||||
PFN_vkDeviceWaitIdle vkDeviceWaitIdle = nullptr;
|
||||
PFN_vkEndCommandBuffer vkEndCommandBuffer = nullptr;
|
||||
PFN_vkFreeCommandBuffers vkFreeCommandBuffers = nullptr;
|
||||
PFN_vkFreeDescriptorSets vkFreeDescriptorSets = nullptr;
|
||||
PFN_vkFreeMemory vkFreeMemory = nullptr;
|
||||
PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements = nullptr;
|
||||
PFN_vkGetDeviceQueue vkGetDeviceQueue = nullptr;
|
||||
PFN_vkGetEventStatus vkGetEventStatus = nullptr;
|
||||
PFN_vkGetFenceStatus vkGetFenceStatus = nullptr;
|
||||
PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements = nullptr;
|
||||
PFN_vkGetQueryPoolResults vkGetQueryPoolResults = nullptr;
|
||||
PFN_vkGetSemaphoreCounterValueKHR vkGetSemaphoreCounterValueKHR = nullptr;
|
||||
PFN_vkMapMemory vkMapMemory = nullptr;
|
||||
PFN_vkQueueSubmit vkQueueSubmit = nullptr;
|
||||
PFN_vkResetFences vkResetFences = nullptr;
|
||||
PFN_vkResetQueryPoolEXT vkResetQueryPoolEXT = nullptr;
|
||||
PFN_vkUnmapMemory vkUnmapMemory = nullptr;
|
||||
PFN_vkUpdateDescriptorSetWithTemplateKHR vkUpdateDescriptorSetWithTemplateKHR = nullptr;
|
||||
PFN_vkUpdateDescriptorSets vkUpdateDescriptorSets = nullptr;
|
||||
PFN_vkWaitForFences vkWaitForFences = nullptr;
|
||||
PFN_vkWaitSemaphoresKHR vkWaitSemaphoresKHR = nullptr;
|
||||
};
|
||||
|
||||
/// Loads instance agnostic function pointers.
|
||||
|
||||
@@ -77,7 +77,7 @@ u32 ShaderIR::DecodeArithmeticHalf(NodeBlock& bb, u32 pc) {
|
||||
op_b = UnpackHalfFloat(op_b, type_b);
|
||||
op_b = GetOperandAbsNegHalf(op_b, absolute_b, negate_b);
|
||||
|
||||
Node value = [this, opcode, op_a, op_b = op_b] {
|
||||
Node value = [opcode, op_a, op_b = op_b] {
|
||||
switch (opcode->get().GetId()) {
|
||||
case OpCode::Id::HADD2_C:
|
||||
case OpCode::Id::HADD2_R:
|
||||
|
||||
@@ -25,7 +25,7 @@ u32 ShaderIR::DecodeRegisterSetPredicate(NodeBlock& bb, u32 pc) {
|
||||
const Instruction instr = {program_code[pc]};
|
||||
const auto opcode = OpCode::Decode(instr);
|
||||
|
||||
Node apply_mask = [this, opcode, instr] {
|
||||
Node apply_mask = [opcode, instr] {
|
||||
switch (opcode->get().GetId()) {
|
||||
case OpCode::Id::R2P_IMM:
|
||||
case OpCode::Id::P2R_IMM:
|
||||
|
||||
@@ -178,7 +178,7 @@ u32 ShaderIR::DecodeTexture(NodeBlock& bb, u32 pc) {
|
||||
: GetSampler(instr.sampler, info);
|
||||
Node4 values;
|
||||
if (!sampler) {
|
||||
std::generate(values.begin(), values.end(), [this] { return Immediate(0); });
|
||||
std::generate(values.begin(), values.end(), [] { return Immediate(0); });
|
||||
WriteTexInstructionFloat(bb, instr, values);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ bool QtControllerSelectorDialog::CheckIfParametersMet() {
|
||||
// Here, we check and validate the current configuration against all applicable parameters.
|
||||
const auto num_connected_players = static_cast<int>(
|
||||
std::count_if(player_groupboxes.begin(), player_groupboxes.end(),
|
||||
[this](const QGroupBox* player) { return player->isChecked(); }));
|
||||
[](const QGroupBox* player) { return player->isChecked(); }));
|
||||
|
||||
const auto min_supported_players = parameters.enable_single_mode ? 1 : parameters.min_players;
|
||||
const auto max_supported_players = parameters.enable_single_mode ? 1 : parameters.max_players;
|
||||
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
GRenderWindow* render_window;
|
||||
[[maybe_unused]] GRenderWindow* render_window;
|
||||
};
|
||||
|
||||
class OpenGLRenderWidget : public RenderWidget {
|
||||
@@ -260,7 +260,7 @@ static Core::Frontend::WindowSystemType GetWindowSystemType() {
|
||||
else if (platform_name == QStringLiteral("wayland"))
|
||||
return Core::Frontend::WindowSystemType::Wayland;
|
||||
|
||||
LOG_CRITICAL(Frontend, "Unknown Qt platform!");
|
||||
LOG_CRITICAL(Frontend, "Unknown Qt platform {}!", platform_name.toStdString());
|
||||
return Core::Frontend::WindowSystemType::Windows;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ constexpr Settings::ControllerType GetControllerTypeFromIndex(int index) {
|
||||
}
|
||||
|
||||
/// Maps the Controller Type enum to controller type combobox index
|
||||
constexpr int GetIndexFromControllerType(Settings::ControllerType type) {
|
||||
[[maybe_unused]] constexpr int GetIndexFromControllerType(Settings::ControllerType type) {
|
||||
switch (type) {
|
||||
case Settings::ControllerType::ProController:
|
||||
default:
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
#include "common/assert.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/settings.h"
|
||||
#include "input_common/main.h"
|
||||
@@ -49,6 +50,8 @@ CalibrationConfigurationDialog::CalibrationConfigurationDialog(QWidget* parent,
|
||||
case CalibrationConfigurationJob::Status::Completed:
|
||||
text = tr("Configuration completed!");
|
||||
break;
|
||||
case CalibrationConfigurationJob::Status::Initialized:
|
||||
UNREACHABLE();
|
||||
}
|
||||
QMetaObject::invokeMethod(this, "UpdateLabelText", Q_ARG(QString, text));
|
||||
if (status == CalibrationConfigurationJob::Status::Completed) {
|
||||
|
||||
@@ -1443,7 +1443,7 @@ static bool RomFSRawCopy(QProgressDialog& dialog, const FileSys::VirtualDir& src
|
||||
}
|
||||
|
||||
void GMainWindow::OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryType type) {
|
||||
const QString entry_type = [this, type] {
|
||||
const QString entry_type = [type] {
|
||||
switch (type) {
|
||||
case InstalledEntryType::Game:
|
||||
return tr("Contents");
|
||||
@@ -1539,7 +1539,7 @@ void GMainWindow::RemoveAddOnContent(u64 program_id, const QString& entry_type)
|
||||
}
|
||||
|
||||
void GMainWindow::OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target) {
|
||||
const QString question = [this, target] {
|
||||
const QString question = [target] {
|
||||
switch (target) {
|
||||
case GameListRemoveTarget::ShaderCache:
|
||||
return tr("Delete Transferable Shader Cache?");
|
||||
|
||||
@@ -347,7 +347,6 @@ void Config::ReadValues() {
|
||||
// System
|
||||
Settings::values.use_docked_mode.SetValue(
|
||||
sdl2_config->GetBoolean("System", "use_docked_mode", false));
|
||||
const auto size = sdl2_config->GetInteger("System", "users_size", 0);
|
||||
|
||||
Settings::values.current_user = std::clamp<int>(
|
||||
sdl2_config->GetInteger("System", "current_user", 0), 0, Service::Account::MAX_USERS - 1);
|
||||
|
||||
Reference in New Issue
Block a user