Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.8.0
-
None
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
Gerrit Reviews
For Gerrit Dashboard: QTBUG-59462 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
195235,5 | Support external textures (samplerExternalOES) in ShaderEffect | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |