From d18e63e6e22a0b7df7a10086663b0f26b984d358 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 16 Feb 2020 18:09:22 +0300 Subject: [PATCH 1/6] [D3D12] Always write original shader source in DXBC if PIX is attached --- src/xenia/gpu/d3d12/pipeline_cache.cc | 3 ++- src/xenia/gpu/dxbc_shader_translator.cc | 16 +++++++++------- src/xenia/gpu/dxbc_shader_translator.h | 7 ++++++- src/xenia/gpu/dxbc_shader_translator_alu.cc | 2 +- src/xenia/gpu/dxbc_shader_translator_fetch.cc | 4 ++-- 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/xenia/gpu/d3d12/pipeline_cache.cc b/src/xenia/gpu/d3d12/pipeline_cache.cc index f4f374e7c..98d488f4c 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.cc +++ b/src/xenia/gpu/d3d12/pipeline_cache.cc @@ -72,7 +72,8 @@ PipelineCache::PipelineCache(D3D12CommandProcessor* command_processor, auto provider = command_processor_->GetD3D12Context()->GetD3D12Provider(); shader_translator_ = std::make_unique( - provider->GetAdapterVendorID(), edram_rov_used_); + provider->GetAdapterVendorID(), edram_rov_used_, + provider->GetGraphicsAnalysis() != nullptr); if (edram_rov_used_) { depth_only_pixel_shader_ = diff --git a/src/xenia/gpu/dxbc_shader_translator.cc b/src/xenia/gpu/dxbc_shader_translator.cc index f221243a0..e8b27e9ce 100644 --- a/src/xenia/gpu/dxbc_shader_translator.cc +++ b/src/xenia/gpu/dxbc_shader_translator.cc @@ -81,8 +81,10 @@ constexpr uint32_t DxbcShaderTranslator::kCbufferIndexUnallocated; constexpr uint32_t DxbcShaderTranslator::kCfExecBoolConstantNone; DxbcShaderTranslator::DxbcShaderTranslator(uint32_t vendor_id, - bool edram_rov_used) + bool edram_rov_used, + bool force_emit_source_map) : vendor_id_(vendor_id), edram_rov_used_(edram_rov_used) { + emit_source_map_ = force_emit_source_map || cvars::dxbc_source_map; // Don't allocate again and again for the first shader. shader_code_.reserve(8192); shader_object_.reserve(16384); @@ -1963,7 +1965,7 @@ std::vector DxbcShaderTranslator::CompleteTranslation() { } void DxbcShaderTranslator::EmitInstructionDisassembly() { - if (!cvars::dxbc_source_map) { + if (!emit_source_map_) { return; } @@ -2955,7 +2957,7 @@ void DxbcShaderTranslator::ProcessLabel(uint32_t cf_index) { void DxbcShaderTranslator::ProcessExecInstructionBegin( const ParsedExecInstruction& instr) { - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); // Will be emitted by UpdateExecConditionals. @@ -3006,7 +3008,7 @@ void DxbcShaderTranslator::ProcessLoopStartInstruction( // Loop control is outside execs - actually close the last exec. CloseExecConditionals(); - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); EmitInstructionDisassembly(); @@ -3118,7 +3120,7 @@ void DxbcShaderTranslator::ProcessLoopEndInstruction( // Loop control is outside execs - actually close the last exec. CloseExecConditionals(); - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); EmitInstructionDisassembly(); @@ -3276,7 +3278,7 @@ void DxbcShaderTranslator::ProcessLoopEndInstruction( void DxbcShaderTranslator::ProcessJumpInstruction( const ParsedJumpInstruction& instr) { - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); // Will be emitted by UpdateExecConditionals. @@ -3305,7 +3307,7 @@ void DxbcShaderTranslator::ProcessJumpInstruction( void DxbcShaderTranslator::ProcessAllocInstruction( const ParsedAllocInstruction& instr) { - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); EmitInstructionDisassembly(); diff --git a/src/xenia/gpu/dxbc_shader_translator.h b/src/xenia/gpu/dxbc_shader_translator.h index 1bac1ccd7..87891fdd0 100644 --- a/src/xenia/gpu/dxbc_shader_translator.h +++ b/src/xenia/gpu/dxbc_shader_translator.h @@ -55,7 +55,8 @@ namespace gpu { // 0 for NaN. class DxbcShaderTranslator : public ShaderTranslator { public: - DxbcShaderTranslator(uint32_t vendor_id, bool edram_rov_used); + DxbcShaderTranslator(uint32_t vendor_id, bool edram_rov_used, + bool force_emit_source_map = false); ~DxbcShaderTranslator() override; // Constant buffer bindings in space 0. @@ -1874,6 +1875,10 @@ class DxbcShaderTranslator : public ShaderTranslator { // Buffer for instruction disassembly comments. StringBuffer instruction_disassembly_buffer_; + // Whether to write comments with the original Xenos instructions to the + // output. + bool emit_source_map_; + // Vendor ID of the GPU manufacturer, for toggling unsupported features. uint32_t vendor_id_; diff --git a/src/xenia/gpu/dxbc_shader_translator_alu.cc b/src/xenia/gpu/dxbc_shader_translator_alu.cc index bd3a35d96..beef57293 100644 --- a/src/xenia/gpu/dxbc_shader_translator_alu.cc +++ b/src/xenia/gpu/dxbc_shader_translator_alu.cc @@ -2425,7 +2425,7 @@ void DxbcShaderTranslator::ProcessAluInstruction( return; } - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); // Will be emitted by UpdateInstructionPredication. diff --git a/src/xenia/gpu/dxbc_shader_translator_fetch.cc b/src/xenia/gpu/dxbc_shader_translator_fetch.cc index 78d9eb762..c2478424b 100644 --- a/src/xenia/gpu/dxbc_shader_translator_fetch.cc +++ b/src/xenia/gpu/dxbc_shader_translator_fetch.cc @@ -322,7 +322,7 @@ void DxbcShaderTranslator::ProcessVertexFetchInstruction( } uint32_t result_write_mask = (1 << result_component_count) - 1; - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); // Will be emitted by UpdateInstructionPredication. @@ -1162,7 +1162,7 @@ void DxbcShaderTranslator::ArrayCoordToCubeDirection(uint32_t reg) { void DxbcShaderTranslator::ProcessTextureFetchInstruction( const ParsedTextureFetchInstruction& instr) { - if (cvars::dxbc_source_map) { + if (emit_source_map_) { instruction_disassembly_buffer_.Reset(); instr.Disassemble(&instruction_disassembly_buffer_); // Will be emitted later explicitly or by UpdateInstructionPredication. From 710d225d0af77f83869e892d2d7377e81bd18bee Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 16 Feb 2020 19:35:26 +0300 Subject: [PATCH 2/6] [GPU] --gpu_allow_invalid_fetch_constants to bypass invalid fetch constant type errors --- .../gpu/d3d12/d3d12_command_processor.cc | 22 +++++++++++--- src/xenia/gpu/d3d12/render_target_cache.cc | 2 +- src/xenia/gpu/d3d12/texture_cache.cc | 30 ++++++++++++++----- src/xenia/gpu/gpu_flags.cc | 8 +++++ src/xenia/gpu/gpu_flags.h | 2 ++ src/xenia/gpu/trace_viewer.cc | 5 +++- src/xenia/gpu/vulkan/buffer_cache.cc | 21 +++++++++++-- src/xenia/gpu/vulkan/texture_cache.cc | 25 ++++++++++++++-- .../gpu/vulkan/vulkan_command_processor.cc | 2 +- src/xenia/gpu/xenos.h | 14 +++++++-- 10 files changed, 108 insertions(+), 23 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_command_processor.cc b/src/xenia/gpu/d3d12/d3d12_command_processor.cc index 432a6ea11..c903202dc 100644 --- a/src/xenia/gpu/d3d12/d3d12_command_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_command_processor.cc @@ -20,6 +20,7 @@ #include "xenia/gpu/d3d12/d3d12_command_processor.h" #include "xenia/gpu/d3d12/d3d12_graphics_system.h" #include "xenia/gpu/d3d12/d3d12_shader.h" +#include "xenia/gpu/gpu_flags.h" #include "xenia/gpu/xenos.h" #include "xenia/ui/d3d12/d3d12_util.h" @@ -1476,10 +1477,23 @@ bool D3D12CommandProcessor::IssueDraw(PrimitiveType primitive_type, } const auto& vfetch_constant = regs.Get( XE_GPU_REG_SHADER_CONSTANT_FETCH_00_0 + vfetch_index * 2); - if (vfetch_constant.type != 3) { - XELOGW("Vertex fetch type is not 3 (fetch constant %u is %.8X %.8X)!", - vfetch_index, vfetch_constant.dword_0, vfetch_constant.dword_1); - return false; + switch (vfetch_constant.type) { + case xenos::FetchConstantType::kVertex: + break; + case xenos::FetchConstantType::kInvalidVertex: + if (cvars::gpu_allow_invalid_fetch_constants) { + break; + } + XELOGW( + "Vertex fetch constant %u (%.8X %.8X) has \"invalid\" type! This " + "is incorrect behavior, but you can try bypassing this by " + "launching Xenia with --gpu_allow_invalid_fetch_constants=true.", + vfetch_index, vfetch_constant.dword_0, vfetch_constant.dword_1); + return false; + default: + XELOGW("Vertex fetch constant %u (%.8X %.8X) is completely invalid!", + vfetch_index, vfetch_constant.dword_0, vfetch_constant.dword_1); + return false; } if (!shared_memory_->RequestRange(vfetch_constant.address << 2, vfetch_constant.size << 2)) { diff --git a/src/xenia/gpu/d3d12/render_target_cache.cc b/src/xenia/gpu/d3d12/render_target_cache.cc index 22c5cde59..f590566af 100644 --- a/src/xenia/gpu/d3d12/render_target_cache.cc +++ b/src/xenia/gpu/d3d12/render_target_cache.cc @@ -1087,7 +1087,7 @@ bool RenderTargetCache::Resolve(SharedMemory* shared_memory, // HACK: Vertices to use are always in vf0. const auto& fetch = regs.Get( XE_GPU_REG_SHADER_CONSTANT_FETCH_00_0); - assert_true(fetch.type == 3); + assert_true(fetch.type == xenos::FetchConstantType::kVertex); assert_true(fetch.endian == Endian::k8in32); assert_true(fetch.size == 6); trace_writer_->WriteMemoryRead(fetch.address << 2, fetch.size << 2); diff --git a/src/xenia/gpu/d3d12/texture_cache.cc b/src/xenia/gpu/d3d12/texture_cache.cc index 1d1570dee..cc8fb5d88 100644 --- a/src/xenia/gpu/d3d12/texture_cache.cc +++ b/src/xenia/gpu/d3d12/texture_cache.cc @@ -21,6 +21,7 @@ #include "xenia/base/math.h" #include "xenia/base/profiling.h" #include "xenia/gpu/d3d12/d3d12_command_processor.h" +#include "xenia/gpu/gpu_flags.h" #include "xenia/gpu/texture_info.h" #include "xenia/gpu/texture_util.h" #include "xenia/ui/d3d12/d3d12_util.h" @@ -2094,13 +2095,28 @@ void TextureCache::BindingInfoFromFetchConstant( *has_signed_out = false; } - if (fetch.type != 2) { - XELOGW( - "Texture fetch type is not 2 - ignoring (fetch constant is %.8X %.8X " - "%.8X %.8X %.8X %.8X)!", - fetch.dword_0, fetch.dword_1, fetch.dword_2, fetch.dword_3, - fetch.dword_4, fetch.dword_5); - return; + switch (fetch.type) { + case xenos::FetchConstantType::kTexture: + break; + case xenos::FetchConstantType::kInvalidTexture: + if (cvars::gpu_allow_invalid_fetch_constants) { + break; + } + XELOGW( + "Texture fetch constant (%.8X %.8X %.8X %.8X %.8X %.8X) has " + "\"invalid\" type! This is incorrect behavior, but you can try " + "bypassing this by launching Xenia with " + "--gpu_allow_invalid_fetch_constants=true.", + fetch.dword_0, fetch.dword_1, fetch.dword_2, fetch.dword_3, + fetch.dword_4, fetch.dword_5); + return; + default: + XELOGW( + "Texture fetch constant (%.8X %.8X %.8X %.8X %.8X %.8X) is " + "completely invalid!", + fetch.dword_0, fetch.dword_1, fetch.dword_2, fetch.dword_3, + fetch.dword_4, fetch.dword_5); + return; } // Validate the dimensions, get the size and clamp the maximum mip level. diff --git a/src/xenia/gpu/gpu_flags.cc b/src/xenia/gpu/gpu_flags.cc index 68f784f19..90c7b4598 100644 --- a/src/xenia/gpu/gpu_flags.cc +++ b/src/xenia/gpu/gpu_flags.cc @@ -17,3 +17,11 @@ DEFINE_string(dump_shaders, "", "Path to write GPU shaders to as they are compiled.", "GPU"); DEFINE_bool(vsync, true, "Enable VSYNC.", "GPU"); + +DEFINE_bool( + gpu_allow_invalid_fetch_constants, false, + "Allow texture and vertex fetch constants with invalid type - generally " + "unsafe because the constant may contain completely invalid values, but " + "may be used to bypass fetch constant type errors in certain games until " + "the real reason why they're invalid is found.", + "GPU"); diff --git a/src/xenia/gpu/gpu_flags.h b/src/xenia/gpu/gpu_flags.h index 17a95807a..7f1d1815e 100644 --- a/src/xenia/gpu/gpu_flags.h +++ b/src/xenia/gpu/gpu_flags.h @@ -18,4 +18,6 @@ DECLARE_string(dump_shaders); DECLARE_bool(vsync); +DECLARE_bool(gpu_allow_invalid_fetch_constants); + #endif // XENIA_GPU_GPU_FLAGS_H_ diff --git a/src/xenia/gpu/trace_viewer.cc b/src/xenia/gpu/trace_viewer.cc index 298c0b887..77ab7c022 100644 --- a/src/xenia/gpu/trace_viewer.cc +++ b/src/xenia/gpu/trace_viewer.cc @@ -19,6 +19,7 @@ #include "xenia/base/string.h" #include "xenia/base/threading.h" #include "xenia/gpu/command_processor.h" +#include "xenia/gpu/gpu_flags.h" #include "xenia/gpu/graphics_system.h" #include "xenia/gpu/packet_disassembler.h" #include "xenia/gpu/register_file.h" @@ -664,7 +665,9 @@ void TraceViewer::DrawTextureInfo( texture_binding.fetch_constant * 6; auto group = reinterpret_cast(®s.values[r]); auto& fetch = group->texture_fetch; - if (fetch.type != 0x2) { + if (fetch.type != xenos::FetchConstantType::kTexture && + (!cvars::gpu_allow_invalid_fetch_constants || + fetch.type != xenos::FetchConstantType::kInvalidTexture)) { DrawFailedTextureInfo(texture_binding, "Invalid fetch type"); return; } diff --git a/src/xenia/gpu/vulkan/buffer_cache.cc b/src/xenia/gpu/vulkan/buffer_cache.cc index d0e128e1c..af30d9da0 100644 --- a/src/xenia/gpu/vulkan/buffer_cache.cc +++ b/src/xenia/gpu/vulkan/buffer_cache.cc @@ -639,9 +639,24 @@ VkDescriptorSet BufferCache::PrepareVertexSet( break; } - if (fetch->type != 0x3) { - // TODO(DrChat): Some games use type 0x0 (with no data). - return nullptr; + // TODO(DrChat): Some games use type kInvalidTexture (with no data). + switch (fetch->type) { + case xenos::FetchConstantType::kVertex: + break; + case xenos::FetchConstantType::kInvalidVertex: + if (cvars::gpu_allow_invalid_fetch_constants) { + break; + } + XELOGW( + "Vertex fetch constant %u (%.8X %.8X) has \"invalid\" type! This " + "is incorrect behavior, but you can try bypassing this by " + "launching Xenia with --gpu_allow_invalid_fetch_constants=true.", + vertex_binding.fetch_constant, fetch->dword_0, fetch->dword_1); + return nullptr; + default: + XELOGW("Vertex fetch constant %u (%.8X %.8X) is completely invalid!", + vertex_binding.fetch_constant, fetch->dword_0, fetch->dword_1); + return nullptr; } // TODO(benvanik): compute based on indices or vertex count. diff --git a/src/xenia/gpu/vulkan/texture_cache.cc b/src/xenia/gpu/vulkan/texture_cache.cc index 92d8f9fc7..92cca8d36 100644 --- a/src/xenia/gpu/vulkan/texture_cache.cc +++ b/src/xenia/gpu/vulkan/texture_cache.cc @@ -1501,9 +1501,28 @@ bool TextureCache::SetupTextureBinding(VkCommandBuffer command_buffer, // Disabled? // TODO(benvanik): reset sampler. - if (fetch.type != 0x2) { - XELOGGPU("Fetch type is not 2!"); - return false; + switch (fetch.type) { + case xenos::FetchConstantType::kTexture: + break; + case xenos::FetchConstantType::kInvalidTexture: + if (cvars::gpu_allow_invalid_fetch_constants) { + break; + } + XELOGW( + "Texture fetch constant %u (%.8X %.8X %.8X %.8X %.8X %.8X) has " + "\"invalid\" type! This is incorrect behavior, but you can try " + "bypassing this by launching Xenia with " + "--gpu_allow_invalid_fetch_constants=true.", + binding.fetch_constant, fetch.dword_0, fetch.dword_1, fetch.dword_2, + fetch.dword_3, fetch.dword_4, fetch.dword_5); + return false; + default: + XELOGW( + "Texture fetch constant %u (%.8X %.8X %.8X %.8X %.8X %.8X) is " + "completely invalid!", + binding.fetch_constant, fetch.dword_0, fetch.dword_1, fetch.dword_2, + fetch.dword_3, fetch.dword_4, fetch.dword_5); + return false; } TextureInfo texture_info; diff --git a/src/xenia/gpu/vulkan/vulkan_command_processor.cc b/src/xenia/gpu/vulkan/vulkan_command_processor.cc index 336e08a11..46244fbb4 100644 --- a/src/xenia/gpu/vulkan/vulkan_command_processor.cc +++ b/src/xenia/gpu/vulkan/vulkan_command_processor.cc @@ -966,7 +966,7 @@ bool VulkanCommandProcessor::IssueCopy() { fetch = &group->vertex_fetch_2; break; } - assert_true(fetch->type == 3); + assert_true(fetch->type == xenos::FetchConstantType::kVertex); assert_true(fetch->endian == Endian::k8in32); assert_true(fetch->size == 6); const uint8_t* vertex_addr = memory_->TranslatePhysical(fetch->address << 2); diff --git a/src/xenia/gpu/xenos.h b/src/xenia/gpu/xenos.h index 47a5659a4..592a6684a 100644 --- a/src/xenia/gpu/xenos.h +++ b/src/xenia/gpu/xenos.h @@ -605,11 +605,19 @@ inline uint32_t GpuToCpu(uint32_t p) { return p; } inline uint32_t CpuToGpu(uint32_t p) { return p & 0x1FFFFFFF; } +// SQ_TEX_VTX_INVALID/VALID_TEXTURE/BUFFER +enum class FetchConstantType : uint32_t { + kInvalidTexture, + kInvalidVertex, + kTexture, + kVertex, +}; + // XE_GPU_REG_SHADER_CONSTANT_FETCH_* XEPACKEDUNION(xe_gpu_vertex_fetch_t, { XEPACKEDSTRUCTANONYMOUS({ - uint32_t type : 2; // +0 - uint32_t address : 30; // +2 address in dwords + FetchConstantType type : 2; // +0 + uint32_t address : 30; // +2 address in dwords Endian endian : 2; // +0 uint32_t size : 24; // +2 size in words @@ -624,7 +632,7 @@ XEPACKEDUNION(xe_gpu_vertex_fetch_t, { // XE_GPU_REG_SHADER_CONSTANT_FETCH_* XEPACKEDUNION(xe_gpu_texture_fetch_t, { XEPACKEDSTRUCTANONYMOUS({ - uint32_t type : 2; // +0 dword_0 + FetchConstantType type : 2; // +0 dword_0 TextureSign sign_x : 2; // +2 TextureSign sign_y : 2; // +4 TextureSign sign_z : 2; // +6 From 75f98b01b97298ee8d8463bca743465dafe42379 Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Mon, 17 Feb 2020 15:19:38 -0600 Subject: [PATCH 3/6] [AppVeyor] Make checked builds harder to access. [AppVeyor] Hopefully make checked builds harder and more annoying to access for non-developers. --- .appveyor.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 44134f8a4..2dc71aeeb 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,9 +38,16 @@ build_script: after_build: - cmd: | - 7z a xenia-%appveyor_repo_branch%.zip LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb - 7z a xenia-vfs-dump-%appveyor_repo_branch%.zip LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb - 7z a SDL2.zip %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\SDL2.dll + IF "%CONFIGURATION%"=="Checked" ( + set "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%_FOR-DEVS-ONLY" + set "7Z_SWITCHES="-pI know what I am doing." --" + ) ELSE ( + set "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%" + set "7Z_SWITCHES=--" + ) + 7z a xenia_%ARCHIVE_SUFFIX%.zip %7Z_SWITCHES% LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb + 7z a xenia-vfs-dump_%ARCHIVE_SUFFIX%.zip %7Z_SWITCHES% LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb + 7z a SDL2.zip %7Z_SWITCHES% %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\SDL2.dll before_test: - cmd: xb gentests From c72d65ad9f5ae00f07791946ab628fa6d9462e81 Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Mon, 17 Feb 2020 15:38:05 -0600 Subject: [PATCH 4/6] [AppVeyor] AppVeyor doesn't like IF blocks. --- .appveyor.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 2dc71aeeb..95f2b1ed4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -38,13 +38,10 @@ build_script: after_build: - cmd: | - IF "%CONFIGURATION%"=="Checked" ( - set "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%_FOR-DEVS-ONLY" - set "7Z_SWITCHES="-pI know what I am doing." --" - ) ELSE ( - set "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%" - set "7Z_SWITCHES=--" - ) + IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%" + IF NOT "%CONFIGURATION%"=="Checked" SET "7Z_SWITCHES=--" + IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%_FOR-DEVS-ONLY" + IF "%CONFIGURATION%"=="Checked" SET "7Z_SWITCHES="-pI know what I am doing." --" 7z a xenia_%ARCHIVE_SUFFIX%.zip %7Z_SWITCHES% LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb 7z a xenia-vfs-dump_%ARCHIVE_SUFFIX%.zip %7Z_SWITCHES% LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb 7z a SDL2.zip %7Z_SWITCHES% %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\SDL2.dll From 5cef59107026ce84c204f39b8de4302e990248a4 Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Mon, 17 Feb 2020 16:03:06 -0600 Subject: [PATCH 5/6] [AppVeyor] AppVeyor didn't like %7Z_SWITCHES%. --- .appveyor.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 95f2b1ed4..295373f18 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,12 +39,12 @@ build_script: after_build: - cmd: | IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%" - IF NOT "%CONFIGURATION%"=="Checked" SET "7Z_SWITCHES=--" + IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SWITCHES=--" IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%_FOR-DEVS-ONLY" - IF "%CONFIGURATION%"=="Checked" SET "7Z_SWITCHES="-pI know what I am doing." --" - 7z a xenia_%ARCHIVE_SUFFIX%.zip %7Z_SWITCHES% LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb - 7z a xenia-vfs-dump_%ARCHIVE_SUFFIX%.zip %7Z_SWITCHES% LICENSE %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb - 7z a SDL2.zip %7Z_SWITCHES% %APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\SDL2.dll + IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SWITCHES="-pI know what I am doing." --" + 7z a xenia_%ARCHIVE_SUFFIX%.zip %ARCHIVE_SWITCHES% LICENSE "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe" "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb" + 7z a xenia-vfs-dump_%ARCHIVE_SUFFIX%.zip %ARCHIVE_SWITCHES% LICENSE "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe" "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb" + 7z a SDL2.zip %ARCHIVE_SWITCHES% "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\SDL2.dll" before_test: - cmd: xb gentests From 04374888537e8a23b57bb4fe2e80160d4d334f54 Mon Sep 17 00:00:00 2001 From: Rick Gibbed Date: Mon, 17 Feb 2020 16:22:05 -0600 Subject: [PATCH 6/6] [AppVeyor] Grab all ZIPs for artifacts. --- .appveyor.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 295373f18..ea14bfe14 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -53,16 +53,14 @@ test_script: - cmd: xb test --config=%CONFIGURATION% --no_build artifacts: + - path: '*.zip' - path: xenia-cpu-ppc-test.log - - path: xenia-$(appveyor_repo_branch).zip - - path: xenia-vfs-dump-$(appveyor_repo_branch).zip - - path: SDL2.zip deploy: - provider: Environment name: xenia-master release: xenia-$(appveyor_repo_branch)-v$(appveyor_build_version) - artifact: xenia-$(appveyor_repo_branch).zip,xenia-vfs-dump-$(appveyor_repo_branch).zip,SDL2.zip + artifact: '*.zip' draft: false prerelease: true on: