mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-24 15:01:49 +01:00
48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
From 29163332b12cdc1bccb09a3b29501df23c2817d7 Mon Sep 17 00:00:00 2001
|
|
From: psykose <alice@ayaya.dev>
|
|
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())
|
|
--
|
|
2.41.0
|
|
|