vk: Improve nvidia speedhack for non-turing cards

- Inverts the chip family check to skip any unidentified GPUs altogether
This commit is contained in:
kd-11 2020-06-28 21:57:43 +03:00 committed by kd-11
parent 9fcbad326a
commit b437794e92
2 changed files with 3 additions and 1 deletions

View File

@ -75,6 +75,7 @@ namespace vk
INTEL
};
// Chip classes grouped by vendor in order of release
enum class chip_class
{
unknown,

View File

@ -519,7 +519,8 @@ namespace vk
case VK_FORMAT_D24_UNORM_S8_UINT:
{
const VkImageAspectFlags depth_stencil = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
if (vk::get_chip_family() != vk::chip_class::NV_turing)
if (const auto chip_family = vk::get_chip_family();
chip_family > vk::chip_class::NV_generic && chip_family < vk::chip_class::NV_turing)
{
auto typeless = vk::get_typeless_helper(VK_FORMAT_B8G8R8A8_UNORM, typeless_w, typeless_h);
change_image_layout(cmd, typeless, VK_IMAGE_LAYOUT_GENERAL);