Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opengl backend should preserve fbo contents when resizing #478

Closed
totaam opened this issue Dec 18, 2013 · 30 comments
Closed

opengl backend should preserve fbo contents when resizing #478

totaam opened this issue Dec 18, 2013 · 30 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Dec 18, 2013

Issue migrated from trac ticket # 478

component: client | priority: critical | resolution: fixed | keywords: opengl

2013-12-18 08:34:13: totaam created the issue


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!

@totaam
Copy link
Collaborator Author

totaam commented Dec 18, 2013

2013-12-18 08:34:45: totaam uploaded file gl-noclear.patch (2.8 KiB)

tries not to clear the textures and fbos when resizing

@totaam
Copy link
Collaborator Author

totaam commented Dec 18, 2013

2013-12-18 08:35:45: totaam uploaded file gl-noclear-screenshot.png (42.0 KiB)

results of resizing with the noclear patch..
gl-noclear-screenshot.png

@totaam
Copy link
Collaborator Author

totaam commented Jan 20, 2014

2014-01-20 11:15:07: totaam changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Jan 20, 2014

2014-01-20 11:15:07: totaam changed owner from antoine to totaam

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2014

2014-03-19 08:38:43: totaam changed priority from major to critical

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2014

2014-03-19 08:38:43: totaam edited the issue description

@totaam
Copy link
Collaborator Author

totaam commented Mar 19, 2014

2014-03-19 08:38:43: totaam commented


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

@totaam
Copy link
Collaborator Author

totaam commented May 17, 2014

2014-05-17 12:15:40: totaam commented


Re-scheduling.

@totaam
Copy link
Collaborator Author

totaam commented Apr 22, 2015

2015-04-22 05:01:25: antoine commented


Best done by someone who understands opengl better than me.

@totaam
Copy link
Collaborator Author

totaam commented Jun 22, 2016

2016-06-22 09:22:26: antoine commented


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

But blocked by #1233#comment:3

@totaam
Copy link
Collaborator Author

totaam commented Jun 30, 2016

2016-06-30 19:33:49: antoine uploaded file gl-resize.patch (4.7 KiB)

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

@totaam
Copy link
Collaborator Author

totaam commented Jul 8, 2016

2016-07-08 07:15:45: psycho_zs commented


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

@totaam
Copy link
Collaborator Author

totaam commented Jul 8, 2016

2016-07-08 17:06:45: antoine changed status from assigned to new

@totaam
Copy link
Collaborator Author

totaam commented Jul 8, 2016

2016-07-08 17:06:45: antoine changed owner from totaam to psycho_zs

@totaam
Copy link
Collaborator Author

totaam commented Jul 8, 2016

2016-07-08 17:06:45: antoine commented


@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)

@totaam
Copy link
Collaborator Author

totaam commented Jul 8, 2016

2016-07-08 19:10:18: psycho_zs commented


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)

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:11:20: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:16:03: psycho_zs uploaded file glxinfo.txt (24.1 KiB)

glxinfo on Intel i7-3540M

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:17:41: psycho_zs commented


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

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:20:49: antoine commented


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

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:29:34: antoine commented


* 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

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:32:33: psycho_zs uploaded file gl_check.txt (14.5 KiB)

Beta release debug gl_check.py

@totaam
Copy link
Collaborator Author

totaam commented Aug 2, 2016

2016-08-02 11:34:36: antoine commented


@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.

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2018

2018-03-28 06:47:12: antoine changed status from new to assigned

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2018

2018-03-28 06:47:12: antoine changed owner from psycho_zs to antoine

@totaam
Copy link
Collaborator Author

totaam commented Mar 28, 2018

2018-03-28 06:47:12: antoine commented


Not heard back, so I assume that the corruption is fixed.

@totaam
Copy link
Collaborator Author

totaam commented Jul 28, 2019

2019-07-28 18:26:28: antoine changed status from assigned to closed

@totaam
Copy link
Collaborator Author

totaam commented Jul 28, 2019

2019-07-28 18:26:28: antoine set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented Jul 28, 2019

2019-07-28 18:26:28: antoine commented


Done in r23332, this will help with #2217.

@totaam totaam closed this as completed Jul 28, 2019
@totaam
Copy link
Collaborator Author

totaam commented Aug 4, 2019

2019-08-04 16:56:26: antoine commented


Disabled on macos: #2372

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant