NVENC I-frames

I am using nvenc to encode a series of frames on the GPU. My example is quite synthetic where I simply repeat the same frame. The encoding works fine and I was looking at figuring out what is going on:

One thing I notice is that the beginning frame is an IDR frame (NV_ENC_PIC_TYPE_IDR) and the rest of the frames are all forward predicted frames (NV_ENC_PIC_TYPE_P). I thought this is perhaps because every frame is the same. So, I generated frames where each frame is completely random. In that case, it is the same as well.

So, my question is whether there is something in the configuration which makes all the frames P-frames and there are no B or I frames. Under what conditions would these frames be generated?

Have you solved this problem? I am unable to find something like sc_threshold in libx264 for NVENC, so I frames are still inserted only on GOP interval…

You should set the GOP size, each GOP should start with an I-Frame,so set something like dwGOPLength = 30.
For B-Frames control you should look for something like B-Frames Interval = 0 and P-FramesInterval = 1.
I am not used to NVENC SDK, just used GRID/CAPTURE SDK