Synchronize framebuffer textures on different contexts 40/283240/6
authorDavid Steele <david.steele@samsung.com>
Thu, 20 Oct 2022 18:29:56 +0000 (19:29 +0100)
committerEunki, Hong <eunkiki.hong@samsung.com>
Thu, 27 Oct 2022 00:59:49 +0000 (09:59 +0900)
commitffee1abdac31e9756f02edfbded64f6d9b3d30b1
tree17a5d9203abbf132a8e5da457f7734b1c46f03a1
parent34e2eb8c6708955950b2c06d67026565a780a137
Synchronize framebuffer textures on different contexts

If a framebuffer's texture is read on a different context to
the one it was written on, then it needs synchronizing first.

This patch introduces a glFenceSync at the end of every render pass,
and calls GlWaitSync just before the texture is bound for a draw call.

The fenceSync is removed after 2 frames, as it cannot be re-used.
Unused fences are deleted at the end of the frame they are created.

Change-Id: I8ca2e7583836132f879d939377ed46c0b8a56556
dali/internal/graphics/gles-impl/egl-graphics-controller.cpp
dali/internal/graphics/gles-impl/egl-graphics-controller.h
dali/internal/graphics/gles-impl/file.list
dali/internal/graphics/gles-impl/gles-context.cpp
dali/internal/graphics/gles-impl/gles-context.h
dali/internal/graphics/gles-impl/gles-graphics-texture.h
dali/internal/graphics/gles-impl/gles-sync-pool.cpp [new file with mode: 0644]
dali/internal/graphics/gles-impl/gles-sync-pool.h [new file with mode: 0644]
dali/internal/graphics/gles-impl/gles-texture-dependency-checker.cpp [new file with mode: 0644]
dali/internal/graphics/gles-impl/gles-texture-dependency-checker.h [new file with mode: 0644]
dali/internal/graphics/gles/egl-graphics.cpp