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 HW/Latte/LegacyShaderDecompiler/LatteDecompilerEmitMSLHeader.hpp
) )
#target_link_libraries(CemuCafe PRIVATE target_link_libraries(CemuCafe PRIVATE
# "-framework Metal" "-framework Metal"
# "-framework QuartzCore" "-framework QuartzCore"
#) )
endif() endif()
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64)|(AARCH64)") if(CMAKE_SYSTEM_PROCESSOR MATCHES "(aarch64)|(AARCH64)")

View file

@ -109,11 +109,16 @@ void LatteShader_calculateFSKey(LatteFetchShader* fetchShader)
key += (uint64)attrib->semanticId; key += (uint64)attrib->semanticId;
key = std::rotl<uint64>(key, 8); key = std::rotl<uint64>(key, 8);
if (g_renderer->GetType() == RendererAPI::Metal) if (g_renderer->GetType() == RendererAPI::Metal)
{
key += (uint64)attrib->offset; key += (uint64)attrib->offset;
else
key += (uint64)(attrib->offset & 3);
key = std::rotl<uint64>(key, 7); key = std::rotl<uint64>(key, 7);
} }
else
{
key += (uint64)(attrib->offset & 3);
key = std::rotl<uint64>(key, 2);
}
}
} }
// todo - also hash invalid buffer groups? // 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++) for (uint32 i = 0; i < devices->count(); i++)
{ {
MTL::Device* device = static_cast<MTL::Device*>(devices->object(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; 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/wxgui.h"
#include "gui/MainWindow.h" #include "gui/MainWindow.h"
#include "gui/guiWrapper.h" #include "gui/guiWrapper.h"
@ -64,6 +62,10 @@
#include "gamemode_client.h" #include "gamemode_client.h"
#endif #endif
#if ENABLE_METAL
#include "Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h"
#endif
#include "Cafe/TitleList/TitleInfo.h" #include "Cafe/TitleList/TitleInfo.h"
#include "Cafe/TitleList/TitleList.h" #include "Cafe/TitleList/TitleList.h"
#include "wxHelper.h" #include "wxHelper.h"