You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a GPU-only SSBO. (It's for a Forward+ tile shading system.) A compute shader populates the SSBO, and later a fragment shader consumes it. There is no CPU-side data at all.
auto buffer = vsg::createBufferAndMemory(
device, size,
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
VK_SHARING_MODE_EXCLUSIVE,
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
auto bufferInfo = vsg::BufferInfo::create(buffer, 0, size);
descriptorBuffer->bufferInfoList = { bufferInfo };
Later, if the window resizes, I wish to resize this buffer. I replace the BufferInfo with a new one, and then compile the new buffer.
This works, but: I found that I have to then go and recreate all DescriptorSet objects and any BindDescriptorSet commands that use the DescriptorBuffer.
Is there a less cumbersome way than locating and rebuilding the descriptor sets? I'm trying to keep things modular so consumers of the SSBO don't need to know who created it, and vice-versa.
Failing that, is there a way to "recompile" those objects without recreating them entirely and updating the scene graph?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I create a GPU-only SSBO. (It's for a Forward+ tile shading system.) A compute shader populates the SSBO, and later a fragment shader consumes it. There is no CPU-side data at all.
Later, if the window resizes, I wish to resize this buffer. I replace the
BufferInfowith a new one, and then compile the new buffer.This works, but: I found that I have to then go and recreate all
DescriptorSetobjects and anyBindDescriptorSetcommands that use theDescriptorBuffer.Is there a less cumbersome way than locating and rebuilding the descriptor sets? I'm trying to keep things modular so consumers of the SSBO don't need to know who created it, and vice-versa.
Failing that, is there a way to "recompile" those objects without recreating them entirely and updating the scene graph?
Beta Was this translation helpful? Give feedback.
All reactions