diff options
| author | 2018-02-12 21:17:04 -0500 | |
|---|---|---|
| committer | 2018-02-12 21:24:40 -0500 | |
| commit | 91e19deb3931dcb1ee2b692b3d9b039bc601e2c3 (patch) | |
| tree | 26791a4cc08964cda60a24921aa1cebc581a0781 /src | |
| parent | vi: Stub TransactParcel CancelBuffer. (diff) | |
| download | yuzu-91e19deb3931dcb1ee2b692b3d9b039bc601e2c3.tar.gz yuzu-91e19deb3931dcb1ee2b692b3d9b039bc601e2c3.tar.xz yuzu-91e19deb3931dcb1ee2b692b3d9b039bc601e2c3.zip | |
vi: Add FENCE_HACK, which is useful for booting BOTW.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index cfdd4bf2a..8b4ed30d2 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -262,6 +262,11 @@ public: | |||
| 262 | Data data; | 262 | Data data; |
| 263 | }; | 263 | }; |
| 264 | 264 | ||
| 265 | // TODO(bunnei): Remove this. When set to 1, games will think a fence is valid and boot further. | ||
| 266 | // This will break libnx and potentially other apps that more stringently check this. This is here | ||
| 267 | // purely as a convenience, and should go away once we implement fences. | ||
| 268 | static constexpr u32 FENCE_HACK = 0; | ||
| 269 | |||
| 265 | class IGBPDequeueBufferResponseParcel : public Parcel { | 270 | class IGBPDequeueBufferResponseParcel : public Parcel { |
| 266 | public: | 271 | public: |
| 267 | explicit IGBPDequeueBufferResponseParcel(u32 slot) : Parcel(), slot(slot) {} | 272 | explicit IGBPDequeueBufferResponseParcel(u32 slot) : Parcel(), slot(slot) {} |
| @@ -269,11 +274,20 @@ public: | |||
| 269 | 274 | ||
| 270 | protected: | 275 | protected: |
| 271 | void SerializeData() override { | 276 | void SerializeData() override { |
| 272 | Write(slot); | 277 | // TODO(bunnei): Find out what this all means. Writing anything non-zero here breaks libnx. |
| 273 | // TODO(Subv): Find out how this Fence is used. | 278 | Write<u32>(0); |
| 274 | std::array<u32_le, 11> fence = {}; | 279 | Write<u32>(FENCE_HACK); |
| 275 | Write(fence); | 280 | Write<u32>(0); |
| 276 | Write<u32_le>(0); | 281 | Write<u32>(0); |
| 282 | Write<u32>(0); | ||
| 283 | Write<u32>(0); | ||
| 284 | Write<u32>(0); | ||
| 285 | Write<u32>(0); | ||
| 286 | Write<u32>(0); | ||
| 287 | Write<u32>(0); | ||
| 288 | Write<u32>(0); | ||
| 289 | Write<u32>(0); | ||
| 290 | Write<u32>(0); | ||
| 277 | } | 291 | } |
| 278 | 292 | ||
| 279 | u32_le slot; | 293 | u32_le slot; |
| @@ -304,7 +318,7 @@ protected: | |||
| 304 | void SerializeData() override { | 318 | void SerializeData() override { |
| 305 | // TODO(bunnei): Find out what this all means. Writing anything non-zero here breaks libnx. | 319 | // TODO(bunnei): Find out what this all means. Writing anything non-zero here breaks libnx. |
| 306 | Write<u32_le>(0); | 320 | Write<u32_le>(0); |
| 307 | Write<u32_le>(0); | 321 | Write<u32_le>(FENCE_HACK); |
| 308 | Write<u32_le>(0); | 322 | Write<u32_le>(0); |
| 309 | Write(buffer); | 323 | Write(buffer); |
| 310 | Write<u32_le>(0); | 324 | Write<u32_le>(0); |
| @@ -560,7 +574,7 @@ private: | |||
| 560 | } | 574 | } |
| 561 | 575 | ||
| 562 | std::shared_ptr<NVFlinger::NVFlinger> nv_flinger; | 576 | std::shared_ptr<NVFlinger::NVFlinger> nv_flinger; |
| 563 | }; | 577 | }; // namespace VI |
| 564 | 578 | ||
| 565 | class ISystemDisplayService final : public ServiceFramework<ISystemDisplayService> { | 579 | class ISystemDisplayService final : public ServiceFramework<ISystemDisplayService> { |
| 566 | public: | 580 | public: |