Application hangs when switching from SSBO to UBO

Hi everyone,

I am having some problems using a uniform buffer : when accessing any of its members from within the shader, the application hangs and I have to kill it. No validation layer error or warning, just a freeze when submitting the command. If I switch the UBO to a SSBO (“uniform” to “buffer” keyword in GLSL, descriptor type changed in layout & write, poolSizes hints changed), it works flawlessly - What’s wrong? I double checked the spec’s valid usages, but the validation layers should back me up in case I did something wrong with the API.

Here’s the relevant code :

// C++ struct
struct ComputeUBO
	float dt;
	float G;
	float damping;
// Shader code
layout (binding = 0) uniform ubo
	float dt;
	float G;
	float damping;
} param;

// Descriptor Set Layout Binding
VkDescriptorSetLayoutBinding binding = {};
binding.binding = 0;
binding.descriptorCount = 1;
binding.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;

// Descriptor write
VkDescriptorBufferInfo computeParamInfo = {
	computeUBOOffset, // I made sure the alignment requirements were met
	sizeof(ComputeUBO)}; // range under limit
VkWriteDescriptorSet write = {};
write.dstSet = computeDescriptorSet;
write.dstBinding = 0;
write.dstArrayElement = 0;
write.descriptorCount = 1;
write.pBufferInfo = &computeParamInfo;

I have checked the limits and everything should work. I have yet to try it on another driver, as I only have one machine which supports Vulkan, but I will try under Windows if I still can’t get it to work. For info, I’m running Linux, Nvidia driver 375.20 and Vulkan SDK 1.0.30, but If nothing comes up I will try to make a minimal and reproducible example.

Thank you for your time.