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

Shaders: samplerExternalOES type is ignored

    XMLWordPrintable

Details

    Description

      I have multimedia backend that issues samplerExternalOES textures.
      Also I have several video components that are using this backend.
      I wanted to apply some effects to video textures directly via ShaderEffect (without using ShaderEffectSource) and faced with an issue:

      Using more than one samplerExternalOES uniform in shader leads to texture duplicates for all other samplerExternalOES.

      I investigated this issue and found that Qt supports only sampler2D uniform:
      https://github.com/qt/qtdeclarative/blob/5.8/src/quick/items/qquickopenglshadereffect.cpp#L360

      https://github.com/qt/qtdeclarative/blob/5.8/src/quick/items/qquickopenglshadereffectnode.cpp#L146
      https://github.com/qt/qtdeclarative/blob/5.8/src/quick/items/qquickopenglshadereffectnode.cpp#L167

      Same applies to images:
      I have image provider (QQuickAsyncImageProvider) that returns custom QQuickTextureFactory. The factory creates samplerExternalOES based textures, but nothing is displayed on the screen. Only after applying ShaderEffect (referencing samplerExternalOES) I see the image.

      Qt should definitely support samplerExternalOES as this is a popular way of achieving zero-copying on embedded devices.

      Attachments

        For Gerrit Dashboard: QTBUG-59462
        # Subject Branch Project Status CR V

        Activity

          People

            srutledg Shawn Rutledge
            yevhen yevhen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes