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