https://bugs.kde.org/show_bug.cgi?id=376801

--- Comment #6 from Fabio Coatti <fabio.coa...@gmail.com> ---
I've played around a little bit, and the reason that causes compositing to be
switched off seems to be unexpected results from 
glReadnPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, 4, data);

that appears in kwinglutils.cpp, line 594 or so:


static bool checkPixel(int x, int y, const QVector4D &expected, const char
*file, int line)                                                                
{                                                                               
    uint8_t data[4];                                                            
    glReadnPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, 4, data);              

    const QVector4D pixel{data[0] / 255.f, data[1] / 255.f, data[2] / 255.f,
data[3] / 255.f};                                                               

    if (fuzzyCompare(pixel, expected))                                          
        return true;                                                            

    QMessageLogger(file, line, nullptr).warning() << "Pixel was" << pixel <<
"expected" << expected;                                                         
    return false;                                                               
}     

With mesa17, I get this:

(never mind the numbers after pixel2, it is my addition to the code for no real
purpose :) )

feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(1, 0, 0, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 0, 1, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(1, 1, 1, 1) pixel2 QVector4D(0, 0, 0, 192)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0.760784, 0, 0, 0)
expected QVector4D(0.44882, 0.14882, 0.14882, 1) pixel2 QVector4D(194, 0, 0, 0) 
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0.760784, 0, 0, 0)
expected QVector4D(0.50064, 0.80064, 0.50064, 1) pixel2 QVector4D(194, 0, 0, 0) 
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0.760784, 0, 0, 0)
expected QVector4D(0.05054, 0.05054, 0.35054, 1) pixel2 QVector4D(194, 0, 0, 0) 
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0.760784, 0, 0, 0)
expected QVector4D(1, 1, 1, 1) pixel2 QVector4D(194, 0, 0, 0)                   
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0.3, 0, 0, 0.6) pixel2 QVector4D(0, 0, 0, 192)               
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 0.4, 0, 0.6) pixel2 QVector4D(0, 0, 0, 192)               
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0, 0, 0.5, 0.6) pixel2 QVector4D(0, 0, 0, 192)               
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0.3, 0.4, 0.5, 0.6) pixel2 QVector4D(0, 0, 0, 192)           
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0.134646, 0.044646, 0.044646, 0.6) pixel2 QVector4D(0, 0, 0,
192)                             
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0.200256, 0.320256, 0.200256, 0.6) pixel2 QVector4D(0, 0, 0,
192)                             
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0.02527, 0.02527, 0.17527, 0.6) pixel2 QVector4D(0, 0, 0,
192)                                
feb 27 23:22:14 calvin kwin_x11[19991]: Pixel was QVector4D(0, 0, 0, 0.752941)
expected QVector4D(0.360172, 0.390172, 0.420172, 0.6) pixel2 QVector4D(0, 0, 0,
192)                             
feb 27 23:22:14 calvin kwin_x11[19991]: kwin_core: ShaderManager self test
failed                                                                          
feb 27 23:22:14 calvin kwin_x11[19991]: kwin_core: Failed to initialize
compositing, compositing disabled   


While with mesa13 i get the following:

feb 28 08:27:59 calvin kwin_x11[2713]: kwin_core: Initializing OpenGL
compositing                                                                     
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 1, 0, 1) expected
QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 255, 0, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 1, 0, 1) expected
QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 255, 0, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 1, 0, 1) expected
QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 255, 0, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 1, 0, 1) expected
QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 255, 0, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(1, 0, 0, 1) expected
QVector4D(1, 0, 0, 1) pixel2 QVector4D(255, 0, 0, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 1, 0, 1) expected
QVector4D(0, 1, 0, 1) pixel2 QVector4D(0, 255, 0, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 0, 1, 1) expected
QVector4D(0, 0, 1, 1) pixel2 QVector4D(0, 0, 255, 255)                          
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(1, 1, 1, 1) expected
QVector4D(1, 1, 1, 1) pixel2 QVector4D(255, 255, 255, 255)                      
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.447059, 0.14902,
0.14902, 1) expected QVector4D(0.44882, 0.14882, 0.14882, 1) pixel2
QVector4D(114, 38, 38, 255)                   
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.501961, 0.8,
0.501961, 1) expected QVector4D(0.50064, 0.80064, 0.50064, 1) pixel2
QVector4D(128, 204, 128, 255)                    
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.0509804,
0.0509804, 0.34902, 1) expected QVector4D(0.05054, 0.05054, 0.35054, 1) pixel2
QVector4D(13, 13, 89, 255)                 
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(1, 1, 1, 1) expected
QVector4D(1, 1, 1, 1) pixel2 QVector4D(255, 255, 255, 255)                      
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.298039, 0, 0, 0.6)
expected QVector4D(0.3, 0, 0, 0.6) pixel2 QVector4D(76, 0, 0, 153)              
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 0.4, 0, 0.6)
expected QVector4D(0, 0.4, 0, 0.6) pixel2 QVector4D(0, 102, 0, 153)             
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0, 0, 0.501961, 0.6)
expected QVector4D(0, 0, 0.5, 0.6) pixel2 QVector4D(0, 0, 128, 153)             
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.298039, 0.4,
0.501961, 0.6) expected QVector4D(0.3, 0.4, 0.5, 0.6) pixel2 QVector4D(76, 102,
128, 153)                             
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.133333, 0.0431373,
0.0431373, 0.6) expected QVector4D(0.134646, 0.044646, 0.044646, 0.6) pixel2
QVector4D(34, 11, 11, 153)         
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.2, 0.321569, 0.2,
0.6) expected QVector4D(0.200256, 0.320256, 0.200256, 0.6) pixel2 QVector4D(51,
82, 51, 153)                     
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.0235294,
0.0235294, 0.176471, 0.6) expected QVector4D(0.02527, 0.02527, 0.17527, 0.6)
pixel2 QVector4D(6, 6, 45, 153)              
feb 28 08:27:59 calvin kwin_x11[2713]: Pixel was QVector4D(0.360784, 0.388235,
0.419608, 0.6) expected QVector4D(0.360172, 0.390172, 0.420172, 0.6) pixel2
QVector4D(92, 99, 107, 153)  

Maybe something has changed the behaviour of glReadnPixels across versions.
Hoping to ease the process, I'll report the same data on mesa bug tracker.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to