Sending the image in the framebuffer to a compute shader

I wonder if I could send a framebuffer image to a compute shader without loading the image from the framebuffer in the CPU side and then binding it to the compute pipeline again. Can I do it just through the GPU side? or can I just bind the framebuffer image or swapchain image to the compute shader? Is that legal?

When you say “framebuffer image” do you mean swapchain image, i.e. ones retrieved with vkGetSwapchainImagesKHR?
Whether sampling from a swapchain image is allowed depends on the VkSurfaceCapabilitiesKHR.supportedUsageFlags that you can query with vkGetPhysicalDeviceSurfaceCapabilitiesKHR.

1 Like

OK, I just added the swapchain imageview to my descriptor binding. sampling from swap chain didn’t work for me on an integrated intel gpu, but I was able to do it on a good AMD GPU.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.