Export composed VA surface layers for EGL import if supported

Importing composed formats is more efficient and performant because it allows
tiled and/or compressed surfaces to be directly sampled by shaders without
requiring a conversion to a linear planar format first.
This commit is contained in:
Cameron Gutman
2023-09-26 22:58:13 -05:00
parent b01dfea343
commit 1efdeeb9dc
4 changed files with 275 additions and 22 deletions
+6 -1
View File
@@ -69,7 +69,7 @@ private:
void renderOverlay(VADisplay display, VASurfaceID surface, Overlay::OverlayType type);
#if defined(HAVE_EGL) || defined(HAVE_DRM)
bool canExportSurfaceHandle(int layerTypeFlag);
bool canExportSurfaceHandle(int layerTypeFlag, VADRMPRIMESurfaceDescriptor* descriptor);
#endif
int m_DecoderSelectionPass;
@@ -96,6 +96,11 @@ private:
int m_DisplayHeight;
#ifdef HAVE_EGL
enum class EglExportType {
Unknown,
Separate,
Composed
} m_EglExportType;
VADRMPRIMESurfaceDescriptor m_PrimeDescriptor;
EglImageFactory m_EglImageFactory;
#endif