xpra icon
Bug tracker and wiki

Opened 4 years ago

Last modified 17 months ago

#478 new defect

opengl backend should preserve fbo contents when resizing

Reported by: Antoine Martin Owned by: psycho_zs
Priority: critical Milestone: future
Component: client Version:
Keywords: opengl Cc:

Description (last modified by Antoine Martin)

At the moment, when we change the size of the backing, we do an almost full gl_init() which clears the textures and fbos.
This makes the screen flicker a little because we have to wait for the next frame before we can paint the actual contents, unlike the pixmap backing which paints the old backing contents onto the new one.

A patch is attached which detects screen size changes and tries to avoid clearing the buffers, but this leads to buffer bleeding on the edges of the old dimensions!? (screenshot also attached)

Another thing we should be able to do is to paint both the fbo and the backbuffer at the same time, instead of painting onto the fbo then doing a full update of the backbuffer from the fbo using present_fbo. Or at the very least, we should pass the coordinates of the region to paint rather than painting the whole window!

Attachments (5)

gl-noclear.patch (2.8 KB) - added by Antoine Martin 4 years ago.
tries not to clear the textures and fbos when resizing
gl-noclear-screenshot.png (42.0 KB) - added by Antoine Martin 4 years ago.
results of resizing with the noclear patch..
gl-resize.patch (4.7 KB) - added by Antoine Martin 18 months ago.
try to use blitframebuffer and the tmpfbo to preserve the contents - no workee
glxinfo.txt (24.1 KB) - added by psycho_zs 17 months ago.
glxinfo on Intel i7-3540M
gl_check.txt (14.5 KB) - added by psycho_zs 17 months ago.
Beta release debug gl_check.py

Download all attachments as: .zip

Change History (18)

Changed 4 years ago by Antoine Martin

Attachment: gl-noclear.patch added

tries not to clear the textures and fbos when resizing

Changed 4 years ago by Antoine Martin

Attachment: gl-noclear-screenshot.png added

results of resizing with the noclear patch..

comment:1 Changed 4 years ago by Antoine Martin

Owner: changed from Antoine Martin to Antoine Martin
Status: newassigned

comment:2 Changed 4 years ago by Antoine Martin

Description: modified (diff)
Milestone: 0.120.13
Priority: majorcritical

Too late for 0.12, but important so raising the priority.

comment:3 Changed 4 years ago by Antoine Martin

Milestone: 0.130.14

Re-scheduling.

comment:4 Changed 3 years ago by Antoine Martin

Milestone: 0.15future

Best done by someone who understands opengl better than me.

comment:5 Changed 18 months ago by Antoine Martin

This should be easier now that we have code that swaps framebuffers: r12878

But blocked by ticket:1233#comment:3

Last edited 18 months ago by Antoine Martin (previous) (diff)

Changed 18 months ago by Antoine Martin

Attachment: gl-resize.patch added

try to use blitframebuffer and the tmpfbo to preserve the contents - no workee

comment:6 Changed 17 months ago by psycho_zs

Is this related to window resizing? with latest 0.18 build window content is visually shifted and shredded when resizing with opengl switched on.

comment:7 Changed 17 months ago by Antoine Martin

Owner: changed from Antoine Martin to psycho_zs
Status: assignednew

@psycho_zs: it is, can you check if the shredding still occurs if you run the client with XPRA_SCROLL_ENCODING=0 xpra attach ... or with opengl turned off? (see #1232 for details)

Last edited 17 months ago by Antoine Martin (previous) (diff)

comment:8 Changed 17 months ago by psycho_zs

No shredding with opengl turned off.
still occurs with XPRA_SCROLL_ENCODING=0 on client side. (xpra 0.18.0, beta package of 2016-06-28)

comment:9 Changed 17 months ago by Antoine Martin

@psycho_zs: can you please post your gl_check (or even the full bug report zip)?

Last edited 17 months ago by Antoine Martin (previous) (diff)

Changed 17 months ago by psycho_zs

Attachment: glxinfo.txt added

glxinfo on Intel i7-3540M

comment:10 Changed 17 months ago by psycho_zs

is that what you've asked, or you mean something from xpra debug output?

comment:11 Changed 17 months ago by Antoine Martin

@psycho_zs: see wiki/ClientRendering/OpenGL: python xpra/client/gl/gl_check.py

comment:12 Changed 17 months ago by Antoine Martin

* renderer                        : Mesa DRI Intel(R) Ivybridge Mobile
* vendor                          : Intel Open Source Technology Center

The Intel drivers don't work properly and should have been greylisted by the gl_check code.
@psycho_zs: can you run with the latest beta build with:

XPRA_OPENGL_DEBUG=1 python xpra/client/gl/gl_check.py

Changed 17 months ago by psycho_zs

Attachment: gl_check.txt added

Beta release debug gl_check.py

comment:13 Changed 17 months ago by Antoine Martin

@psycho_zs: that's now correct and shows:

* safe                            : False

And opengl will not be enabled by default with this Intel card (more info here: #1233), the visual corruption should disappear.

Last edited 17 months ago by Antoine Martin (previous) (diff)
Note: See TracTickets for help on using tickets.