diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2020-12-17 20:22:46 +0100 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2020-12-17 20:22:46 +0100 |
commit | 8cb683f3b9a419c2472ead6750621c671a5becff (patch) | |
tree | 6938ca44f5c2e748d2488e24c43a61136e0279a5 /src/core/hle/service/vi/vi.cpp | |
parent | Merge pull request #5196 from lat9nq/fix-conan-boost-2 (diff) | |
download | yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.tar yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.tar.gz yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.tar.bz2 yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.tar.lz yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.tar.xz yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.tar.zst yuzu-8cb683f3b9a419c2472ead6750621c671a5becff.zip |
Diffstat (limited to 'src/core/hle/service/vi/vi.cpp')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 5d8841ae8..45cfffe06 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -282,18 +282,24 @@ public: void DeserializeData() override { [[maybe_unused]] const std::u16string token = ReadInterfaceToken(); data = Read<Data>(); - buffer = Read<NVFlinger::IGBPBuffer>(); + if (data.contains_object != 0) { + buffer_container = Read<BufferContainer>(); + } } struct Data { u32_le slot; - INSERT_PADDING_WORDS(1); + u32_le contains_object; + }; + + struct BufferContainer { u32_le graphic_buffer_length; INSERT_PADDING_WORDS(1); + NVFlinger::IGBPBuffer buffer{}; }; - Data data; - NVFlinger::IGBPBuffer buffer; + Data data{}; + BufferContainer buffer_container{}; }; class IGBPSetPreallocatedBufferResponseParcel : public Parcel { @@ -547,7 +553,7 @@ private: case TransactionId::SetPreallocatedBuffer: { IGBPSetPreallocatedBufferRequestParcel request{ctx.ReadBuffer()}; - buffer_queue.SetPreallocatedBuffer(request.data.slot, request.buffer); + buffer_queue.SetPreallocatedBuffer(request.data.slot, request.buffer_container.buffer); IGBPSetPreallocatedBufferResponseParcel response{}; ctx.WriteBuffer(response.Serialize()); |