Fixed an issue with local functions in external methods
このコミットが含まれているのは:
1 親
8bf828da6d
コミット
36f2512cf6
3ファイル変更
+46
-22
検索条件に一致するファイルはありません
@@ -11,11 +11,11 @@ namespace ComputeSharp.Tests
|
||||
[TestMethod]
|
||||
public void ReservedKeywords()
|
||||
{
|
||||
ReflectionServices.GetShaderInfo<SoftmaxActivation>(out _);
|
||||
ReflectionServices.GetShaderInfo<ReservedKeywords_Kernel>(out _);
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
public readonly partial struct SoftmaxActivation : IComputeShader
|
||||
public readonly partial struct ReservedKeywords_Kernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<float> row_major;
|
||||
public readonly float dword;
|
||||
@@ -32,11 +32,11 @@ namespace ComputeSharp.Tests
|
||||
[TestMethod]
|
||||
public void SpecialTypeAsReturnType()
|
||||
{
|
||||
ReflectionServices.GetShaderInfo<FloatReturnType>(out _);
|
||||
ReflectionServices.GetShaderInfo<SpecialTypeAsReturnType_Kernel>(out _);
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
public readonly partial struct FloatReturnType : IComputeShader
|
||||
public readonly partial struct SpecialTypeAsReturnType_Kernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<Float2> buffer;
|
||||
|
||||
@@ -49,5 +49,29 @@ namespace ComputeSharp.Tests
|
||||
buffer[ThreadIds.X] = Foo(ThreadIds.X) + Bar(ThreadIds.X).XY;
|
||||
}
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void LocalFunctionInExternalMethods()
|
||||
{
|
||||
ReflectionServices.GetShaderInfo<LocalFunctionInExternalMethods_Kernel>(out _);
|
||||
}
|
||||
|
||||
[AutoConstructor]
|
||||
public readonly partial struct LocalFunctionInExternalMethods_Kernel : IComputeShader
|
||||
{
|
||||
public readonly ReadWriteBuffer<Float2> buffer;
|
||||
|
||||
Float2 Foo(float x)
|
||||
{
|
||||
static Float2 Baz(float y) => y;
|
||||
|
||||
return Baz(x);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
buffer[ThreadIds.X] = Foo(ThreadIds.X);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする