[D3D12] Can I legally query next back buffer index?

Started by
0 comments, last by Natorin Gaoka 6 months ago

I'm new to D3D12 and graphics programming.

I want to know the next swap chain index legally. Is there any ways to achieve this?
In D3D12 GetCurrentBackBufferIndex() seems to always return (previousBackBufferIndex + 1) % bufferingCount with DXGI_SWAP_EFFECT_FLIP_DISCARD. But is there any official guarantee for this?

Context:

I'm trying do overlap n-1 frame's compute work at the end of the frame with n frame's some geometry work in the begining of the frame.
Which makes it difficult to get buffering index by GetCurrentBackBufferIndex at the begining of n frame. Originally I was using this value for my resources need buffering.

After all, I only need real index from OS just for swap chain buffers retrieved by GetBuffer.
It's okay for me to have my own virtual buffering index for my resources which require buffering. But I'm not very confident this is normal solution for what I'm trying to do.

None

This topic is closed to new replies.

Advertisement