public FormatSupport2 CheckFeatureFormatSupport2(Format format) { FeatureDataFormatSupport2 support = default; support.InFormat = format; if (CheckFeatureSupport(Feature.FormatSupport2, &support, sizeof(FeatureDataFormatSupport2)).Failure) { return(FormatSupport2.None); } return(support.OutFormatSupport2); }
public unsafe FormatSupport2 CheckFeatureFormatSupport2(Format format) { FeatureDataFormatSupport2 support = default; support.InFormat = format; if (CheckFeatureSupport(Feature.FormatSupport2, new IntPtr(&support), Unsafe.SizeOf <FeatureDataFormatSupport2>()).Failure) { return(FormatSupport2.None); } return(support.OutFormatSupport2); }
/// <summary> /// Check if this device is supporting compute shaders for the specified format. /// </summary> /// <param name="format">The format for which to check support.</param> /// <returns>Flags indicating usage contexts in which the specified format is supported.</returns> public ComputeShaderFormatSupport CheckComputeShaderFormatSupport(Format format) { unsafe { FeatureDataFormatSupport2 support = default(FeatureDataFormatSupport2); support.InFormat = format; if (CheckFeatureSupport(Feature.ComputeShaders, new IntPtr(&support), Utilities.SizeOf <FeatureDataFormatSupport2>()).Failure) { return(ComputeShaderFormatSupport.None); } return(support.OutFormatSupport2); } }