Exzap says to use StringHelpers, and int instead of float

This commit is contained in:
Niko 2022-08-27 14:49:29 -04:00
parent 239c458a14
commit 5df72b4425
3 changed files with 7 additions and 6 deletions

View file

@ -46,7 +46,7 @@ uint32 VulkanPipelineStableCache::BeginLoading(uint64 cacheTitleId)
m_numCompilationThreads = std::clamp(cpuCoreCount, 1u, 8u);
if (g_renderer->GetVendor() == GfxVendor::Nvidia)
{
if (VulkanRenderer::GetInstance()->GetDriverVersion() < 515.0f)
if(VulkanRenderer::GetInstance()->GetDriverVersion() < 515)
{
forceLog_printf("Disable multi-threaded pipeline loading due to an issue with Nvidia drivers");
m_numCompilationThreads = 1;

View file

@ -12,6 +12,7 @@
#include "Cafe/CafeSystem.h"
#include "util/helpers/helpers.h"
#include "util/helpers/StringHelpers.h"
#include "config/ActiveSettings.h"
#include "config/CemuConfig.h"
@ -199,8 +200,8 @@ void VulkanRenderer::DetermineVendor()
{
forceLog_printf("Driver version: %s", driverProperties.driverInfo);
// needed for multithreaded pipelines on nvidia (requires 515.0 or higher)
sscanf(driverProperties.driverInfo, "%f", &driverVersion);
// needed for multithreaded pipelines on nvidia (requires 515 or higher)
driverVersion = StringHelpers::ToInt(std::string(driverProperties.driverInfo));
}
else
@ -208,7 +209,7 @@ void VulkanRenderer::DetermineVendor()
forceLog_printf("Driver version (as stored in device info): %08X", properties.properties.driverVersion);
// disables multithreaded pipeline loading on nvidia (requires 515.0 or higher)
driverVersion = 0.0f;
driverVersion = -1;
}
}

View file

@ -1012,7 +1012,7 @@ private:
public:
float GetDriverVersion() { return driverVersion; }
int GetDriverVersion() { return driverVersion; }
bool useTFViaSSBO() { return m_featureControl.mode.useTFEmulationViaSSBO; }
bool IsDebugUtilsEnabled() const
{
@ -1021,7 +1021,7 @@ public:
private:
float driverVersion;
int driverVersion;
// debug
void debug_genericBarrier();