Mir's compositor holds buffers (blocking clients) for the duration of the frame, even when not necessary.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mir |
Fix Released
|
Medium
|
Daniel van Vugt | ||
mir (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
RenderingOperat
From what I can tell, the holding of the buffer as a "resource" till after the SwapBuffers is required for some APIs, such as glEGLImageTarge
However, Mir software buffers use a simple glTexImage2D which only does a synchronous copy of the data. So it's wasteful holding a reference to the buffer for any longer than the duration of the glTexImage2D call. This will directly affect the round-trip performance of mir_surface_
So in theory, just making our "saved resources" logic a little smarter could significantly improve clients ability to meet frame deadlines.
Related branches
- Alberto Aguirre (community): Approve
- Cemil Azizoglu (community): Approve
- Alan Griffiths: Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- Robert Carr (community): Approve
-
Diff: 655 lines (+157/-61)29 files modifiedbenchmarks/frame-uniformity/vsync_simulating_graphics_platform.cpp (+5/-1)
examples/render_to_fb.cpp (+2/-1)
include/platform/mir/graphics/display_buffer.h (+27/-2)
platform-ABI-sha1sums (+1/-1)
playground/demo-shell/demo_compositor.cpp (+13/-1)
server-ABI-sha1sums (+1/-1)
src/platform/symbols.map (+0/-1)
src/platforms/android/display_buffer.cpp (+5/-1)
src/platforms/android/display_buffer.h (+2/-1)
src/platforms/mesa/display_buffer.cpp (+13/-18)
src/platforms/mesa/display_buffer.h (+3/-2)
src/server/compositor/default_display_buffer_compositor.cpp (+12/-1)
src/server/compositor/screencast_display_buffer.cpp (+5/-1)
src/server/compositor/screencast_display_buffer.h (+2/-1)
src/server/graphics/nested/nested_output.cpp (+5/-1)
src/server/graphics/nested/nested_output.h (+2/-1)
src/server/graphics/offscreen/display_buffer.cpp (+5/-1)
src/server/graphics/offscreen/display_buffer.h (+2/-1)
tests/include/mir_test_doubles/mock_display_buffer.h (+2/-1)
tests/include/mir_test_doubles/null_display_buffer.h (+2/-1)
tests/include/mir_test_doubles/stub_display_builder.h (+2/-1)
tests/integration-tests/graphics/android/test_display_integration.cpp (+4/-2)
tests/integration-tests/test_surface_stack_with_compositor.cpp (+5/-1)
tests/unit-tests/compositor/test_default_display_buffer_compositor.cpp (+15/-5)
tests/unit-tests/compositor/test_screencast_display_buffer.cpp (+2/-2)
tests/unit-tests/graphics/android/test_display_buffer.cpp (+2/-1)
tests/unit-tests/graphics/mesa/test_display.cpp (+4/-2)
tests/unit-tests/graphics/mesa/test_display_buffer.cpp (+9/-5)
tests/unit-tests/graphics/mesa/test_display_multi_monitor.cpp (+5/-3)
summary: |
- RenderingOperator::operator() holds buffers (blocking clients for the - duration of the frame, which is not always necessary for some surface - types (like software) + RenderingOperator::operator() holds buffers (blocking clients) for the + duration of the frame, even when not necessary. |
Changed in mir: | |
assignee: | nobody → Daniel van Vugt (vanvugt) |
importance: | Undecided → Medium |
Changed in mir: | |
status: | New → Triaged |
description: | updated |
summary: |
- RenderingOperator::operator() holds buffers (blocking clients) for the - duration of the frame, even when not necessary. + Mir's compositor holds buffers (blocking clients) for the duration of + the frame, even when not necessary. |
Changed in mir: | |
status: | Fix Committed → Triaged |
Changed in mir: | |
status: | Fix Committed → Fix Released |
so this would only be for SW rendering ?