Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Image and warning X3206: implicit truncation of vector type



  • Hello,
    I am porting my app from QtQuick 1.1 to 2.0 and I have following code:
    @
    Item {
    id: container
    width: 61
    height: 59
    property url bgImage: "qrc:/images/buttons/button1.png"

    Image {
        id: __bgImage
        source: container.bgImage
        anchors.top: parent.top; anchors.left: parent.left;
        anchors.topMargin: 4; anchors.leftMargin: -4
        visible: container.state==''
        opacity: container.enabled ? 1.0 : 0.6
    }
    

    }
    @
    Image is displayed fine but I am getting following warning in application output:
    @QOpenGLShader::link: "(35,18): warning X3206: implicit truncation of vector type"@
    If I comment the source property in the __bgImage, then the warning is gone.
    I am running Qt 5.0.1 with Mingw32 on Windows 7. Can anyone tell me what this warning actually means and how to get rid off it? Thanks!



  • I don't know much about why this warning is emitted, but it happens when the (in this case, default) GLSL shader (and in this case, I assume it's a fragment shader) is compiled. We're getting well out of my area of competence, but I think that there's probably an issue with ANGLE regarding how the GLSL shader is converted to HLSL, which causes an assignment (most likely of a uniform) to a different type, causing an implicit truncation.

    Build your Qt with desktop openGL configuration instead of ANGLE, and you should see this go away.

    Cheers,
    Chris.


Log in to reply