Bug 1983838: Provide a default convertType implementation. r=ahale a=RyanVM

This ensures there are sane values in the dst array.

Differential Revision: https://phabricator.services.mozilla.com/D262997
This commit is contained in:
Brad Werth
2025-09-02 20:32:16 +00:00
committed by rvandermeulen@mozilla.com
parent 9571910e5c
commit 27566fec30

View File

@@ -1345,6 +1345,11 @@ template <typename SrcType, typename DstType>
MOZ_ALWAYS_INLINE void convertType(const SrcType* __restrict src, MOZ_ALWAYS_INLINE void convertType(const SrcType* __restrict src,
DstType* __restrict dst) { DstType* __restrict dst) {
MOZ_ASSERT(false, "Unimplemented texture format conversion"); MOZ_ASSERT(false, "Unimplemented texture format conversion");
// Default construct dst values, ensuring they are *some* value.
dst[0] = DstType();
dst[1] = DstType();
dst[2] = DstType();
dst[3] = DstType();
} }
template <> template <>