- Survey: return more meaningful info for current OS and Vulkan version.

This commit is contained in:
Christoph Oelckers 2023-09-20 20:03:07 +02:00
parent b3cb2fafc7
commit 7f9df12431
2 changed files with 5 additions and 2 deletions

View file

@ -76,6 +76,7 @@ CVAR(Bool, vk_raytrace, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
// Physical device info
static std::vector<VulkanCompatibleDevice> SupportedDevices;
int vkversion;
CUSTOM_CVAR(Bool, vk_debug, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
@ -513,6 +514,7 @@ void VulkanRenderDevice::PrintStartupLog()
FString apiVersion, driverVersion;
apiVersion.Format("%d.%d.%d", VK_VERSION_MAJOR(props.apiVersion), VK_VERSION_MINOR(props.apiVersion), VK_VERSION_PATCH(props.apiVersion));
driverVersion.Format("%d.%d.%d", VK_VERSION_MAJOR(props.driverVersion), VK_VERSION_MINOR(props.driverVersion), VK_VERSION_PATCH(props.driverVersion));
vkversion = VK_API_VERSION_MAJOR(props.apiVersion) * 100 + VK_API_VERSION_MINOR(props.apiVersion);
Printf("Vulkan device: " TEXTCOLOR_ORANGE "%s\n", props.deviceName);
Printf("Vulkan device type: %s\n", deviceType.GetChars());

View file

@ -48,6 +48,7 @@ CVAR(Int, anonstats_port, 80, CVAR_NOSET)
CVAR(Int, sentstats_hwr_done, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOSET)
std::pair<double, bool> gl_getInfo();
extern int vkversion;
@ -243,7 +244,7 @@ static int GetCoreInfo()
static int GetRenderInfo()
{
if (screen->Backend() == 0) return 1;
if (screen->Backend() == 2) return 1;
if (screen->Backend() == 1) return 4;
auto info = gl_getInfo();
if (!info.second)
@ -255,7 +256,7 @@ static int GetRenderInfo()
static int GetGLVersion()
{
if (screen->Backend() == 1) return 50;
if (screen->Backend() == 1) return vkversion;
auto info = gl_getInfo();
return int(info.first * 10);
}