Sharing Secondary Command Buffer between 2 windows but with different projections

I achieved sharing a secondary command buffer among 2 different primaries with vkCmdExecutecommandbuffers but can’t find a way to change projections.
Any though?

What do you mean by “projections”? Are you talking about projection matrices? Those would be data stored (presumably) in GPU accessible memory accessed through buffers. CBs can reference them. Of course, you cannot change any GPU memory that is being accessed by a command buffer until that command buffer has completed.

Broadly speaking, what you’re trying to do isn’t an intended use of the API. Instead of trying to use one CB with slightly different data, you’ll have to use two CBs.

Thanks…I was afraid you’re right…I completely mislead with this use case…too bad

I wonder what’s the use of sharing secondary among several primaries…
Do you have an example use case of this kind of stuff?
Ahh…I get it…render surface reuse or iterative render pass…

Within the same frame, there isn’t one. Basically, it’s just the intersection of two distinct features: primary/secondary CBs, and reusable CBs. You could reuse secondary CBs across frames, which is fine for scenes where that’s viable. But there’s no reason for the API to explicitly prohibit the user from trying to reuse a secondary CB within the same frame.

Especially since the API itself doesn’t recognize the concept of “frame”.

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