How can I retrieve face indices of rendered primitives?

Hi,

Is there a way to retrieve indices of faces which are rendered from a specific camera view?

Currently I have implemented my own rasterization which basically does the same as the underlying renderer, only it returns the visible face indices.

I find it horribly redundant and slow but am not sure how to avoid it?

Using frustum helps to speed up the process, but it is not the end solution because it is important for me to take occlusion into account.