Bug 38733 - [sna unity] drag & drop desktop icon contains uninitialised junk
Summary: [sna unity] drag & drop desktop icon contains uninitialised junk
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: lowest normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
: 38021 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-06-27 23:36 UTC by Achim Frase
Modified: 2011-09-16 16:29 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
demo video of distorted icon while doing drag & drop (86.46 KB, video/ogg)
2011-06-27 23:37 UTC, Achim Frase
no flags Details
systeminformation (22.61 KB, text/x-log)
2011-06-27 23:38 UTC, Achim Frase
no flags Details

Description Achim Frase 2011-06-27 23:36:54 UTC
Since xorg-edgers enabled sna text or icons are distorted during drag & drop.

Attached is a little demo video and my system specs.
Comment 1 Achim Frase 2011-06-27 23:37:59 UTC
Created attachment 48502 [details]
demo video of distorted icon while doing drag & drop
Comment 2 Achim Frase 2011-06-27 23:38:37 UTC
Created attachment 48503 [details]
systeminformation
Comment 3 Chris Wilson 2011-06-28 00:05:24 UTC
First mentioned in bug 38021. I've not been able to reproduce this using Onieric.

I suspect the answer lies in mesa, and that

diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index b75c46e..33247de 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -187,7 +187,7 @@ sna_dri_create_buffer(DrawablePtr drawable,
 
        pixmap = NULL;
        bo = NULL;
-       usage = CREATE_PIXMAP_USAGE_SCRATCH;
+       usage = 0;
        switch (attachment) {
        case DRI2BufferFrontLeft:
                pixmap = get_drawable_pixmap(drawable);

will paper over the bug.
Comment 4 Chris Wilson 2011-06-28 00:25:17 UTC
*** Bug 38021 has been marked as a duplicate of this bug. ***
Comment 5 Chris Wilson 2011-07-09 03:28:56 UTC
There is very little point debugging these whilst unity is in such a state of disrepair. valgrind has a lot to say about their rendering code, and everything else.
Comment 6 Paul Neumann 2011-09-08 09:53:49 UTC
I am experiencing the same bug when I drag some selected text in chromium. The window manager is xfwm4 with compositing enabled. However there are some conditions to trigger this behaviour.

If I open a new chromium instance, select a relatively small piece of text (1 or 2 lines) and drag that around, the box contains random stuff. This goes on as long as I subsequently select a larger piece than the previous one. However, when I select a piece of text that is smaller than the previous one, everything is ok (mostly). If I just select a lot of text (more than 20 lines), the dragged text appears fine either and any following drags are fine, too.

I can reproduce this with SNA enabled with and without the patch posted by Chris in this bug on my 945GM.
Comment 7 Chris Wilson 2011-09-08 10:13:25 UTC
Thanks, I can reproduce the xfce4+chromium issue easily. My first thought was that it was a Y-tiling issue, but I suspect not now having disabled all Y-tiling. :(
Comment 8 Chris Wilson 2011-09-16 16:29:52 UTC
commit a5b5b4ebb14cab19258dd1cbc12721aaa9df226d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Sep 17 00:28:30 2011 +0100

    sna: Apply the screen offset for direct upload of a composited pixmap
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38733
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.