Skip to content

Commit 8496fc1

Browse files
authored
Merge branch 'main' into metal
2 parents 7fb3e1b + 9812a47 commit 8496fc1

File tree

9 files changed

+35
-31
lines changed

9 files changed

+35
-31
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ BinPackArguments: true
1515
BinPackParameters: true
1616
BraceWrapping:
1717
AfterCaseLabel: true
18+
AfterClass: true
1819
AfterControlStatement: Always
1920
AfterEnum: true
2021
AfterExternBlock: true

.github/workflows/build.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ jobs:
2424
submodules: "recursive"
2525
fetch-depth: 0
2626

27-
- name: "Fetch full history for vcpkg submodule"
28-
run: |
29-
cd dependencies/vcpkg
30-
git fetch --unshallow
31-
3227
- name: Setup release mode parameters (for deploy)
3328
if: ${{ inputs.deploymode == 'release' }}
3429
run: |
@@ -133,11 +128,6 @@ jobs:
133128
with:
134129
submodules: "recursive"
135130

136-
- name: "Fetch full history for vcpkg submodule"
137-
run: |
138-
cd dependencies/vcpkg
139-
git fetch --unshallow
140-
141131
- name: Setup release mode parameters (for deploy)
142132
if: ${{ inputs.deploymode == 'release' }}
143133
run: |
@@ -212,11 +202,6 @@ jobs:
212202
with:
213203
submodules: "recursive"
214204

215-
- name: "Fetch full history for vcpkg submodule"
216-
run: |
217-
cd dependencies/vcpkg
218-
git fetch --unshallow
219-
220205
- name: Setup release mode parameters (for deploy)
221206
if: ${{ inputs.deploymode == 'release' }}
222207
run: |

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,16 @@
99
[submodule "dependencies/vcpkg"]
1010
path = dependencies/vcpkg
1111
url = https://github.com/microsoft/vcpkg
12-
shallow = true
12+
shallow = false
1313
[submodule "dependencies/Vulkan-Headers"]
1414
path = dependencies/Vulkan-Headers
1515
url = https://github.com/KhronosGroup/Vulkan-Headers
16+
shallow = true
1617
[submodule "dependencies/imgui"]
1718
path = dependencies/imgui
1819
url = https://github.com/ocornut/imgui
20+
shallow = true
1921
[submodule "dependencies/metal-cpp"]
2022
path = dependencies/metal-cpp
2123
url = https://github.com/bkaradzic/metal-cpp.git
24+
shallow = true

CMakeLists.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ if (EXPERIMENTAL_VERSION)
1616
endif()
1717

1818
if (ENABLE_VCPKG)
19+
# check if vcpkg is shallow and unshallow it if necessary
20+
execute_process(
21+
COMMAND git rev-parse --is-shallow-repository
22+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/dependencies/vcpkg
23+
OUTPUT_VARIABLE is_vcpkg_shallow
24+
OUTPUT_STRIP_TRAILING_WHITESPACE
25+
)
26+
27+
if(is_vcpkg_shallow STREQUAL "true")
28+
message(STATUS "vcpkg is shallow. Unshallowing it now...")
29+
execute_process(
30+
COMMAND git fetch --unshallow
31+
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/dependencies/vcpkg"
32+
RESULT_VARIABLE result
33+
OUTPUT_VARIABLE output
34+
)
35+
endif()
36+
1937
if(UNIX AND NOT APPLE)
2038
set(VCPKG_OVERLAY_PORTS "${CMAKE_CURRENT_LIST_DIR}/dependencies/vcpkg_overlay_ports_linux")
2139
elseif(APPLE)

bin/shaderCache/info.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineCompiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ void PipelineCompiler::InitDepthStencilState()
826826

827827
depthStencilState.front.reference = stencilRefFront;
828828
depthStencilState.front.compareMask = stencilCompareMaskFront;
829-
depthStencilState.front.writeMask = stencilWriteMaskBack;
829+
depthStencilState.front.writeMask = stencilWriteMaskFront;
830830
depthStencilState.front.compareOp = vkDepthCompareTable[(size_t)frontStencilFunc];
831831
depthStencilState.front.depthFailOp = stencilOpTable[(size_t)frontStencilZFail];
832832
depthStencilState.front.failOp = stencilOpTable[(size_t)frontStencilFail];

