It seems like I got partly working, but every time it tries to log I get this message:
Validation Layer: Validation Warning: [ UNASSIGNED-DEBUG-PRINTF ] Object 0: handle = 0x19d6337ae88, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x92394c89 | WARNING - Debug Printf message was truncated, likely due to a buffer size that was too small for the message
I’m only doing a one char test log right now untill I get it working so it shouldn’t have be a problem. I’ve also got #extension GL_EXT_debug_printf : enable enabled in the shader.
This is the compute shader that I’ve attempting to log from and debug.
It’s supposed to do bone animation, but been having some problems with it which lead me to find out about the shader logger.
Your shader print will run for every invocation, probably resulting in more chars printed than the buffer can hold.
Try to either increase the printf_buffer_size, lower the verbosity level of your debug callback, or don’t printf from your shader on every invocation and limit the printfs by using e.g. an if-statement.
hmm, tried increasing the buffer size to a megabyte. Tried loading something small like a cube with 24 vertices and put the test debugPrintfEXT in the vertex shader. Also put a break point at the end of the first frame. The debugger gave me the same message.
Try to lower the verbosity of the messages. VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT will output lots of information, and will cause the buffer truncation. I have just verified this myself.