diff options
| author | 2019-01-02 20:36:40 -0500 | |
|---|---|---|
| committer | 2019-01-02 20:36:40 -0500 | |
| commit | 7538fa4a67ffd45b9236f55110c539666940f562 (patch) | |
| tree | 156cc159734d6afe541a801c571d6d7e2b536641 /src | |
| parent | Merge pull request #1961 from ReinUsesLisp/tex-view-2d (diff) | |
| parent | service/vi: Log more information where applicable (diff) | |
| download | yuzu-7538fa4a67ffd45b9236f55110c539666940f562.tar.gz yuzu-7538fa4a67ffd45b9236f55110c539666940f562.tar.xz yuzu-7538fa4a67ffd45b9236f55110c539666940f562.zip | |
Merge pull request #1977 from lioncash/vi-log
service/vi: Log more information where applicable
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 137 |
1 files changed, 74 insertions, 63 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index a4c3a4753..5c21ac703 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -503,10 +503,12 @@ private: | |||
| 503 | 503 | ||
| 504 | void TransactParcel(Kernel::HLERequestContext& ctx) { | 504 | void TransactParcel(Kernel::HLERequestContext& ctx) { |
| 505 | IPC::RequestParser rp{ctx}; | 505 | IPC::RequestParser rp{ctx}; |
| 506 | u32 id = rp.Pop<u32>(); | 506 | const u32 id = rp.Pop<u32>(); |
| 507 | auto transaction = static_cast<TransactionId>(rp.Pop<u32>()); | 507 | const auto transaction = static_cast<TransactionId>(rp.Pop<u32>()); |
| 508 | u32 flags = rp.Pop<u32>(); | 508 | const u32 flags = rp.Pop<u32>(); |
| 509 | LOG_DEBUG(Service_VI, "called, transaction={:X}", static_cast<u32>(transaction)); | 509 | |
| 510 | LOG_DEBUG(Service_VI, "called. id=0x{:08X} transaction={:X}, flags=0x{:08X}", id, | ||
| 511 | static_cast<u32>(transaction), flags); | ||
| 510 | 512 | ||
| 511 | auto buffer_queue = nv_flinger->GetBufferQueue(id); | 513 | auto buffer_queue = nv_flinger->GetBufferQueue(id); |
| 512 | 514 | ||
| @@ -594,9 +596,10 @@ private: | |||
| 594 | 596 | ||
| 595 | void AdjustRefcount(Kernel::HLERequestContext& ctx) { | 597 | void AdjustRefcount(Kernel::HLERequestContext& ctx) { |
| 596 | IPC::RequestParser rp{ctx}; | 598 | IPC::RequestParser rp{ctx}; |
| 597 | u32 id = rp.Pop<u32>(); | 599 | const u32 id = rp.Pop<u32>(); |
| 598 | s32 addval = rp.PopRaw<s32>(); | 600 | const s32 addval = rp.PopRaw<s32>(); |
| 599 | u32 type = rp.Pop<u32>(); | 601 | const u32 type = rp.Pop<u32>(); |
| 602 | |||
| 600 | LOG_WARNING(Service_VI, "(STUBBED) called id={}, addval={:08X}, type={:08X}", id, addval, | 603 | LOG_WARNING(Service_VI, "(STUBBED) called id={}, addval={:08X}, type={:08X}", id, addval, |
| 601 | type); | 604 | type); |
| 602 | 605 | ||
| @@ -606,11 +609,12 @@ private: | |||
| 606 | 609 | ||
| 607 | void GetNativeHandle(Kernel::HLERequestContext& ctx) { | 610 | void GetNativeHandle(Kernel::HLERequestContext& ctx) { |
| 608 | IPC::RequestParser rp{ctx}; | 611 | IPC::RequestParser rp{ctx}; |
| 609 | u32 id = rp.Pop<u32>(); | 612 | const u32 id = rp.Pop<u32>(); |
| 610 | u32 unknown = rp.Pop<u32>(); | 613 | const u32 unknown = rp.Pop<u32>(); |
| 614 | |||
| 611 | LOG_WARNING(Service_VI, "(STUBBED) called id={}, unknown={:08X}", id, unknown); | 615 | LOG_WARNING(Service_VI, "(STUBBED) called id={}, unknown={:08X}", id, unknown); |
| 612 | 616 | ||
| 613 | auto buffer_queue = nv_flinger->GetBufferQueue(id); | 617 | const auto buffer_queue = nv_flinger->GetBufferQueue(id); |
| 614 | 618 | ||
| 615 | // TODO(Subv): Find out what this actually is. | 619 | // TODO(Subv): Find out what this actually is. |
| 616 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 620 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| @@ -675,11 +679,12 @@ public: | |||
| 675 | 679 | ||
| 676 | private: | 680 | private: |
| 677 | void SetLayerZ(Kernel::HLERequestContext& ctx) { | 681 | void SetLayerZ(Kernel::HLERequestContext& ctx) { |
| 678 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 679 | |||
| 680 | IPC::RequestParser rp{ctx}; | 682 | IPC::RequestParser rp{ctx}; |
| 681 | u64 layer_id = rp.Pop<u64>(); | 683 | const u64 layer_id = rp.Pop<u64>(); |
| 682 | u64 z_value = rp.Pop<u64>(); | 684 | const u64 z_value = rp.Pop<u64>(); |
| 685 | |||
| 686 | LOG_WARNING(Service_VI, "(STUBBED) called. layer_id=0x{:016X}, z_value=0x{:016X}", layer_id, | ||
| 687 | z_value); | ||
| 683 | 688 | ||
| 684 | IPC::ResponseBuilder rb{ctx, 2}; | 689 | IPC::ResponseBuilder rb{ctx, 2}; |
| 685 | rb.Push(RESULT_SUCCESS); | 690 | rb.Push(RESULT_SUCCESS); |
| @@ -687,8 +692,9 @@ private: | |||
| 687 | 692 | ||
| 688 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { | 693 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { |
| 689 | IPC::RequestParser rp{ctx}; | 694 | IPC::RequestParser rp{ctx}; |
| 690 | u64 layer_id = rp.Pop<u64>(); | 695 | const u64 layer_id = rp.Pop<u64>(); |
| 691 | bool visibility = rp.Pop<bool>(); | 696 | const bool visibility = rp.Pop<bool>(); |
| 697 | |||
| 692 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, | 698 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:08X}, visibility={}", layer_id, |
| 693 | visibility); | 699 | visibility); |
| 694 | 700 | ||
| @@ -797,25 +803,27 @@ public: | |||
| 797 | 803 | ||
| 798 | private: | 804 | private: |
| 799 | void CloseDisplay(Kernel::HLERequestContext& ctx) { | 805 | void CloseDisplay(Kernel::HLERequestContext& ctx) { |
| 800 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 801 | |||
| 802 | IPC::RequestParser rp{ctx}; | 806 | IPC::RequestParser rp{ctx}; |
| 803 | u64 display = rp.Pop<u64>(); | 807 | const u64 display = rp.Pop<u64>(); |
| 808 | |||
| 809 | LOG_WARNING(Service_VI, "(STUBBED) called. display=0x{:016X}", display); | ||
| 804 | 810 | ||
| 805 | IPC::ResponseBuilder rb{ctx, 2}; | 811 | IPC::ResponseBuilder rb{ctx, 2}; |
| 806 | rb.Push(RESULT_SUCCESS); | 812 | rb.Push(RESULT_SUCCESS); |
| 807 | } | 813 | } |
| 808 | 814 | ||
| 809 | void CreateManagedLayer(Kernel::HLERequestContext& ctx) { | 815 | void CreateManagedLayer(Kernel::HLERequestContext& ctx) { |
| 810 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 811 | |||
| 812 | IPC::RequestParser rp{ctx}; | 816 | IPC::RequestParser rp{ctx}; |
| 813 | u32 unknown = rp.Pop<u32>(); | 817 | const u32 unknown = rp.Pop<u32>(); |
| 814 | rp.Skip(1, false); | 818 | rp.Skip(1, false); |
| 815 | u64 display = rp.Pop<u64>(); | 819 | const u64 display = rp.Pop<u64>(); |
| 816 | u64 aruid = rp.Pop<u64>(); | 820 | const u64 aruid = rp.Pop<u64>(); |
| 817 | 821 | ||
| 818 | u64 layer_id = nv_flinger->CreateLayer(display); | 822 | LOG_WARNING(Service_VI, |
| 823 | "(STUBBED) called. unknown=0x{:08X}, display=0x{:016X}, aruid=0x{:016X}", | ||
| 824 | unknown, display, aruid); | ||
| 825 | |||
| 826 | const u64 layer_id = nv_flinger->CreateLayer(display); | ||
| 819 | 827 | ||
| 820 | IPC::ResponseBuilder rb{ctx, 4}; | 828 | IPC::ResponseBuilder rb{ctx, 4}; |
| 821 | rb.Push(RESULT_SUCCESS); | 829 | rb.Push(RESULT_SUCCESS); |
| @@ -823,11 +831,12 @@ private: | |||
| 823 | } | 831 | } |
| 824 | 832 | ||
| 825 | void AddToLayerStack(Kernel::HLERequestContext& ctx) { | 833 | void AddToLayerStack(Kernel::HLERequestContext& ctx) { |
| 826 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 827 | |||
| 828 | IPC::RequestParser rp{ctx}; | 834 | IPC::RequestParser rp{ctx}; |
| 829 | u32 stack = rp.Pop<u32>(); | 835 | const u32 stack = rp.Pop<u32>(); |
| 830 | u64 layer_id = rp.Pop<u64>(); | 836 | const u64 layer_id = rp.Pop<u64>(); |
| 837 | |||
| 838 | LOG_WARNING(Service_VI, "(STUBBED) called. stack=0x{:08X}, layer_id=0x{:016X}", stack, | ||
| 839 | layer_id); | ||
| 831 | 840 | ||
| 832 | IPC::ResponseBuilder rb{ctx, 2}; | 841 | IPC::ResponseBuilder rb{ctx, 2}; |
| 833 | rb.Push(RESULT_SUCCESS); | 842 | rb.Push(RESULT_SUCCESS); |
| @@ -835,8 +844,9 @@ private: | |||
| 835 | 844 | ||
| 836 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { | 845 | void SetLayerVisibility(Kernel::HLERequestContext& ctx) { |
| 837 | IPC::RequestParser rp{ctx}; | 846 | IPC::RequestParser rp{ctx}; |
| 838 | u64 layer_id = rp.Pop<u64>(); | 847 | const u64 layer_id = rp.Pop<u64>(); |
| 839 | bool visibility = rp.Pop<bool>(); | 848 | const bool visibility = rp.Pop<bool>(); |
| 849 | |||
| 840 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:X}, visibility={}", layer_id, | 850 | LOG_WARNING(Service_VI, "(STUBBED) called, layer_id=0x{:X}, visibility={}", layer_id, |
| 841 | visibility); | 851 | visibility); |
| 842 | 852 | ||
| @@ -902,20 +912,20 @@ private: | |||
| 902 | } | 912 | } |
| 903 | 913 | ||
| 904 | void CloseDisplay(Kernel::HLERequestContext& ctx) { | 914 | void CloseDisplay(Kernel::HLERequestContext& ctx) { |
| 905 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 906 | |||
| 907 | IPC::RequestParser rp{ctx}; | 915 | IPC::RequestParser rp{ctx}; |
| 908 | u64 display_id = rp.Pop<u64>(); | 916 | const u64 display_id = rp.Pop<u64>(); |
| 917 | |||
| 918 | LOG_WARNING(Service_VI, "(STUBBED) called. display_id=0x{:016X}", display_id); | ||
| 909 | 919 | ||
| 910 | IPC::ResponseBuilder rb{ctx, 2}; | 920 | IPC::ResponseBuilder rb{ctx, 2}; |
| 911 | rb.Push(RESULT_SUCCESS); | 921 | rb.Push(RESULT_SUCCESS); |
| 912 | } | 922 | } |
| 913 | 923 | ||
| 914 | void GetDisplayResolution(Kernel::HLERequestContext& ctx) { | 924 | void GetDisplayResolution(Kernel::HLERequestContext& ctx) { |
| 915 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 916 | |||
| 917 | IPC::RequestParser rp{ctx}; | 925 | IPC::RequestParser rp{ctx}; |
| 918 | u64 display_id = rp.Pop<u64>(); | 926 | const u64 display_id = rp.Pop<u64>(); |
| 927 | |||
| 928 | LOG_WARNING(Service_VI, "(STUBBED) called. display_id=0x{:016X}", display_id); | ||
| 919 | 929 | ||
| 920 | IPC::ResponseBuilder rb{ctx, 6}; | 930 | IPC::ResponseBuilder rb{ctx, 6}; |
| 921 | rb.Push(RESULT_SUCCESS); | 931 | rb.Push(RESULT_SUCCESS); |
| @@ -934,11 +944,12 @@ private: | |||
| 934 | } | 944 | } |
| 935 | 945 | ||
| 936 | void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { | 946 | void SetLayerScalingMode(Kernel::HLERequestContext& ctx) { |
| 937 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 938 | |||
| 939 | IPC::RequestParser rp{ctx}; | 947 | IPC::RequestParser rp{ctx}; |
| 940 | u32 scaling_mode = rp.Pop<u32>(); | 948 | const u32 scaling_mode = rp.Pop<u32>(); |
| 941 | u64 unknown = rp.Pop<u64>(); | 949 | const u64 unknown = rp.Pop<u64>(); |
| 950 | |||
| 951 | LOG_WARNING(Service_VI, "(STUBBED) called. scaling_mode=0x{:08X}, unknown=0x{:016X}", | ||
| 952 | scaling_mode, unknown); | ||
| 942 | 953 | ||
| 943 | IPC::ResponseBuilder rb{ctx, 2}; | 954 | IPC::ResponseBuilder rb{ctx, 2}; |
| 944 | rb.Push(RESULT_SUCCESS); | 955 | rb.Push(RESULT_SUCCESS); |
| @@ -958,19 +969,19 @@ private: | |||
| 958 | } | 969 | } |
| 959 | 970 | ||
| 960 | void OpenLayer(Kernel::HLERequestContext& ctx) { | 971 | void OpenLayer(Kernel::HLERequestContext& ctx) { |
| 961 | LOG_DEBUG(Service_VI, "called"); | ||
| 962 | |||
| 963 | IPC::RequestParser rp{ctx}; | 972 | IPC::RequestParser rp{ctx}; |
| 964 | auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); | 973 | const auto name_buf = rp.PopRaw<std::array<u8, 0x40>>(); |
| 965 | auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); | 974 | const auto end = std::find(name_buf.begin(), name_buf.end(), '\0'); |
| 966 | 975 | ||
| 967 | std::string display_name(name_buf.begin(), end); | 976 | const std::string display_name(name_buf.begin(), end); |
| 968 | 977 | ||
| 969 | u64 layer_id = rp.Pop<u64>(); | 978 | const u64 layer_id = rp.Pop<u64>(); |
| 970 | u64 aruid = rp.Pop<u64>(); | 979 | const u64 aruid = rp.Pop<u64>(); |
| 971 | 980 | ||
| 972 | u64 display_id = nv_flinger->OpenDisplay(display_name); | 981 | LOG_DEBUG(Service_VI, "called. layer_id=0x{:016X}, aruid=0x{:016X}", layer_id, aruid); |
| 973 | u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); | 982 | |
| 983 | const u64 display_id = nv_flinger->OpenDisplay(display_name); | ||
| 984 | const u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); | ||
| 974 | 985 | ||
| 975 | NativeWindow native_window{buffer_queue_id}; | 986 | NativeWindow native_window{buffer_queue_id}; |
| 976 | IPC::ResponseBuilder rb{ctx, 4}; | 987 | IPC::ResponseBuilder rb{ctx, 4}; |
| @@ -979,17 +990,17 @@ private: | |||
| 979 | } | 990 | } |
| 980 | 991 | ||
| 981 | void CreateStrayLayer(Kernel::HLERequestContext& ctx) { | 992 | void CreateStrayLayer(Kernel::HLERequestContext& ctx) { |
| 982 | LOG_DEBUG(Service_VI, "called"); | ||
| 983 | |||
| 984 | IPC::RequestParser rp{ctx}; | 993 | IPC::RequestParser rp{ctx}; |
| 985 | u32 flags = rp.Pop<u32>(); | 994 | const u32 flags = rp.Pop<u32>(); |
| 986 | rp.Pop<u32>(); // padding | 995 | rp.Pop<u32>(); // padding |
| 987 | u64 display_id = rp.Pop<u64>(); | 996 | const u64 display_id = rp.Pop<u64>(); |
| 997 | |||
| 998 | LOG_DEBUG(Service_VI, "called. flags=0x{:08X}, display_id=0x{:016X}", flags, display_id); | ||
| 988 | 999 | ||
| 989 | // TODO(Subv): What's the difference between a Stray and a Managed layer? | 1000 | // TODO(Subv): What's the difference between a Stray and a Managed layer? |
| 990 | 1001 | ||
| 991 | u64 layer_id = nv_flinger->CreateLayer(display_id); | 1002 | const u64 layer_id = nv_flinger->CreateLayer(display_id); |
| 992 | u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); | 1003 | const u32 buffer_queue_id = nv_flinger->GetBufferQueueId(display_id, layer_id); |
| 993 | 1004 | ||
| 994 | NativeWindow native_window{buffer_queue_id}; | 1005 | NativeWindow native_window{buffer_queue_id}; |
| 995 | IPC::ResponseBuilder rb{ctx, 6}; | 1006 | IPC::ResponseBuilder rb{ctx, 6}; |
| @@ -999,22 +1010,22 @@ private: | |||
| 999 | } | 1010 | } |
| 1000 | 1011 | ||
| 1001 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { | 1012 | void DestroyStrayLayer(Kernel::HLERequestContext& ctx) { |
| 1002 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 1003 | |||
| 1004 | IPC::RequestParser rp{ctx}; | 1013 | IPC::RequestParser rp{ctx}; |
| 1005 | u64 layer_id = rp.Pop<u64>(); | 1014 | const u64 layer_id = rp.Pop<u64>(); |
| 1015 | |||
| 1016 | LOG_WARNING(Service_VI, "(STUBBED) called. layer_id=0x{:016X}", layer_id); | ||
| 1006 | 1017 | ||
| 1007 | IPC::ResponseBuilder rb{ctx, 2}; | 1018 | IPC::ResponseBuilder rb{ctx, 2}; |
| 1008 | rb.Push(RESULT_SUCCESS); | 1019 | rb.Push(RESULT_SUCCESS); |
| 1009 | } | 1020 | } |
| 1010 | 1021 | ||
| 1011 | void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { | 1022 | void GetDisplayVsyncEvent(Kernel::HLERequestContext& ctx) { |
| 1012 | LOG_WARNING(Service_VI, "(STUBBED) called"); | ||
| 1013 | |||
| 1014 | IPC::RequestParser rp{ctx}; | 1023 | IPC::RequestParser rp{ctx}; |
| 1015 | u64 display_id = rp.Pop<u64>(); | 1024 | const u64 display_id = rp.Pop<u64>(); |
| 1025 | |||
| 1026 | LOG_WARNING(Service_VI, "(STUBBED) called. display_id=0x{:016X}", display_id); | ||
| 1016 | 1027 | ||
| 1017 | auto vsync_event = nv_flinger->GetVsyncEvent(display_id); | 1028 | const auto vsync_event = nv_flinger->GetVsyncEvent(display_id); |
| 1018 | 1029 | ||
| 1019 | IPC::ResponseBuilder rb{ctx, 2, 1}; | 1030 | IPC::ResponseBuilder rb{ctx, 2, 1}; |
| 1020 | rb.Push(RESULT_SUCCESS); | 1031 | rb.Push(RESULT_SUCCESS); |