Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Vulkan equivalent to OpenGL's pixel buffer object?

Tags:

opengl

vulkan

I did some Googling and it does not appear that Vulkan has a Pixel Buffer Object. Is there something analogous to it in the Vulkan API?

like image 341
Alessandro Power Avatar asked Nov 19 '16 19:11

Alessandro Power


1 Answers

OpenGL doesn't "have a Pixel Buffer Object" either. What OpenGL has is memory, aka: buffer objects. One of the uses of buffer objects is as the source/destination for pixel transfer operations; when used with buffer objects, they can execute asynchronously. While doing this is commonly called "pixel buffer objects", it's not a special object. It's just using OpenGL-allocated memory to perform an asynchronous copy of image data into/outof a buffer object.

OpenGL needs a special system for that because it is inherently a synchronous API. By contrast, almost nothing in Vulkan is synchronous. So Vulkan doesn't need a special system for doing it.

vkCmdCopyImageToBuffer is a Vulkan command, as identified because it starts with vkCmd. As such, it is not executed immediately; such commands are stored in Vulkan command buffers, to be executed by the GPU asynchronously.

Vulkan doesn't have a special system for doing asynchronous pixel copies because Vulkan operations are by default asynchronous. And unlike OpenGL, it will not try to hide this from you.

like image 190
Nicol Bolas Avatar answered Nov 02 '22 12:11

Nicol Bolas