diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/service/friend/friend.cpp | 11 | ||||
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 6 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_cache.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 10 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_blit_screen.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/shader/decode/arithmetic.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 4 |
11 files changed, 51 insertions, 12 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index e226e9711..e77e82b8d 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -348,6 +348,12 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t | |||
| 348 | if (ext_dir != nullptr) | 348 | if (ext_dir != nullptr) |
| 349 | layers_ext.push_back(std::move(ext_dir)); | 349 | layers_ext.push_back(std::move(ext_dir)); |
| 350 | } | 350 | } |
| 351 | |||
| 352 | // When there are no layers to apply, return early as there is no need to rebuild the RomFS | ||
| 353 | if (layers.empty() && layers_ext.empty()) { | ||
| 354 | return; | ||
| 355 | } | ||
| 356 | |||
| 351 | layers.push_back(std::move(extracted)); | 357 | layers.push_back(std::move(extracted)); |
| 352 | 358 | ||
| 353 | auto layered = LayeredVfsDirectory::MakeLayeredDirectory(std::move(layers)); | 359 | auto layered = LayeredVfsDirectory::MakeLayeredDirectory(std::move(layers)); |
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index 6aadb3ea8..7938b4b80 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp | |||
| @@ -27,7 +27,7 @@ public: | |||
| 27 | {10110, nullptr, "GetFriendProfileImage"}, | 27 | {10110, nullptr, "GetFriendProfileImage"}, |
| 28 | {10200, nullptr, "SendFriendRequestForApplication"}, | 28 | {10200, nullptr, "SendFriendRequestForApplication"}, |
| 29 | {10211, nullptr, "AddFacedFriendRequestForApplication"}, | 29 | {10211, nullptr, "AddFacedFriendRequestForApplication"}, |
| 30 | {10400, nullptr, "GetBlockedUserListIds"}, | 30 | {10400, &IFriendService::GetBlockedUserListIds, "GetBlockedUserListIds"}, |
| 31 | {10500, nullptr, "GetProfileList"}, | 31 | {10500, nullptr, "GetProfileList"}, |
| 32 | {10600, nullptr, "DeclareOpenOnlinePlaySession"}, | 32 | {10600, nullptr, "DeclareOpenOnlinePlaySession"}, |
| 33 | {10601, &IFriendService::DeclareCloseOnlinePlaySession, "DeclareCloseOnlinePlaySession"}, | 33 | {10601, &IFriendService::DeclareCloseOnlinePlaySession, "DeclareCloseOnlinePlaySession"}, |
| @@ -121,6 +121,15 @@ private: | |||
| 121 | }; | 121 | }; |
| 122 | static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size"); | 122 | static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size"); |
| 123 | 123 | ||
| 124 | void GetBlockedUserListIds(Kernel::HLERequestContext& ctx) { | ||
| 125 | // This is safe to stub, as there should be no adverse consequences from reporting no | ||
| 126 | // blocked users. | ||
| 127 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | ||
| 128 | IPC::ResponseBuilder rb{ctx, 3}; | ||
| 129 | rb.Push(RESULT_SUCCESS); | ||
| 130 | rb.Push<u32>(0); // Indicates there are no blocked users | ||
| 131 | } | ||
| 132 | |||
| 124 | void DeclareCloseOnlinePlaySession(Kernel::HLERequestContext& ctx) { | 133 | void DeclareCloseOnlinePlaySession(Kernel::HLERequestContext& ctx) { |
| 125 | // Stub used by Splatoon 2 | 134 | // Stub used by Splatoon 2 |
| 126 | LOG_WARNING(Service_ACC, "(STUBBED) called"); | 135 | LOG_WARNING(Service_ACC, "(STUBBED) called"); |
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index c66c66f6c..430ee86ba 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -1871,7 +1871,8 @@ public: | |||
| 1871 | ICMP_R, | 1871 | ICMP_R, |
| 1872 | ICMP_CR, | 1872 | ICMP_CR, |
| 1873 | ICMP_IMM, | 1873 | ICMP_IMM, |
| 1874 | FCMP_R, | 1874 | FCMP_RR, |
| 1875 | FCMP_RC, | ||
| 1875 | MUFU, // Multi-Function Operator | 1876 | MUFU, // Multi-Function Operator |
| 1876 | RRO_C, // Range Reduction Operator | 1877 | RRO_C, // Range Reduction Operator |
| 1877 | RRO_R, | 1878 | RRO_R, |
| @@ -2179,7 +2180,8 @@ private: | |||
| 2179 | INST("0101110100100---", Id::HSETP2_R, Type::HalfSetPredicate, "HSETP2_R"), | 2180 | INST("0101110100100---", Id::HSETP2_R, Type::HalfSetPredicate, "HSETP2_R"), |
| 2180 | INST("0111111-0-------", Id::HSETP2_IMM, Type::HalfSetPredicate, "HSETP2_IMM"), | 2181 | INST("0111111-0-------", Id::HSETP2_IMM, Type::HalfSetPredicate, "HSETP2_IMM"), |
| 2181 | INST("0101110100011---", Id::HSET2_R, Type::HalfSet, "HSET2_R"), | 2182 | INST("0101110100011---", Id::HSET2_R, Type::HalfSet, "HSET2_R"), |
| 2182 | INST("010110111010----", Id::FCMP_R, Type::Arithmetic, "FCMP_R"), | 2183 | INST("010110111010----", Id::FCMP_RR, Type::Arithmetic, "FCMP_RR"), |
| 2184 | INST("010010111010----", Id::FCMP_RC, Type::Arithmetic, "FCMP_RC"), | ||
| 2183 | INST("0101000010000---", Id::MUFU, Type::Arithmetic, "MUFU"), | 2185 | INST("0101000010000---", Id::MUFU, Type::Arithmetic, "MUFU"), |
| 2184 | INST("0100110010010---", Id::RRO_C, Type::Arithmetic, "RRO_C"), | 2186 | INST("0100110010010---", Id::RRO_C, Type::Arithmetic, "RRO_C"), |
| 2185 | INST("0101110010010---", Id::RRO_R, Type::Arithmetic, "RRO_R"), | 2187 | INST("0101110010010---", Id::RRO_R, Type::Arithmetic, "RRO_R"), |
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index 6d2ff20f9..12c6dcfde 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp | |||
| @@ -34,6 +34,8 @@ | |||
| 34 | namespace OpenGL { | 34 | namespace OpenGL { |
| 35 | 35 | ||
| 36 | using Tegra::Engines::ShaderType; | 36 | using Tegra::Engines::ShaderType; |
| 37 | using VideoCommon::Shader::CompileDepth; | ||
| 38 | using VideoCommon::Shader::CompilerSettings; | ||
| 37 | using VideoCommon::Shader::ProgramCode; | 39 | using VideoCommon::Shader::ProgramCode; |
| 38 | using VideoCommon::Shader::Registry; | 40 | using VideoCommon::Shader::Registry; |
| 39 | using VideoCommon::Shader::ShaderIR; | 41 | using VideoCommon::Shader::ShaderIR; |
| @@ -43,7 +45,7 @@ namespace { | |||
| 43 | constexpr u32 STAGE_MAIN_OFFSET = 10; | 45 | constexpr u32 STAGE_MAIN_OFFSET = 10; |
| 44 | constexpr u32 KERNEL_MAIN_OFFSET = 0; | 46 | constexpr u32 KERNEL_MAIN_OFFSET = 0; |
| 45 | 47 | ||
| 46 | constexpr VideoCommon::Shader::CompilerSettings COMPILER_SETTINGS{}; | 48 | constexpr CompilerSettings COMPILER_SETTINGS{CompileDepth::FullDecompile}; |
| 47 | 49 | ||
| 48 | /// Gets the address for the specified shader stage program | 50 | /// Gets the address for the specified shader stage program |
| 49 | GPUVAddr GetShaderAddress(Core::System& system, Maxwell::ShaderProgram program) { | 51 | GPUVAddr GetShaderAddress(Core::System& system, Maxwell::ShaderProgram program) { |
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 1f1f01313..59bbd1211 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -1821,13 +1821,15 @@ private: | |||
| 1821 | Expression HMergeH0(Operation operation) { | 1821 | Expression HMergeH0(Operation operation) { |
| 1822 | const std::string dest = VisitOperand(operation, 0).AsUint(); | 1822 | const std::string dest = VisitOperand(operation, 0).AsUint(); |
| 1823 | const std::string src = VisitOperand(operation, 1).AsUint(); | 1823 | const std::string src = VisitOperand(operation, 1).AsUint(); |
| 1824 | return {fmt::format("bitfieldInsert({}, {}, 0, 16)", dest, src), Type::Uint}; | 1824 | return {fmt::format("vec2(unpackHalf2x16({}).x, unpackHalf2x16({}).y)", src, dest), |
| 1825 | Type::HalfFloat}; | ||
| 1825 | } | 1826 | } |
| 1826 | 1827 | ||
| 1827 | Expression HMergeH1(Operation operation) { | 1828 | Expression HMergeH1(Operation operation) { |
| 1828 | const std::string dest = VisitOperand(operation, 0).AsUint(); | 1829 | const std::string dest = VisitOperand(operation, 0).AsUint(); |
| 1829 | const std::string src = VisitOperand(operation, 1).AsUint(); | 1830 | const std::string src = VisitOperand(operation, 1).AsUint(); |
| 1830 | return {fmt::format("bitfieldInsert({}, {}, 16, 16)", dest, src), Type::Uint}; | 1831 | return {fmt::format("vec2(unpackHalf2x16({}).x, unpackHalf2x16({}).y)", dest, src), |
| 1832 | Type::HalfFloat}; | ||
| 1831 | } | 1833 | } |
| 1832 | 1834 | ||
| 1833 | Expression HPack2(Operation operation) { | 1835 | Expression HPack2(Operation operation) { |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 0b4d999d7..2729d1265 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -417,7 +417,7 @@ void CachedSurfaceView::Attach(GLenum attachment, GLenum target) const { | |||
| 417 | 417 | ||
| 418 | switch (params.target) { | 418 | switch (params.target) { |
| 419 | case SurfaceTarget::Texture2DArray: | 419 | case SurfaceTarget::Texture2DArray: |
| 420 | glFramebufferTexture(target, attachment, GetTexture(), params.base_level); | 420 | glFramebufferTexture(target, attachment, GetTexture(), 0); |
| 421 | break; | 421 | break; |
| 422 | default: | 422 | default: |
| 423 | UNIMPLEMENTED(); | 423 | UNIMPLEMENTED(); |
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 143478863..8681b821f 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -360,6 +360,7 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib | |||
| 360 | default: | 360 | default: |
| 361 | break; | 361 | break; |
| 362 | } | 362 | } |
| 363 | break; | ||
| 363 | case Maxwell::VertexAttribute::Type::UnsignedInt: | 364 | case Maxwell::VertexAttribute::Type::UnsignedInt: |
| 364 | switch (size) { | 365 | switch (size) { |
| 365 | case Maxwell::VertexAttribute::Size::Size_8: | 366 | case Maxwell::VertexAttribute::Size::Size_8: |
| @@ -370,6 +371,14 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib | |||
| 370 | return VK_FORMAT_R8G8B8_UINT; | 371 | return VK_FORMAT_R8G8B8_UINT; |
| 371 | case Maxwell::VertexAttribute::Size::Size_8_8_8_8: | 372 | case Maxwell::VertexAttribute::Size::Size_8_8_8_8: |
| 372 | return VK_FORMAT_R8G8B8A8_UINT; | 373 | return VK_FORMAT_R8G8B8A8_UINT; |
| 374 | case Maxwell::VertexAttribute::Size::Size_16: | ||
| 375 | return VK_FORMAT_R16_UINT; | ||
| 376 | case Maxwell::VertexAttribute::Size::Size_16_16: | ||
| 377 | return VK_FORMAT_R16G16_UINT; | ||
| 378 | case Maxwell::VertexAttribute::Size::Size_16_16_16: | ||
| 379 | return VK_FORMAT_R16G16B16_UINT; | ||
| 380 | case Maxwell::VertexAttribute::Size::Size_16_16_16_16: | ||
| 381 | return VK_FORMAT_R16G16B16A16_UINT; | ||
| 373 | case Maxwell::VertexAttribute::Size::Size_32: | 382 | case Maxwell::VertexAttribute::Size::Size_32: |
| 374 | return VK_FORMAT_R32_UINT; | 383 | return VK_FORMAT_R32_UINT; |
| 375 | case Maxwell::VertexAttribute::Size::Size_32_32: | 384 | case Maxwell::VertexAttribute::Size::Size_32_32: |
| @@ -381,6 +390,7 @@ VkFormat VertexFormat(Maxwell::VertexAttribute::Type type, Maxwell::VertexAttrib | |||
| 381 | default: | 390 | default: |
| 382 | break; | 391 | break; |
| 383 | } | 392 | } |
| 393 | break; | ||
| 384 | case Maxwell::VertexAttribute::Type::UnsignedScaled: | 394 | case Maxwell::VertexAttribute::Type::UnsignedScaled: |
| 385 | switch (size) { | 395 | switch (size) { |
| 386 | case Maxwell::VertexAttribute::Size::Size_8: | 396 | case Maxwell::VertexAttribute::Size::Size_8: |
diff --git a/src/video_core/renderer_vulkan/vk_blit_screen.cpp b/src/video_core/renderer_vulkan/vk_blit_screen.cpp index 21644a7e7..fbd406f2b 100644 --- a/src/video_core/renderer_vulkan/vk_blit_screen.cpp +++ b/src/video_core/renderer_vulkan/vk_blit_screen.cpp | |||
| @@ -535,7 +535,9 @@ void VKBlitScreen::CreateGraphicsPipeline() { | |||
| 535 | viewport_state_ci.pNext = nullptr; | 535 | viewport_state_ci.pNext = nullptr; |
| 536 | viewport_state_ci.flags = 0; | 536 | viewport_state_ci.flags = 0; |
| 537 | viewport_state_ci.viewportCount = 1; | 537 | viewport_state_ci.viewportCount = 1; |
| 538 | viewport_state_ci.pViewports = nullptr; | ||
| 538 | viewport_state_ci.scissorCount = 1; | 539 | viewport_state_ci.scissorCount = 1; |
| 540 | viewport_state_ci.pScissors = nullptr; | ||
| 539 | 541 | ||
| 540 | VkPipelineRasterizationStateCreateInfo rasterization_ci; | 542 | VkPipelineRasterizationStateCreateInfo rasterization_ci; |
| 541 | rasterization_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; | 543 | rasterization_ci.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 33cbc0bb6..774ba1f26 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -62,13 +62,16 @@ constexpr auto ComputeShaderIndex = static_cast<std::size_t>(Tegra::Engines::Sha | |||
| 62 | 62 | ||
| 63 | VkViewport GetViewportState(const VKDevice& device, const Maxwell& regs, std::size_t index) { | 63 | VkViewport GetViewportState(const VKDevice& device, const Maxwell& regs, std::size_t index) { |
| 64 | const auto& src = regs.viewport_transform[index]; | 64 | const auto& src = regs.viewport_transform[index]; |
| 65 | const float width = src.scale_x * 2.0f; | ||
| 66 | const float height = src.scale_y * 2.0f; | ||
| 67 | |||
| 65 | VkViewport viewport; | 68 | VkViewport viewport; |
| 66 | viewport.x = src.translate_x - src.scale_x; | 69 | viewport.x = src.translate_x - src.scale_x; |
| 67 | viewport.y = src.translate_y - src.scale_y; | 70 | viewport.y = src.translate_y - src.scale_y; |
| 68 | viewport.width = src.scale_x * 2.0f; | 71 | viewport.width = width != 0.0f ? width : 1.0f; |
| 69 | viewport.height = src.scale_y * 2.0f; | 72 | viewport.height = height != 0.0f ? height : 1.0f; |
| 70 | 73 | ||
| 71 | const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne; | 74 | const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1.0f : 0.0f; |
| 72 | viewport.minDepth = src.translate_z - src.scale_z * reduce_z; | 75 | viewport.minDepth = src.translate_z - src.scale_z * reduce_z; |
| 73 | viewport.maxDepth = src.translate_z + src.scale_z; | 76 | viewport.maxDepth = src.translate_z + src.scale_z; |
| 74 | if (!device.IsExtDepthRangeUnrestrictedSupported()) { | 77 | if (!device.IsExtDepthRangeUnrestrictedSupported()) { |
diff --git a/src/video_core/shader/decode/arithmetic.cpp b/src/video_core/shader/decode/arithmetic.cpp index 478394682..4db329fa5 100644 --- a/src/video_core/shader/decode/arithmetic.cpp +++ b/src/video_core/shader/decode/arithmetic.cpp | |||
| @@ -136,7 +136,8 @@ u32 ShaderIR::DecodeArithmetic(NodeBlock& bb, u32 pc) { | |||
| 136 | SetRegister(bb, instr.gpr0, value); | 136 | SetRegister(bb, instr.gpr0, value); |
| 137 | break; | 137 | break; |
| 138 | } | 138 | } |
| 139 | case OpCode::Id::FCMP_R: { | 139 | case OpCode::Id::FCMP_RR: |
| 140 | case OpCode::Id::FCMP_RC: { | ||
| 140 | UNIMPLEMENTED_IF(instr.fcmp.ftz == 0); | 141 | UNIMPLEMENTED_IF(instr.fcmp.ftz == 0); |
| 141 | Node op_c = GetRegister(instr.gpr39); | 142 | Node op_c = GetRegister(instr.gpr39); |
| 142 | Node comp = GetPredicateComparisonFloat(instr.fcmp.cond, std::move(op_c), Immediate(0.0f)); | 143 | Node comp = GetPredicateComparisonFloat(instr.fcmp.cond, std::move(op_c), Immediate(0.0f)); |
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index cfc7fe6e9..4edd4313b 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -509,7 +509,9 @@ private: | |||
| 509 | } | 509 | } |
| 510 | const auto& final_params = new_surface->GetSurfaceParams(); | 510 | const auto& final_params = new_surface->GetSurfaceParams(); |
| 511 | if (cr_params.type != final_params.type) { | 511 | if (cr_params.type != final_params.type) { |
| 512 | BufferCopy(current_surface, new_surface); | 512 | if (Settings::values.use_accurate_gpu_emulation) { |
| 513 | BufferCopy(current_surface, new_surface); | ||
| 514 | } | ||
| 513 | } else { | 515 | } else { |
| 514 | std::vector<CopyParams> bricks = current_surface->BreakDown(final_params); | 516 | std::vector<CopyParams> bricks = current_surface->BreakDown(final_params); |
| 515 | for (auto& brick : bricks) { | 517 | for (auto& brick : bricks) { |