using System;
using System.Runtime.InteropServices;
namespace UnityEngine.XR.MagicLeap
{
public partial class YcbcrRenderer
{
public interface IYcbcrConversionSamplerProvider
{
public abstract bool OverrideYcbcrConversionSampler(ref VkAndroidHardwareBufferFormatPropertiesANDROID hwBufferFormatProperties, ref VkSamplerYcbcrConversionCreateInfo sampler);
}
[StructLayout(LayoutKind.Sequential)]
public struct VkComponentMapping
{
public uint r;
public uint g;
public uint b;
public uint a;
public override bool Equals(object obj)
{
VkComponentMapping other = (VkComponentMapping)obj;
return (r == other.r)
&& (g == other.g)
&& (b == other.b)
&& (a == other.a);
}
public override int GetHashCode() => base.GetHashCode();
}
[StructLayout(LayoutKind.Sequential)]
public struct VkAndroidHardwareBufferFormatPropertiesANDROID
{
public uint sType;
public IntPtr pNext;
public uint format;
public ulong externalFormat;
public uint formatFeatures;
public VkComponentMapping samplerYcbcrConversionComponents;
public uint suggestedYcbcrModel;
public uint suggestedYcbcrRange;
public uint suggestedXChromaOffset;
public uint suggestedYChromaOffset;
}
[StructLayout(LayoutKind.Sequential)]
public struct VkSamplerYcbcrConversionCreateInfo
{
public uint sType;
public IntPtr pNext;
public uint format;
public uint ycbcrModel;
public uint ycbcrRange;
public VkComponentMapping components;
public uint xChromaOffset;
public uint yChromaOffset;
public uint chromaFilter;
public uint forceExplicitReconstruction;
}
}
}