address neebyA's review

This commit is contained in:
Samuliak 2025-05-24 06:57:37 +02:00
parent 43316cf133
commit 144e11be07
No known key found for this signature in database
4 changed files with 16 additions and 9 deletions

View file

@ -593,10 +593,10 @@ if(ENABLE_METAL)
HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSLHeader.hpp
)
#target_link_libraries(CemuCafe PRIVATE
# "-framework Metal"
# "-framework QuartzCore"
#)
target_link_libraries(CemuCafe PRIVATE
"-framework Metal"
"-framework QuartzCore"
)
endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64)|(AARCH64)")

View file

@ -109,10 +109,15 @@ void LatteShader_calculateFSKey(LatteFetchShader* fetchShader)
key += (uint64)attrib->semanticId;
key = std::rotl<uint64>(key, 8);
if (g_renderer->GetType() == RendererAPI::Metal)
{
key += (uint64)attrib->offset;
key = std::rotl<uint64>(key, 7);
}
else
{
key += (uint64)(attrib->offset & 3);
key = std::rotl<uint64>(key, 7);
key = std::rotl<uint64>(key, 2);
}
}
}
// todo - also hash invalid buffer groups?

View file

@ -45,7 +45,7 @@ std::vector<MetalRenderer::DeviceInfo> MetalRenderer::GetDevices()
for (uint32 i = 0; i < devices->count(); i++)
{
MTL::Device* device = static_cast<MTL::Device*>(devices->object(i));
result.emplace_back(std::string(device->name()->utf8String()), device->registryID());
result.push_back({std::string(device->name()->utf8String()), device->registryID()});
}
return result;

View file

@ -1,5 +1,3 @@
#include "Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h"
#include "Cafe/HW/Latte/Renderer/Renderer.h"
#include "gui/wxgui.h"
#include "gui/MainWindow.h"
#include "gui/guiWrapper.h"
@ -64,6 +62,10 @@
#include "gamemode_client.h"
#endif
#if ENABLE_METAL
#include "Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h"
#endif
#include "Cafe/TitleList/TitleInfo.h"
#include "Cafe/TitleList/TitleList.h"
#include "wxHelper.h"
@ -1476,7 +1478,7 @@ void MainWindow::OnKeyDown(wxKeyEvent& event)
#endif
else
{
event.Skip();
event.Skip();
}
}