From b12554c5af3e8560b16385dee2e3eac08cce826f Mon Sep 17 00:00:00 2001 From: Triang3l Date: Tue, 25 Feb 2020 08:05:47 +0300 Subject: [PATCH 1/5] [GPU] Add VGT_DRAW_INITIATOR to registers.cc --- src/xenia/gpu/registers.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xenia/gpu/registers.cc b/src/xenia/gpu/registers.cc index df7aaa48a..63274faa4 100644 --- a/src/xenia/gpu/registers.cc +++ b/src/xenia/gpu/registers.cc @@ -19,6 +19,7 @@ constexpr Register WAIT_UNTIL::register_index; constexpr Register SQ_PROGRAM_CNTL::register_index; constexpr Register SQ_CONTEXT_MISC::register_index; +constexpr Register VGT_DRAW_INITIATOR::register_index; constexpr Register VGT_OUTPUT_PATH_CNTL::register_index; constexpr Register VGT_HOS_CNTL::register_index; From 8d5d70c77f6aa4a4271ab0d8d1a00b9c9aaca217 Mon Sep 17 00:00:00 2001 From: gibbed Date: Thu, 20 Feb 2020 01:08:48 -0600 Subject: [PATCH 2/5] [XAM] Don't allow an empty title. [XAM] Don't allow an empty titles because ImGui explodes otherwise. --- src/xenia/kernel/xam/xam_ui.cc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/xenia/kernel/xam/xam_ui.cc b/src/xenia/kernel/xam/xam_ui.cc index e2e01d015..7df8d194c 100644 --- a/src/xenia/kernel/xam/xam_ui.cc +++ b/src/xenia/kernel/xam/xam_ui.cc @@ -38,6 +38,9 @@ class MessageBoxDialog : public xe::ui::ImGuiDialog { buttons_(std::move(buttons)), default_button_(default_button), out_chosen_button_(out_chosen_button) { + if (!title_.size()) { + title_ = "Message Box"; + } if (out_chosen_button) { *out_chosen_button = default_button; } @@ -52,7 +55,9 @@ class MessageBoxDialog : public xe::ui::ImGuiDialog { } if (ImGui::BeginPopupModal(title_.c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::Text("%s", description_.c_str()); + if (description_.size()) { + ImGui::Text("%s", description_.c_str()); + } if (first_draw) { ImGui::SetKeyboardFocusHere(); } @@ -170,6 +175,14 @@ class KeyboardInputDialog : public xe::ui::ImGuiDialog { default_text_(xe::to_string(default_text)), out_text_(out_text), max_length_(max_length) { + if (!title_.size()) { + if (!description_.size()) { + title_ = "Keyboard Input"; + } else { + title_ = description_; + description_ = ""; + } + } if (out_text_) { *out_text_ = default_text; } @@ -187,7 +200,9 @@ class KeyboardInputDialog : public xe::ui::ImGuiDialog { } if (ImGui::BeginPopupModal(title_.c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::TextWrapped("%s", description_.c_str()); + if (description_.size()) { + ImGui::TextWrapped("%s", description_.c_str()); + } if (first_draw) { ImGui::SetKeyboardFocusHere(); } From 0b5ee8a4a32005a443aeff84078427e8533730fb Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Mon, 2 Mar 2020 10:16:01 -0600 Subject: [PATCH 3/5] [Travis] Fix usage of deprecated keys. --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0135e71c4..7536f47a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ language: cpp os: - linux -sudo: required dist: bionic addons: apt: @@ -27,10 +26,9 @@ addons: - libx11-dev - liblz4-dev -matrix: +jobs: include: - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 LINT=true - sudo: false - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 BUILD=true CONFIG=Debug - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 BUILD=true CONFIG=Release From 5558c8aafefffca68ada82d3d7a389ac8fcedde6 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Wed, 19 Feb 2020 18:22:03 +0100 Subject: [PATCH 4/5] [XAM/Network] Implemented NetDll___WSAFDIsSet --- src/xenia/kernel/xam/xam_net.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xenia/kernel/xam/xam_net.cc b/src/xenia/kernel/xam/xam_net.cc index d0a3d70c3..3150b3098 100644 --- a/src/xenia/kernel/xam/xam_net.cc +++ b/src/xenia/kernel/xam/xam_net.cc @@ -941,6 +941,17 @@ dword_result_t NetDll_sendto(dword_t caller, dword_t socket_handle, } DECLARE_XAM_EXPORT1(NetDll_sendto, kNetworking, kImplemented); +dword_result_t NetDll___WSAFDIsSet(dword_t socket_handle, + pointer_t fd_set) { + for (uint32_t i = 0; i < fd_set->fd_count.value; i++) { + if (fd_set->fd_array[i] == socket_handle) { + return 1; + } + } + return 0; +} +DECLARE_XAM_EXPORT1(NetDll___WSAFDIsSet, kNetworking, kImplemented); + void RegisterNetExports(xe::cpu::ExportResolver* export_resolver, KernelState* kernel_state) { SHIM_SET_MAPPING("xam.xex", NetDll_XNetQosServiceLookup, state); From b3d1c5982a3d3f819e13336f489976a91e06e2a5 Mon Sep 17 00:00:00 2001 From: Margen67 Date: Sat, 29 Feb 2020 06:11:31 -0800 Subject: [PATCH 5/5] [CPU] Typo fix --- src/xenia/cpu/backend/x64/x64_seq_memory.cc | 8 ++++---- src/xenia/cpu/hir/opcodes.h | 8 ++++---- src/xenia/cpu/ppc/ppc_emit_memory.cc | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_seq_memory.cc b/src/xenia/cpu/backend/x64/x64_seq_memory.cc index 819285567..f57d8352d 100644 --- a/src/xenia/cpu/backend/x64/x64_seq_memory.cc +++ b/src/xenia/cpu/backend/x64/x64_seq_memory.cc @@ -1045,12 +1045,12 @@ struct CACHE_CONTROL static void Emit(X64Emitter& e, const EmitArgType& i) { bool is_clflush = false, is_prefetch = false; switch (CacheControlType(i.instr->flags)) { - case CacheControlType::CACHE_CONTOROL_TYPE_DATA_TOUCH: - case CacheControlType::CACHE_CONTOROL_TYPE_DATA_TOUCH_FOR_STORE: + case CacheControlType::CACHE_CONTROL_TYPE_DATA_TOUCH: + case CacheControlType::CACHE_CONTROL_TYPE_DATA_TOUCH_FOR_STORE: is_prefetch = true; break; - case CacheControlType::CACHE_CONTOROL_TYPE_DATA_STORE: - case CacheControlType::CACHE_CONTOROL_TYPE_DATA_STORE_AND_FLUSH: + case CacheControlType::CACHE_CONTROL_TYPE_DATA_STORE: + case CacheControlType::CACHE_CONTROL_TYPE_DATA_STORE_AND_FLUSH: is_clflush = true; break; default: diff --git a/src/xenia/cpu/hir/opcodes.h b/src/xenia/cpu/hir/opcodes.h index d0e29347c..488e7e168 100644 --- a/src/xenia/cpu/hir/opcodes.h +++ b/src/xenia/cpu/hir/opcodes.h @@ -40,10 +40,10 @@ enum LoadStoreFlags { }; enum CacheControlType { - CACHE_CONTOROL_TYPE_DATA_TOUCH, - CACHE_CONTOROL_TYPE_DATA_TOUCH_FOR_STORE, - CACHE_CONTOROL_TYPE_DATA_STORE, - CACHE_CONTOROL_TYPE_DATA_STORE_AND_FLUSH, + CACHE_CONTROL_TYPE_DATA_TOUCH, + CACHE_CONTROL_TYPE_DATA_TOUCH_FOR_STORE, + CACHE_CONTROL_TYPE_DATA_STORE, + CACHE_CONTROL_TYPE_DATA_STORE_AND_FLUSH, }; enum ArithmeticFlags { diff --git a/src/xenia/cpu/ppc/ppc_emit_memory.cc b/src/xenia/cpu/ppc/ppc_emit_memory.cc index b24172579..ee347682c 100644 --- a/src/xenia/cpu/ppc/ppc_emit_memory.cc +++ b/src/xenia/cpu/ppc/ppc_emit_memory.cc @@ -1082,26 +1082,26 @@ int InstrEmit_stfsx(PPCHIRBuilder& f, const InstrData& i) { int InstrEmit_dcbf(PPCHIRBuilder& f, const InstrData& i) { Value* ea = CalculateEA_0(f, i.X.RA, i.X.RB); f.CacheControl(ea, 128, - CacheControlType::CACHE_CONTOROL_TYPE_DATA_STORE_AND_FLUSH); + CacheControlType::CACHE_CONTROL_TYPE_DATA_STORE_AND_FLUSH); return 0; } int InstrEmit_dcbst(PPCHIRBuilder& f, const InstrData& i) { Value* ea = CalculateEA_0(f, i.X.RA, i.X.RB); - f.CacheControl(ea, 128, CacheControlType::CACHE_CONTOROL_TYPE_DATA_STORE); + f.CacheControl(ea, 128, CacheControlType::CACHE_CONTROL_TYPE_DATA_STORE); return 0; } int InstrEmit_dcbt(PPCHIRBuilder& f, const InstrData& i) { Value* ea = CalculateEA_0(f, i.X.RA, i.X.RB); - f.CacheControl(ea, 128, CacheControlType::CACHE_CONTOROL_TYPE_DATA_TOUCH); + f.CacheControl(ea, 128, CacheControlType::CACHE_CONTROL_TYPE_DATA_TOUCH); return 0; } int InstrEmit_dcbtst(PPCHIRBuilder& f, const InstrData& i) { Value* ea = CalculateEA_0(f, i.X.RA, i.X.RB); f.CacheControl(ea, 128, - CacheControlType::CACHE_CONTOROL_TYPE_DATA_TOUCH_FOR_STORE); + CacheControlType::CACHE_CONTROL_TYPE_DATA_TOUCH_FOR_STORE); return 0; }