Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Closed-loop FBO operation, practical application

  1. #11
    Junior Member Newbie
    Join Date
    May 2016
    Posts
    21
    Quote Originally Posted by kRogue View Post
    glTextureBarrier is essentially a cache flush; So essentially that means all render caches are flushed to video memory and the texture caches are invalidated.

    Also note that doing glTextureBarrier() means that any given draw call must NOT have any overlapping pixels and if two draw calls overlap in screen space, then a glTextureBarrier needs to be between them.

    If one wants to have one's fragment shader read from the surface of a framebuffer -at- the location of its invocation, I (personally) prefer to use GL_ARB_shader_image_load_store together with GL_ARB_fragment_shader_interlock, but that can have negative consequences as well (on some platforms, lossless color buffer compression is disabled on a surface if one access the surface through GL_ARB_shader_image_load_store and the interlock forces ordering in screen space which can be ungood too for performance).

    There is also, for GLES, the extension GL_EXT_shader_framebuffer_fetch. If you are using Mesa with Intel hardware, one can enable this in GL (with a different extension name) if one is willing to hack the driver.
    So that basically means that I can't any of the reduced draw call techniques with a single FBO?

  2. #12
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,928
    Quote Originally Posted by CaptainSnugglebottom View Post
    So that basically means that I can't any of the reduced draw call techniques with a single FBO?
    If by "reduced draw call techniques", you're talking about things like instancing, AZDO and the like, sure you can. So long as all of the stuff between barriers never overlaps anything else in that series of draws.

    Read/modify/write operations are not cheap. They're not things you should do willy-nilly, and they're usually not something you do . Most such techniques involve full-screen passes, where AZDO techniques are essentially irrelevant.

    Also, ARB_fragment_shader_interlock exists for dealing with similar circumstances. But only some hardware supports it.

  3. #13
    Junior Member Newbie
    Join Date
    May 2016
    Posts
    21
    Thanks for the heads up. I will keep that in mind.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •