Remove Type.GetCustomAttributes use from PixelShaderEffect

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-28 00:03:31 +02:00
1 親 b156b3c98a
コミット d220c2eeb1
1ファイル変更
+1 -1
+1 -1
ファイルの表示
@@ -89,7 +89,7 @@ internal unsafe partial struct PixelShaderEffect
{
// Load all shader properties
Guid guid = typeof(T).GUID;
int inputCount = ((D2DInputCountAttribute[])typeof(T).GetCustomAttributes(typeof(D2DInputCountAttribute), false))[0].Count;
int inputCount = (int)D2D1InteropServices.GetPixelShaderInputCount<T>();
ReadOnlyMemory<byte> buffer = D2D1InteropServices.LoadShaderBytecode<T>();
byte* typeAssociatedMemory = (byte*)RuntimeHelpers.AllocateTypeAssociatedMemory(typeof(For<T>), buffer.Length);