gfxstream: conditionally compile magma in Meson build
libdrm doesn't exist on all platforms. Fix this and conditionally
compile Magma until multi-platform Magma can be achieved.
BUG=299991018
TEST=meson -Ddecoders=gles,vulkan,composer amd64-build/
ninja -C amd64-build/
Change-Id: I08d17ef20bd3fed021fe32df9222db941f5485a4
diff --git a/host/RenderThread.cpp b/host/RenderThread.cpp
index ffddb50..489a340 100644
--- a/host/RenderThread.cpp
+++ b/host/RenderThread.cpp
@@ -298,7 +298,9 @@
tInfo.m_vkInfo.emplace();
}
+#if USE_MAGMA
tInfo.m_magmaInfo.emplace(mContextId);
+#endif
// This is the only place where we try loading from snapshot.
// But the context bind / restoration will be delayed after receiving
@@ -554,6 +556,7 @@
// try to process some of the command buffer using the Magma
// decoder
//
+#if USE_MAGMA
if (tInfo.m_magmaInfo && tInfo.m_magmaInfo->mMagmaDec)
{
last = tInfo.m_magmaInfo->mMagmaDec->decode(readBuf.buf(), readBuf.validData(),
@@ -563,6 +566,7 @@
progress = true;
}
}
+#endif
if (mRunInLimitedMode) {
sThreadRunLimiter.unlock();