fix null handle for nul surface

not every platform uses nullptr, some use 0LL or ((void*)0) directly.

closes #917
This commit is contained in:
psykose 2023-07-26 02:35:43 +00:00 committed by Simon Ser
parent 318fd75952
commit e0c9e75e7f
2 changed files with 3 additions and 3 deletions

View file

@ -662,7 +662,7 @@ int main(int argc, char **argv)
} }
VkInstance instance = vulkan_create_instance(); VkInstance instance = vulkan_create_instance();
VkSurfaceKHR surface = nullptr; VkSurfaceKHR surface = VK_NULL_HANDLE;
if ( !BIsNested() ) if ( !BIsNested() )
{ {

View file

@ -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; 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. // 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. // 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].sampler = m_device->sampler(nearestState);
lut3DDescriptor[i].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; 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()) if (!m_target->isYcbcr())