Uploaded image for project: 'Qt 3D Studio'
  1. Qt 3D Studio
  2. QT3DS-4168

studio3d testTextureQuery autotest fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • Qt 3D Studio 2.8
    • Qt 3D Studio 2.8
    • OpenGL Runtime
    • None
    • Linux/X11

    Description

      testTextureQuery autotest in tst_q3dssurfaceviewer.cpp fails on Linux with textureID = 0.

      If we add a QTest::qWait(100) after window creation AND scale mode change, the test passes.

      If the wait is added after window creation but before scale mode change, the returned textureId is valid, but incorrect.

      This passes:

      void tst_Q3DSSurfaceViewer::testTextureQuery()
      {
          QFETCH(bool, isWindow);  
        
          if (isWindow)
              createWindowAndViewer(m_viewer, DATAINPUT);
          else
              createOffscreenAndViewer(m_viewer, DATAINPUT);  
        
          m_viewer->settings()->setScaleMode(Q3DSViewerSettings::ScaleModeFill);    
      
          QTest::qWait(100); // <<< WAIT 
      
          QGuiApplication::processEvents();
      
          // Test texture info getters, first for layer then for individual material.
          // Texture id's are likely to change if test ordering changes.
          QSize texsize;
          GLenum format;    
          uint textureid = m_viewer->presentation()->textureId("Scene.Layer", texsize, format);
      
          if (isWindow)
              QCOMPARE(textureid, 6);
          else
              QCOMPARE(textureid, 7);
      ...
       

      This fails with textureId = 0:

      void tst_Q3DSSurfaceViewer::testTextureQuery()
      {
          QFETCH(bool, isWindow);    
      
          if (isWindow)
              createWindowAndViewer(m_viewer, DATAINPUT);
          else
              createOffscreenAndViewer(m_viewer, DATAINPUT);    
      
          m_viewer->settings()->setScaleMode(Q3DSViewerSettings::ScaleModeFill);    
      
          QGuiApplication::processEvents();
      
          // Test texture info getters, first for layer then for individual material.
          // Texture id's are likely to change if test ordering changes.
          QSize texsize;
          GLenum format;    
          uint textureid = m_viewer->presentation()->textureId("Scene.Layer", texsize, format);
      
          if (isWindow)
              QCOMPARE(textureid, 6);
          else
              QCOMPARE(textureid, 7);
      ... 

      ..and this fails with textureId = 5:

      void tst_Q3DSSurfaceViewer::testTextureQuery()
      {
          QFETCH(bool, isWindow);    
      
          if (isWindow)
              createWindowAndViewer(m_viewer, DATAINPUT);
          else
              createOffscreenAndViewer(m_viewer, DATAINPUT);    
      
          QTest::qWait(100); // <<< WAIT    
      
          m_viewer->settings()->setScaleMode(Q3DSViewerSettings::ScaleModeFill);    
      
          QGuiApplication::processEvents();
      
          // Test texture info getters, first for layer then for individual material.
          // Texture id's are likely to change if test ordering changes.
          QSize texsize;
          GLenum format;    
          uint textureid = m_viewer->presentation()->textureId("Scene.Layer", texsize, format);
      
          if (isWindow)
              QCOMPARE(textureid, 6);
          else
              QCOMPARE(textureid, 7);
      ... 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0150566 Janne Roine
            tokorpip Tomi Korpipää
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes