This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Render to portion of a frame

I am trying to render to just a rectangular portion of the frame. To my knowledge there are two options for this - glScissors and glViewport.

When profiling with DS-5 Streamline on both Mali-400 MP and Mali-450 MP, the number of rasterized fragments is always equal to the number of pixels in the frame. It does not matter if only a portion of the frame is specified. My understanding is, that the driver does not understand, that I have set glScissors or glViewport only once and the fragment shader still processes all pixels of the frame.

Does anyone know of a way to really render to just a portion of the frame?

To be more precise, I am rendering to a texture using OpenGL ES 2.0. I was thinking to attach just a part of the texture to the frame buffer, but I am not aware of any such functionality.

Parents
  • Hi sogartar,

    As Pete has already mentioned, the best way for us to identify if there is a problem here is with a reproducer sample or code snippet to help us understand if the behavior you see is expected or not.

    Some further information while we wait to potentially explain this:

    Scissor and Viewports only block the rendered drawcall, not the readback. It is possible that what you are measuring with DS-5 is the readback.

    You can avoid the readback as well, if you first do a fullscreen (non-scissored) glClear at the beginning of the frame.

    Kind Regards,

    Michael McGeagh

Reply
  • Hi sogartar,

    As Pete has already mentioned, the best way for us to identify if there is a problem here is with a reproducer sample or code snippet to help us understand if the behavior you see is expected or not.

    Some further information while we wait to potentially explain this:

    Scissor and Viewports only block the rendered drawcall, not the readback. It is possible that what you are measuring with DS-5 is the readback.

    You can avoid the readback as well, if you first do a fullscreen (non-scissored) glClear at the beginning of the frame.

    Kind Regards,

    Michael McGeagh

Children