diff options
author | bunnei <bunneidev@gmail.com> | 2018-02-13 01:40:19 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-02-13 03:24:38 +0100 |
commit | 4f969e22713ee510ef29741773b8d6721ebe9e49 (patch) | |
tree | 35927f7af56d534f594e108085ce61c54c1ed1fd /src | |
parent | Merge pull request #180 from MerryMage/f/dynarmic/direct-page-table (diff) | |
download | yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.tar yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.tar.gz yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.tar.bz2 yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.tar.lz yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.tar.xz yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.tar.zst yuzu-4f969e22713ee510ef29741773b8d6721ebe9e49.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index dd4d3e517..7d9a41ded 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -442,18 +442,20 @@ private: void TransactParcel(u32 id, TransactionId transaction, const std::vector<u8>& input_data, VAddr output_addr, u64 output_size) { auto buffer_queue = nv_flinger->GetBufferQueue(id); - std::vector<u8> response_buffer; + if (transaction == TransactionId::Connect) { IGBPConnectRequestParcel request{input_data}; IGBPConnectResponseParcel response{1280, 720}; - response_buffer = response.Serialize(); + std::vector<u8> response_buffer = response.Serialize(); + Memory::WriteBlock(output_addr, response_buffer.data(), response_buffer.size()); } else if (transaction == TransactionId::SetPreallocatedBuffer) { IGBPSetPreallocatedBufferRequestParcel request{input_data}; buffer_queue->SetPreallocatedBuffer(request.data.slot, request.buffer); IGBPSetPreallocatedBufferResponseParcel response{}; - response_buffer = response.Serialize(); + std::vector<u8> response_buffer = response.Serialize(); + Memory::WriteBlock(output_addr, response_buffer.data(), response_buffer.size()); } else if (transaction == TransactionId::DequeueBuffer) { IGBPDequeueBufferRequestParcel request{input_data}; @@ -461,21 +463,24 @@ private: request.data.height); IGBPDequeueBufferResponseParcel response{slot}; - response_buffer = response.Serialize(); + std::vector<u8> response_buffer = response.Serialize(); + Memory::WriteBlock(output_addr, response_buffer.data(), response_buffer.size()); } else if (transaction == TransactionId::RequestBuffer) { IGBPRequestBufferRequestParcel request{input_data}; auto& buffer = buffer_queue->RequestBuffer(request.slot); IGBPRequestBufferResponseParcel response{buffer}; - response_buffer = response.Serialize(); + std::vector<u8> response_buffer = response.Serialize(); + Memory::WriteBlock(output_addr, response_buffer.data(), response_buffer.size()); } else if (transaction == TransactionId::QueueBuffer) { IGBPQueueBufferRequestParcel request{input_data}; buffer_queue->QueueBuffer(request.data.slot, request.data.transform); IGBPQueueBufferResponseParcel response{1280, 720}; - response_buffer = response.Serialize(); + std::vector<u8> response_buffer = response.Serialize(); + Memory::WriteBlock(output_addr, response_buffer.data(), response_buffer.size()); } else if (transaction == TransactionId::Query) { IGBPQueryRequestParcel request{input_data}; @@ -483,13 +488,11 @@ private: buffer_queue->Query(static_cast<NVFlinger::BufferQueue::QueryType>(request.type)); IGBPQueryResponseParcel response{value}; - response_buffer = response.Serialize(); - + std::vector<u8> response_buffer = response.Serialize(); + Memory::WriteBlock(output_addr, response_buffer.data(), response_buffer.size()); } else { ASSERT_MSG(false, "Unimplemented"); } - - Memory::WriteBlock(output_addr, response_buffer.data(), output_size); } void TransactParcel(Kernel::HLERequestContext& ctx) { |