I'm getting this validation error, but I don't understand what it's trying to tell me:
Validation Error: [ VUID-vkCmdDispatch-None-02697 ] Object 0: handle = 0xa7c5450000000023, type = VK_OBJECT_TYPE_PIPELINE; Object 1: VK_NULL_HANDLE, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0xfd9e3152 | vkCmdDispatch(): The VkPipeline 0xa7c5450000000023[] (created with VkPipelineLayout 0xc4f3070000000021[]) statically uses descriptor set (index #0) which is not compatible with the currently bound descriptor set's pipeline layout (VkPipelineLayout 0x0[]) The Vulkan spec states: For each set n that is statically used by the VkPipeline bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout Compatibility (https://vulkan.lunarg.com/doc/view/1.3.236.0/windows/1.3-extensions/vkspec.html#VUID-vkCmdDispatch-None-02697)
What I'm trying to do is use a compute shader to fill in mipmap levels with some solid colors. This is the compute shader:
uniform layout(binding=0, rgba16f) writeonly image2D mipTexture;
layout (local_size_x = 32, local_size_y = 32, local_size_z = 1) in;
layout(push_constant) uniform UniformBufferObject{
vec4 color;
ivec2 dim;
} ubo;
void main(){
if (gl_GlobalInvocationID.x >= ubo.dim.x || gl_GlobalInvocationID.y >= ubo.dim.y){
return;
}
imageStore(mipTexture, ivec2(gl_GlobalInvocationID.xy), ubo.color);
}
In my pipeline config I set binding slot 0 as a storage image. Then, to bind the image, I use a push descriptor, also using storage image as the type, and binding = 0. The validation error occurs when I dispatch the compute shader. How can I resolve this issue?