Return 0,0,0,0 when sampling NULL resources in Spirv Shader Debugger

This commit is contained in:
Jake Turner
2025-09-25 05:57:28 +01:00
parent 4df53b41d3
commit 8ecc23e78d
+15 -4
View File
@@ -746,7 +746,10 @@ public:
// if any descriptor lookup failed, return now
if(!valid)
{
hasResult = false;
return false;
}
VkMarkerRegion markerRegion("QueueSampleGather");
@@ -759,9 +762,13 @@ public:
m_pDriver->GetResourceManager()->GetLiveHandle<VkImageView>(imageDescriptor.view);
VkImageLayout layout = convert((DescriptorSlotImageLayout)imageDescriptor.byteOffset);
// Ignore NULL view
// NULL view : return 0,0,0,0
if(!buffer && (view == VK_NULL_HANDLE))
return false;
{
memset(&output.value, 0, sizeof(output.value));
hasResult = true;
return true;
}
// promote view to Array view
VulkanCreationInfo::ImageView defaultViewProps = {};
@@ -772,9 +779,13 @@ public:
const VulkanCreationInfo::ImageView &viewProps =
buffer ? defaultViewProps : m_Creation.GetImageViewInfo(GetResID(view));
// Ignore NULL image
// NULL image : return 0,0,0,0
if(!buffer && (viewProps.image == ResourceId()))
return false;
{
memset(&output.value, 0, sizeof(output.value));
hasResult = true;
return true;
}
const VulkanCreationInfo::Image &imageProps =
buffer ? defaultImageProps : m_Creation.GetImageInfo(viewProps.image);