From e0c9e75e7f86aad80644c289bacdef2d91c599bb Mon Sep 17 00:00:00 2001 From: psykose Date: Wed, 26 Jul 2023 02:35:43 +0000 Subject: [PATCH] fix null handle for nul surface not every platform uses nullptr, some use 0LL or ((void*)0) directly. closes #917 --- src/main.cpp | 2 +- src/rendervulkan.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6f7ec3f..fb4ceeb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -662,7 +662,7 @@ int main(int argc, char **argv) } VkInstance instance = vulkan_create_instance(); - VkSurfaceKHR surface = nullptr; + VkSurfaceKHR surface = VK_NULL_HANDLE; if ( !BIsNested() ) { diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp index 3f7861e..c508979 100644 --- a/src/rendervulkan.cpp +++ b/src/rendervulkan.cpp @@ -1751,11 +1751,11 @@ void CVulkanCmdBuffer::dispatch(uint32_t x, uint32_t y, uint32_t z) shaperLutDescriptor[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; // TODO(Josh): I hate the fact that srgbView = view *as* raw srgb and treat as linear. // I need to change this, it's so utterly stupid and confusing. - shaperLutDescriptor[i].imageView = m_shaperLut[i] ? m_shaperLut[i]->srgbView() : nullptr; + shaperLutDescriptor[i].imageView = m_shaperLut[i] ? m_shaperLut[i]->srgbView() : VK_NULL_HANDLE; lut3DDescriptor[i].sampler = m_device->sampler(nearestState); lut3DDescriptor[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - lut3DDescriptor[i].imageView = m_lut3D[i] ? m_lut3D[i]->srgbView() : nullptr; + lut3DDescriptor[i].imageView = m_lut3D[i] ? m_lut3D[i]->srgbView() : VK_NULL_HANDLE; } if (!m_target->isYcbcr())