Make the vk_rayquery cvar a bit more robust

This commit is contained in:
Magnus Norddahl 2024-01-21 14:25:08 +01:00
commit e7e89fce09
6 changed files with 12 additions and 17 deletions

View file

@ -28,11 +28,9 @@
#include "hw_material.h"
#include "texturemanager.h"
EXTERN_CVAR(Bool, vk_rayquery);
VkLevelMesh::VkLevelMesh(VulkanRenderDevice* fb) : fb(fb)
{
useRayQuery = vk_rayquery && fb->GetDevice()->SupportsExtension(VK_KHR_RAY_QUERY_EXTENSION_NAME) && fb->GetDevice()->PhysicalDevice.Features.RayQuery.rayQuery;
useRayQuery = fb->IsRayQueryEnabled();
SetLevelMesh(nullptr);
}