renderer: add finish_without_export for GLES frames - #2158
abhighansala wants to merge 2 commits into
Conversation
|
Hmm, I wonder if it would be better to add a flag to |
That makes sense. I initially introduced finish_without_export() because the intermediate Dual-Kawase passes only need same-context synchronization and don't need an exportable/native fence. Returning a regular EGL syncpoint from finish(false) would be cleaner since the caller can still explicitly synchronize each intermediate pass. I'm happy to rework the PR around an exportable flag. Would you prefer finish(exportable: bool) directly on the Frame trait, or a GLES-specific variant/API so that the existing Frame::finish() interface remains unchanged? |
Directly on the Thanks for taking the time! |
Thanks! That makes sense. I'll rework the PR around Frame::finish(exportable: bool), keeping the synchronization behavior for the non-exportable GLES path while avoiding the native-fence export overhead. I'll also update the other renderer implementations to accept the flag and preserve their existing signaled-fence behavior. |
abhighansala
left a comment
There was a problem hiding this comment.
Reworked the PR based on your feedback.
exportable is now part of the generic Frame::finish(exportable: bool) API rather than a GLES-specific finish_without_export() API.
The flag is propagated through the relevant renderer implementations and MultiRenderer. GLES retains the internal synchronization behavior while only using the exportable fence path when requested.
The latest implementation is in f529531.
Thanks for the guidance!
Description
This PR adds
GlesFrame::finish_without_export()to Smithay's GLES renderer.The new method allows a GLES frame to be finalized without exporting an EGL
SyncPointor falling back toglFinish(), while still performing the normal frame finalization and texture synchronization required by Smithay.This is useful for rendering pipelines that perform multiple intermediate passes where exporting a native EGL fence after every pass is unnecessary. The final rendering pass can still use the existing
finish()method when aSyncPointis required for synchronization outside the intermediate pipeline.The implementation keeps the existing
finish()behavior unchanged and factors the common finalization logic intofinish_internal_impl()with an option controlling whether an export fence should be produced.This change is intended to be used by COSMIC's blur rendering pipeline to avoid unnecessary synchronization overhead between intermediate blur passes. The corresponding COSMIC PR has not yet been submitted.
This PR was developed with assistance from generative AI.
Checklist