diff options
author | Dor Askayo <dor.askayo@gmail.com> | 2019-11-22 17:12:03 +0100 |
---|---|---|
committer | Michel Dänzer <mdaenzer@redhat.com> | 2019-11-22 17:12:03 +0100 |
commit | ebf549db2d9341d99e0d0847b948dd798d98f7dc (patch) | |
tree | 727a84cb9fd4e5009aa5ad60b189263066fee83c /glamor | |
parent | cb1b1e184723fc4748b9a28736fa07fdc5c2990c (diff) |
glamor: make sure the correct FBO is cleared
This also removes an unnecesary call to glDrawBuffer.
Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
Fixes: 0e9a0c20 - "xwayland: clear pixmaps after creation in rootless
mode"
Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/933
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'glamor')
-rw-r--r-- | glamor/glamor_fbo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/glamor/glamor_fbo.c b/glamor/glamor_fbo.c index 4b3338b43..e045d247e 100644 --- a/glamor/glamor_fbo.c +++ b/glamor/glamor_fbo.c @@ -253,7 +253,8 @@ glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *f glClearTexImage(fbo->tex, 0, pixmap_format->format, pixmap_format->type, NULL); } else { - glDrawBuffer(GL_COLOR_ATTACHMENT0); /* assumes fbo->fb was attached as GL_COLOR_ATTACHMENT0 */ + glamor_set_destination_pixmap_fbo(glamor_priv, fbo, 0, 0, fbo->width, fbo->height); + glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); } |