Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: LogicOp, LogicOpEnable, RenderTargetWriteMaskr in FBO attachments

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2015
    Posts
    13

    LogicOp, LogicOpEnable, RenderTargetWriteMaskr in FBO attachments

    "On the wave on bringing closer DirectX and OpenGL can be added ability like in D3D11_RENDER_TARGET_BLEND_DESC1 parameters like LogicOp, LogicOpEnable, RenderTargetWriteMask.
    per color attachment in FBO?
    Something like in GL_EXT_draw_buffers2, but for FBO ?
    Implementation in OpenGL drivers should not be difficult because the same functionality must be in DirectX 11 driver.

    Best regards,
    Jurgus

  2. #2

  3. #3
    Junior Member Newbie
    Join Date
    Dec 2015
    Posts
    13
    So only LogicOp, LogicOpEnable are missing not mush work for greater compability with DirectX

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,714
    Actually in D3D11 we have (source: https://msdn.microsoft.com/en-us/lib...=vs.85%29.aspx)
    When you set the LogicOpEnable member of the first element of the RenderTarget array (RenderTarget[0]) to TRUE, you must also set the BlendEnable member of RenderTarget[0] to FALSE, and the IndependentBlendEnable member of this D3D11_BLEND_DESC1 to FALSE. This reflects the limitation in hardware that you can't mix logic operations with blending across multiple render targets, and that when you use a logic operation, you must apply the same logic operation to all render targets.
    So no, the functionality to have independent per-rendertarget logic op is not in D3D 11 drivers, and missing this functionality is not an issue for OpenGL.

  5. #5
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,924
    It should be noted that Vulkan also doesn't permit logicOps to be enabled per attachment.

    [edit] And D3D 12 has that same annotation on the analogous structure.

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Jan 2007
    Posts
    1,714
    Also that in both cases the D3D documentation notes it as a "limitation in hardware".

    This is clearly "chalk one up for OpenGL" because the API is considerable clearer; in D3D it looks as though you can do it if you just look at the structs, the documentation that says you can't is in one place but not the other, and the struct members controlling it seem to be in the wrong struct (surely with the "when you use a logic operation, you must apply the same logic operation to all render targets" restriction in place, LogicOpEnable and LogicOp should be in D3D11_BLEND_DESC1/D3D12_BLEND_DESC rather than D3D11_RENDER_TARGET_BLEND_DESC1/D3D12_RENDER_TARGET_BLEND_DESC?)

  7. #7
    Senior Member OpenGL Lord
    Join Date
    May 2009
    Posts
    5,924
    Quote Originally Posted by mhagain View Post
    This is clearly "chalk one up for OpenGL" because the API is considerable clearer;
    And Vulkan, BTW.

    However, it's only cleaner until hardware improves to incorporate the feature. Then D3D looks cleaner.

    Of course in Vulkan, that's easily changed with a couple of new struct definitions. Then the API is clean again.

Posting Permissions

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