src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include "Cafe/HW/Latte/Core/LatteBufferCache.h"
99
#include "Cafe/HW/Latte/Core/LattePerformanceMonitor.h"
10+
#include "Cafe/HW/Latte/Core/LatteOverlay.h"
1011

1112
#include "Cafe/HW/Latte/LegacyShaderDecompiler/LatteDecompiler.h"
1213

@@ -29,6 +30,7 @@
2930
#include <glslang/Public/ShaderLang.h>
3031

3132
#include <wx/msgdlg.h>
33+
#include <wx/intl.h> // for localization
3234

3335
#ifndef VK_API_VERSION_MAJOR
3436
#define VK_API_VERSION_MAJOR(version) (((uint32_t)(version) >> 22) & 0x7FU)
@@ -285,7 +287,7 @@ void VulkanRenderer::GetDeviceFeatures()
285287
cemuLog_log(LogType::Force, "VK_EXT_pipeline_creation_cache_control not supported. Cannot use asynchronous shader and pipeline compilation");
286288
// if async shader compilation is enabled show warning message
287289
if (GetConfig().async_compile)
288-
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);
290+
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);
289291
}
290292
if (!m_featureControl.deviceExtensions.custom_border_color_without_format)
291293
{
@@ -2439,6 +2441,11 @@ void VulkanRenderer::GetTextureFormatInfoVK(Latte::E_GX2SURFFMT format, bool isD
24392441
// used by Color Splash and Resident Evil
24402442
formatInfoOut->vkImageFormat = VK_FORMAT_R8G8B8A8_UINT; // todo - should we use ABGR format?
24412443
formatInfoOut->decoder = TextureDecoder_X24_G8_UINT::getInstance(); // todo - verify
2444+
case Latte::E_GX2SURFFMT::R32_X8_FLOAT:
2445+
// seen in Disney Infinity 3.0
2446+
formatInfoOut->vkImageFormat = VK_FORMAT_R32_SFLOAT;
2447+
formatInfoOut->decoder = TextureDecoder_NullData64::getInstance();
2448+
break;
24422449
default:
24432450
cemuLog_log(LogType::Force, "Unsupported color texture format {:04x}", (uint32)format);
24442451
cemu_assert_debug(false);

src/Cafe/OS/libs/nsyshid/BackendWindowsHID.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ namespace nsyshid::backend::windows
6767
device->m_productId);
6868
}
6969
}
70-
else
71-
{
72-
cemuLog_log(LogType::Force,
73-
"nsyshid::BackendWindowsHID: device not on whitelist: {:04x}:{:04x}",
74-
device->m_vendorId,
75-
device->m_productId);
76-
}
7770
}
7871
CloseHandle(hHIDDevice);
7972
}
@@ -125,14 +118,12 @@ namespace nsyshid::backend::windows
125118
}
126119
if (maxPacketInputLength <= 0 || maxPacketInputLength >= 0xF000)
127120
{
128-
cemuLog_log(LogType::Force, "HID: Input packet length not available or out of range (length = {})",
129-
maxPacketInputLength);
121+
cemuLog_logDebug(LogType::Force, "HID: Input packet length not available or out of range (length = {})", maxPacketInputLength);
130122
maxPacketInputLength = 0x20;
131123
}
132124
if (maxPacketOutputLength <= 0 || maxPacketOutputLength >= 0xF000)
133125
{
134-
cemuLog_log(LogType::Force, "HID: Output packet length not available or out of range (length = {})",
135-
maxPacketOutputLength);
126+
cemuLog_logDebug(LogType::Force, "HID: Output packet length not available or out of range (length = {})", maxPacketOutputLength);
136127
maxPacketOutputLength = 0x20;
137128
}
138129

src/config/CemuConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ struct CemuConfig
442442
ConfigValue<int> vsync{ 0 }; // 0 = off, 1+ = on depending on render backend
443443
ConfigValue<bool> gx2drawdone_sync {true};
444444
ConfigValue<bool> render_upside_down{ false };
445-
ConfigValue<bool> async_compile{ false };
445+
ConfigValue<bool> async_compile{ true };
446446

447447
ConfigValue<bool> vk_accurate_barriers{ true };
448448

0 commit comments

Comments
 (0)