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

Subpasses, alpha blending, FPK/Early ZS

Hi! We're still in the process of deciding how to better apply subpasses to our application. From other vendors we heard that render passes with transparency may disable hidden surface removal optimization, and Mali docs state that

Blending has a significant impact on performance since blending disables many of the important optimizations that remove fragment overdraw, such as early ZS testing and FPK. 
The negative impact is especially noticeable for user interfaces and 2D games that use multiple layers of sprites.

Can you please elaborate on that, specifically:

  • What is the trigger for optimizations disable? Does driver scan render pass for render pipelines with blending enabled and disables FPK/EZS if it detects any?
  • If subpass fusion is taking effect, all the drawcalls inside different subpasses become a part of a single render pass; does that mean that even if we draw blended objects late in the pass, all of the drawcalls will execute without FPK/EZS?
  • If FPK/EZS are disabled, what other metrics in Streamline, other than FPK/Early ZS killed quads should we look for?
  • If subpass fusion is disabled by the phone vendor, does that still affect FPK/EZS for all of the render pass, or only the subpasses that contain transparent geometry?
  • Hi Ivan,

    This logic is per-pipeline and we will try to re-enable/recover EZ/FPK as soon as possible once relevant draws (e.g. with blending or doing late-Z) have been processed. In other words, there is no 'global' per-pass setting or something like this which is toggled based on what draw are made to the pass or similar. So no need to worry about later draws affecting earlier draws, or effects on earlier draws simply by the presence of later draws (including later draws added as a side-effect of subpass fusion).

    In terms of counters to monitor, you can look at EZ tested/updated/killed vs LZ tested/kill, and for FPK you may want to look for the "FPK occluder quads" counter which counts how many of the rasterized quads are marked as opaque and thus valid occluders for hidden surface removal purposes. 

    Hope that helps!

    Cheers,
    Christian