diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-18 02:11:41 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-07-18 02:13:17 +0200 |
commit | c3dd456d513a989315d4e8a00ad8a1223bb8f9c4 (patch) | |
tree | 25e349c1885d70d9338841faaa16f31976e09994 /src/core/hle/service/vi | |
parent | Merge pull request #675 from Subv/stencil (diff) | |
download | yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.tar yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.tar.gz yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.tar.bz2 yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.tar.lz yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.tar.xz yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.tar.zst yuzu-c3dd456d513a989315d4e8a00ad8a1223bb8f9c4.zip |
Diffstat (limited to 'src/core/hle/service/vi')
-rw-r--r-- | src/core/hle/service/vi/vi.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index e094510bf..caef7e695 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp @@ -7,6 +7,7 @@ #include <memory> #include <boost/optional.hpp> #include "common/alignment.h" +#include "common/math_util.h" #include "common/scope_exit.h" #include "core/core_timing.h" #include "core/hle/ipc_helpers.h" @@ -327,8 +328,8 @@ public: protected: void SerializeData() override { - // TODO(Subv): Figure out what this value means, writing non-zero here will make libnx try - // to read an IGBPBuffer object from the parcel. + // TODO(Subv): Figure out what this value means, writing non-zero here will make libnx + // try to read an IGBPBuffer object from the parcel. Write<u32_le>(1); WriteObject(buffer); Write<u32_le>(0); @@ -360,8 +361,8 @@ public: INSERT_PADDING_WORDS(3); u32_le timestamp; s32_le is_auto_timestamp; - s32_le crop_left; s32_le crop_top; + s32_le crop_left; s32_le crop_right; s32_le crop_bottom; s32_le scaling_mode; @@ -370,6 +371,10 @@ public: INSERT_PADDING_WORDS(2); u32_le fence_is_valid; std::array<Fence, 2> fences; + + MathUtil::Rectangle<int> GetCropRect() const { + return {crop_left, crop_top, crop_right, crop_bottom}; + } }; static_assert(sizeof(Data) == 80, "ParcelData has wrong size"); @@ -519,7 +524,8 @@ private: } else if (transaction == TransactionId::QueueBuffer) { IGBPQueueBufferRequestParcel request{ctx.ReadBuffer()}; - buffer_queue->QueueBuffer(request.data.slot, request.data.transform); + buffer_queue->QueueBuffer(request.data.slot, request.data.transform, + request.data.GetCropRect()); IGBPQueueBufferResponseParcel response{1280, 720}; ctx.WriteBuffer(response.Serialize()); |