diff options
author | bunnei <bunneidev@gmail.com> | 2021-05-21 06:40:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 06:40:03 +0200 |
commit | ea4e4b05e4c05b704646a65a4bf98f218dbb867a (patch) | |
tree | aeb2043455960c61320458a0667d7c165a52e479 /src/core | |
parent | Merge pull request #6321 from lat9nq/per-game-cpu (diff) | |
parent | hle_ipc: unsigned -> u32 (diff) | |
download | yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.tar yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.tar.gz yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.tar.bz2 yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.tar.lz yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.tar.xz yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.tar.zst yuzu-ea4e4b05e4c05b704646a65a4bf98f218dbb867a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 16 | ||||
-rw-r--r-- | src/core/hle/kernel/hle_ipc.h | 7 |
2 files changed, 14 insertions, 9 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index ce3466df8..24700f7a5 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -64,7 +64,7 @@ void HLERequestContext::ParseCommandBuffer(const KHandleTable& handle_table, u32 if (command_header->enable_handle_descriptor) { handle_descriptor_header = rp.PopRaw<IPC::HandleDescriptorHeader>(); if (handle_descriptor_header->send_current_pid) { - rp.Skip(2, false); + pid = rp.Pop<u64>(); } if (incoming) { // Populate the object lists with the data in the IPC request. @@ -86,16 +86,16 @@ void HLERequestContext::ParseCommandBuffer(const KHandleTable& handle_table, u32 } } - for (unsigned i = 0; i < command_header->num_buf_x_descriptors; ++i) { + for (u32 i = 0; i < command_header->num_buf_x_descriptors; ++i) { buffer_x_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorX>()); } - for (unsigned i = 0; i < command_header->num_buf_a_descriptors; ++i) { + for (u32 i = 0; i < command_header->num_buf_a_descriptors; ++i) { buffer_a_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>()); } - for (unsigned i = 0; i < command_header->num_buf_b_descriptors; ++i) { + for (u32 i = 0; i < command_header->num_buf_b_descriptors; ++i) { buffer_b_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>()); } - for (unsigned i = 0; i < command_header->num_buf_w_descriptors; ++i) { + for (u32 i = 0; i < command_header->num_buf_w_descriptors; ++i) { buffer_w_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorABW>()); } @@ -148,14 +148,14 @@ void HLERequestContext::ParseCommandBuffer(const KHandleTable& handle_table, u32 IPC::CommandHeader::BufferDescriptorCFlag::OneDescriptor) { buffer_c_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorC>()); } else { - unsigned num_buf_c_descriptors = - static_cast<unsigned>(command_header->buf_c_descriptor_flags.Value()) - 2; + u32 num_buf_c_descriptors = + static_cast<u32>(command_header->buf_c_descriptor_flags.Value()) - 2; // This is used to detect possible underflows, in case something is broken // with the two ifs above and the flags value is == 0 || == 1. ASSERT(num_buf_c_descriptors < 14); - for (unsigned i = 0; i < num_buf_c_descriptors; ++i) { + for (u32 i = 0; i < num_buf_c_descriptors; ++i) { buffer_c_desciptors.push_back(rp.PopRaw<IPC::BufferDescriptorC>()); } } diff --git a/src/core/hle/kernel/hle_ipc.h b/src/core/hle/kernel/hle_ipc.h index 4fba300dc..e1b128281 100644 --- a/src/core/hle/kernel/hle_ipc.h +++ b/src/core/hle/kernel/hle_ipc.h @@ -150,6 +150,10 @@ public: return command_header->type; } + u64 GetPID() const { + return pid; + } + u32 GetDataPayloadOffset() const { return data_payload_offset; } @@ -305,11 +309,12 @@ private: std::vector<IPC::BufferDescriptorABW> buffer_w_desciptors; std::vector<IPC::BufferDescriptorC> buffer_c_desciptors; + u32_le command{}; + u64 pid{}; u32 data_payload_offset{}; u32 handles_offset{}; u32 domain_offset{}; u32 data_size{}; - u32_le command{}; std::vector<std::shared_ptr<SessionRequestHandler>> domain_request_handlers; bool is_thread_waiting{}; |