mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-29 12:34:17 +01:00
Merge branch 'main' into metal
This commit is contained in:
commit
8496fc1574
@ -15,6 +15,7 @@ BinPackArguments: true
|
|||||||
BinPackParameters: true
|
BinPackParameters: true
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
AfterCaseLabel: true
|
AfterCaseLabel: true
|
||||||
|
AfterClass: true
|
||||||
AfterControlStatement: Always
|
AfterControlStatement: Always
|
||||||
AfterEnum: true
|
AfterEnum: true
|
||||||
AfterExternBlock: true
|
AfterExternBlock: true
|
||||||
|
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
@ -24,11 +24,6 @@ jobs:
|
|||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: "Fetch full history for vcpkg submodule"
|
|
||||||
run: |
|
|
||||||
cd dependencies/vcpkg
|
|
||||||
git fetch --unshallow
|
|
||||||
|
|
||||||
- name: Setup release mode parameters (for deploy)
|
- name: Setup release mode parameters (for deploy)
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
@ -133,11 +128,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: "Fetch full history for vcpkg submodule"
|
|
||||||
run: |
|
|
||||||
cd dependencies/vcpkg
|
|
||||||
git fetch --unshallow
|
|
||||||
|
|
||||||
- name: Setup release mode parameters (for deploy)
|
- name: Setup release mode parameters (for deploy)
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
@ -212,11 +202,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: "Fetch full history for vcpkg submodule"
|
|
||||||
run: |
|
|
||||||
cd dependencies/vcpkg
|
|
||||||
git fetch --unshallow
|
|
||||||
|
|
||||||
- name: Setup release mode parameters (for deploy)
|
- name: Setup release mode parameters (for deploy)
|
||||||
if: ${{ inputs.deploymode == 'release' }}
|
if: ${{ inputs.deploymode == 'release' }}
|
||||||
run: |
|
run: |
|
||||||
|
5
.gitmodules
vendored
5
.gitmodules
vendored
@ -9,13 +9,16 @@
|
|||||||
[submodule "dependencies/vcpkg"]
|
[submodule "dependencies/vcpkg"]
|
||||||
path = dependencies/vcpkg
|
path = dependencies/vcpkg
|
||||||
url = https://github.com/microsoft/vcpkg
|
url = https://github.com/microsoft/vcpkg
|
||||||
shallow = true
|
shallow = false
|
||||||
[submodule "dependencies/Vulkan-Headers"]
|
[submodule "dependencies/Vulkan-Headers"]
|
||||||
path = dependencies/Vulkan-Headers
|
path = dependencies/Vulkan-Headers
|
||||||
url = https://github.com/KhronosGroup/Vulkan-Headers
|
url = https://github.com/KhronosGroup/Vulkan-Headers
|
||||||
|
shallow = true
|
||||||
[submodule "dependencies/imgui"]
|
[submodule "dependencies/imgui"]
|
||||||
path = dependencies/imgui
|
path = dependencies/imgui
|
||||||
url = https://github.com/ocornut/imgui
|
url = https://github.com/ocornut/imgui
|
||||||
|
shallow = true
|
||||||
[submodule "dependencies/metal-cpp"]
|
[submodule "dependencies/metal-cpp"]
|
||||||
path = dependencies/metal-cpp
|
path = dependencies/metal-cpp
|
||||||
url = https://github.com/bkaradzic/metal-cpp.git
|
url = https://github.com/bkaradzic/metal-cpp.git
|
||||||
|
shallow = true
|
||||||
|
@ -16,6 +16,24 @@ if (EXPERIMENTAL_VERSION)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_VCPKG)
|
if (ENABLE_VCPKG)
|
||||||
|
# check if vcpkg is shallow and unshallow it if necessary
|
||||||
|
execute_process(
|
||||||
|
COMMAND git rev-parse --is-shallow-repository
|
||||||
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/dependencies/vcpkg
|
||||||
|
OUTPUT_VARIABLE is_vcpkg_shallow
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
)
|
||||||
|
|
||||||
|
if(is_vcpkg_shallow STREQUAL "true")
|
||||||
|
message(STATUS "vcpkg is shallow. Unshallowing it now...")
|
||||||
|
execute_process(
|
||||||
|
COMMAND git fetch --unshallow
|
||||||
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/dependencies/vcpkg"
|
||||||
|
RESULT_VARIABLE result
|
||||||
|
OUTPUT_VARIABLE output
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux")
|
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
If you plan to transfer the shader cache to a different PC or Cemu installation you only need to copy the 'transferable' directory.
|
|
@ -826,7 +826,7 @@ void PipelineCompiler::InitDepthStencilState()
|
|||||||
|
|
||||||
depthStencilState.front.reference = stencilRefFront;
|
depthStencilState.front.reference = stencilRefFront;
|
||||||
depthStencilState.front.compareMask = stencilCompareMaskFront;
|
depthStencilState.front.compareMask = stencilCompareMaskFront;
|
||||||
depthStencilState.front.writeMask = stencilWriteMaskBack;
|
depthStencilState.front.writeMask = stencilWriteMaskFront;
|
||||||
depthStencilState.front.compareOp = vkDepthCompareTable[(size_t)frontStencilFunc];
|
depthStencilState.front.compareOp = vkDepthCompareTable[(size_t)frontStencilFunc];
|
||||||
depthStencilState.front.depthFailOp = stencilOpTable[(size_t)frontStencilZFail];
|
depthStencilState.front.depthFailOp = stencilOpTable[(size_t)frontStencilZFail];
|
||||||
depthStencilState.front.failOp = stencilOpTable[(size_t)frontStencilFail];
|
depthStencilState.front.failOp = stencilOpTable[(size_t)frontStencilFail];
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "Cafe/HW/Latte/Core/LatteBufferCache.h"
|
#include "Cafe/HW/Latte/Core/LatteBufferCache.h"
|
||||||
#include "Cafe/HW/Latte/Core/LattePerformanceMonitor.h"
|
#include "Cafe/HW/Latte/Core/LattePerformanceMonitor.h"
|
||||||
|
#include "Cafe/HW/Latte/Core/LatteOverlay.h"
|
||||||
|
|
||||||
#include "Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h"
|
#include "Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h"
|
||||||
|
|
||||||
@ -29,6 +30,7 @@
|
|||||||
#include <glslang/Public/ShaderLang.h>
|
#include <glslang/Public/ShaderLang.h>
|
||||||
|
|
||||||
#include <wx/msgdlg.h>
|
#include <wx/msgdlg.h>
|
||||||
|
#include <wx/intl.h> // for localization
|
||||||
|
|
||||||
#ifndef VK_API_VERSION_MAJOR
|
#ifndef VK_API_VERSION_MAJOR
|
||||||
#define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22) & 0x7FU)
|
#define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22) & 0x7FU)
|
||||||
@ -285,7 +287,7 @@ void VulkanRenderer::GetDeviceFeatures()
|
|||||||
cemuLog_log(LogType::Force, "VK_EXT_pipeline_creation_cache_control not supported. Cannot use asynchronous shader and pipeline compilation");
|
cemuLog_log(LogType::Force, "VK_EXT_pipeline_creation_cache_control not supported. Cannot use asynchronous shader and pipeline compilation");
|
||||||
// if async shader compilation is enabled show warning message
|
// if async shader compilation is enabled show warning message
|
||||||
if (GetConfig().async_compile)
|
if (GetConfig().async_compile)
|
||||||
wxMessageBox(_("The currently installed graphics driver does not support the Vulkan extension necessary for asynchronous shader compilation. Asynchronous compilation cannot be used.\n \nRequired extension: VK_EXT_pipeline_creation_cache_control\n\nInstalling the latest graphics driver may solve this error."), _("Information"), wxOK | wxCENTRE);
|
LatteOverlay_pushNotification(_("Async shader compile is enabled but not supported by the graphics driver\nCemu will use synchronous compilation which can cause additional stutter").utf8_string(), 10000);
|
||||||
}
|
}
|
||||||
if (!m_featureControl.deviceExtensions.custom_border_color_without_format)
|
if (!m_featureControl.deviceExtensions.custom_border_color_without_format)
|
||||||
{
|
{
|
||||||
@ -2439,6 +2441,11 @@ void VulkanRenderer::GetTextureFormatInfoVK(Latte::E_GX2SURFFMT format, bool isD
|
|||||||
// used by Color Splash and Resident Evil
|
// used by Color Splash and Resident Evil
|
||||||
formatInfoOut->vkImageFormat = VK_FORMAT_R8G8B8A8_UINT; // todo - should we use ABGR format?
|
formatInfoOut->vkImageFormat = VK_FORMAT_R8G8B8A8_UINT; // todo - should we use ABGR format?
|
||||||
formatInfoOut->decoder = TextureDecoder_X24_G8_UINT::getInstance(); // todo - verify
|
formatInfoOut->decoder = TextureDecoder_X24_G8_UINT::getInstance(); // todo - verify
|
||||||
|
case Latte::E_GX2SURFFMT::R32_X8_FLOAT:
|
||||||
|
// seen in Disney Infinity 3.0
|
||||||
|
formatInfoOut->vkImageFormat = VK_FORMAT_R32_SFLOAT;
|
||||||
|
formatInfoOut->decoder = TextureDecoder_NullData64::getInstance();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cemuLog_log(LogType::Force, "Unsupported color texture format {:04x}", (uint32)format);
|
cemuLog_log(LogType::Force, "Unsupported color texture format {:04x}", (uint32)format);
|
||||||
cemu_assert_debug(false);
|
cemu_assert_debug(false);
|
||||||
|
@ -67,13 +67,6 @@ namespace nsyshid::backend::windows
|
|||||||
device->m_productId);
|
device->m_productId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
cemuLog_log(LogType::Force,
|
|
||||||
"nsyshid::BackendWindowsHID: device not on whitelist: {:04x}:{:04x}",
|
|
||||||
device->m_vendorId,
|
|
||||||
device->m_productId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
CloseHandle(hHIDDevice);
|
CloseHandle(hHIDDevice);
|
||||||
}
|
}
|
||||||
@ -125,14 +118,12 @@ namespace nsyshid::backend::windows
|
|||||||
}
|
}
|
||||||
if (maxPacketInputLength <= 0 || maxPacketInputLength >= 0xF000)
|
if (maxPacketInputLength <= 0 || maxPacketInputLength >= 0xF000)
|
||||||
{
|
{
|
||||||
cemuLog_log(LogType::Force, "HID: Input packet length not available or out of range (length = {})",
|
cemuLog_logDebug(LogType::Force, "HID: Input packet length not available or out of range (length = {})", maxPacketInputLength);
|
||||||
maxPacketInputLength);
|
|
||||||
maxPacketInputLength = 0x20;
|
maxPacketInputLength = 0x20;
|
||||||
}
|
}
|
||||||
if (maxPacketOutputLength <= 0 || maxPacketOutputLength >= 0xF000)
|
if (maxPacketOutputLength <= 0 || maxPacketOutputLength >= 0xF000)
|
||||||
{
|
{
|
||||||
cemuLog_log(LogType::Force, "HID: Output packet length not available or out of range (length = {})",
|
cemuLog_logDebug(LogType::Force, "HID: Output packet length not available or out of range (length = {})", maxPacketOutputLength);
|
||||||
maxPacketOutputLength);
|
|
||||||
maxPacketOutputLength = 0x20;
|
maxPacketOutputLength = 0x20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ struct CemuConfig
|
|||||||
ConfigValue<int> vsync{ 0 }; // 0 = off, 1+ = on depending on render backend
|
ConfigValue<int> vsync{ 0 }; // 0 = off, 1+ = on depending on render backend
|
||||||
ConfigValue<bool> gx2drawdone_sync {true};
|
ConfigValue<bool> gx2drawdone_sync {true};
|
||||||
ConfigValue<bool> render_upside_down{ false };
|
ConfigValue<bool> render_upside_down{ false };
|
||||||
ConfigValue<bool> async_compile{ false };
|
ConfigValue<bool> async_compile{ true };
|
||||||
|
|
||||||
ConfigValue<bool> vk_accurate_barriers{ true };
|
ConfigValue<bool> vk_accurate_barriers{ true };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user