debugPrintfEXT output not showing up

If I print for every invocation I get the message:Validation layer: Validation Warning: [ UNASSIGNED-DEBUG-PRINTF ] | MessageID = 0x92394c89 | WARNING - Debug Printf message was truncated, likely due to a buffer size that was too small for the message

but if i only print for 10 invocations:

   if(gl_GlobalInvocationID.x < 10)
   {
      debugPrintfEXT("Hello");
   }

then nothing shows up.

I think I have done everything mentioned here https://community.khronos.org/t/im-having-problems-attempting-to-get-the-debugprintfext-working-in-the-shaders/107006/1

  • Device extensions = {VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_KHR_SHADER_NON_SEMANTIC_INFO_EXTENSION_NAME}
  • validation features are set:
VkValidationFeaturesEXT validationFeatures  = {};
VkValidationFeatureEnableEXT enabledFeatures[] = { VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT };
validationFeatures.sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT;
validationFeatures.pEnabledValidationFeatures = enabledFeatures;
validationFeatures.enabledValidationFeatureCount = 1;
validationFeatures.pDisabledValidationFeatures = nullptr;
validationFeatures.disabledValidationFeatureCount = 0;
debugCreateInfo.pNext = (VkDebugUtilsMessengerCreateInfoEXT*)&validationFeatures;
  • debug message severity includes logging
   // Populate debug messenger create info
   void populateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT& createInfo) 
   {
      createInfo = {};
      createInfo.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT;
      createInfo.messageSeverity = VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT;
      createInfo.messageType = VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT | VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT;
      createInfo.pfnUserCallback = debugCallback;
   }

Is there anything I missed? Is there a minimal example of shader printf anywhere?

If this happens to you make sure your debug callback isn’t filtering based on message severity. I’ll leave this post up as a monument to my stupidity