Add detail log

This commit is contained in:
2025-11-20 21:37:38 +09:00
parent 1223546fde
commit da6965d979
2 changed files with 20 additions and 0 deletions

View File

@@ -2545,6 +2545,10 @@ bool VulkanVideoRenderer::RenderVulkanImage(VkImage sourceImage, VkSamplerYcbcrC
ycbcrConversionInfo.pNext = nullptr;
ycbcrConversionInfo.conversion = ycbcrConversion;
LOGI("VALIDATION: Creating ImageView with YCbCr conversion=%p", (void*)ycbcrConversionInfo.conversion);
LOGI("VALIDATION: ycbcrConversionInfo.sType=%d (expected %d)",
ycbcrConversionInfo.sType, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO);
// Create ImageView for NV12 format with YCbCr conversion
VkImageViewCreateInfo viewInfo = {};
viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
@@ -2553,6 +2557,7 @@ bool VulkanVideoRenderer::RenderVulkanImage(VkImage sourceImage, VkSamplerYcbcrC
viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D;
viewInfo.format = static_cast<VkFormat>(vkFormat);
LOGI("VALIDATION: ImageView format=%d (0x%X)", vkFormat, vkFormat);
viewInfo.components.r = VK_COMPONENT_SWIZZLE_IDENTITY;
viewInfo.components.g = VK_COMPONENT_SWIZZLE_IDENTITY;
@@ -2581,9 +2586,15 @@ bool VulkanVideoRenderer::RenderVulkanImage(VkImage sourceImage, VkSamplerYcbcrC
samplerYcbcrInfo.pNext = nullptr;
samplerYcbcrInfo.conversion = ycbcrConversion;
LOGI("VALIDATION: Setting up sampler with YCbCr conversion=%p", (void*)samplerYcbcrInfo.conversion);
LOGI("VALIDATION: samplerYcbcrInfo.sType=%d (expected %d)",
samplerYcbcrInfo.sType, VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO);
VkSamplerCreateInfo samplerInfo = {};
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.pNext = &samplerYcbcrInfo; // Chain YCbCr conversion to sampler
LOGI("VALIDATION: samplerInfo.pNext=%p (pointing to YCbCr conversion info)", samplerInfo.pNext);
samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;

View File

@@ -429,10 +429,19 @@ bool MediaCodecSurfaceManager::CreateVulkanImage(void* vk_device, void* vk_insta
}
LogInfo("VkSamplerYcbcrConversion created successfully");
LogInfo(" Conversion Handle: " + std::to_string(reinterpret_cast<uintptr_t>(m_ycbcr_conversion)));
LogInfo(" Format: " + std::to_string(vulkan_format));
LogInfo(" YcbcrModel: " + std::to_string(ycbcrConversionCreateInfo.ycbcrModel));
LogInfo(" YcbcrRange: " + std::to_string(ycbcrConversionCreateInfo.ycbcrRange));
// CRITICAL VALIDATION: Verify conversion handle is not null
if (m_ycbcr_conversion == VK_NULL_HANDLE) {
LogError("CRITICAL: VkSamplerYcbcrConversion is VK_NULL_HANDLE after creation!");
return false;
} else {
LogInfo("VALIDATION OK: VkSamplerYcbcrConversion handle is valid (non-null)");
}
// Step 3: Create VkImage with external memory
VkExternalMemoryImageCreateInfo external_mem_info = {};
external_mem_info.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;