Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130381

quick3d/embree: AVX code paths not disabled with GCC 14

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.8, 6.8.1, 6.9.0 FF
    • 6.8
    • Quick: 3D
    • None
    • b0d6afa7e (dev), a39a7e38f (6.8), ed905db74 (tqtc/lts-6.5)

    Description

      Using GCC 14.2.0, quick3d build fails to link with bundled embree for x86 targets.

      | /usr/src/debug/qtquick3d/6.9.0/src/3rdparty/embree/kernels/common/scene.cpp:205: error: undefined reference to 'embree::BVH8Factory::BVH8Triangle4vMB(embree::Scene*, embree::BVHFactory::BuildVariant, embree::BVHFactory::IntersectVaria
      nt)'
      | /usr/src/debug/qtquick3d/6.9.0/src/3rdparty/embree/kernels/common/scene.cpp:204: error: undefined reference to 'embree::BVH8Factory::BVH8Triangle4iMB(embree::Scene*, embree::BVHFactory::BuildVariant, embree::BVHFactory::IntersectVaria
      nt)'
      | /usr/src/debug/qtquick3d/6.9.0/src/3rdparty/embree/kernels/common/scene.cpp:167: error: undefined reference to 'embree::BVH8Factory::BVH8QuantizedTriangle4(embree::Scene*)' 

      The AVX code paths are not correctly disabled. This is caused by change of behavior in GCC 14 (bug or feature?), where undef'ing _AVX_ is reversed by GCC pragmas from GCC headers.

      GCC issue can be reproduced with simple test code

      #undef __AVX__
      
      // from gcc/x86_64-poky-linux/14.2.0/include/x86gprintrin.h
      #pragma GCC push_options
      #pragma GCC target("general-regs-only")
      #pragma GCC pop_options
      
      #ifdef __AVX__
      #error avx defined again
      #endif 

       

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            sapiippo Samuli Piippo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes