Switch ID2D1Shader.HlslSource to a property
このコミットが含まれているのは:
1 親
ca77bab1f2
コミット
60028ce00c
6ファイル変更
+16
-25
検索条件に一致するファイルはありません
@@ -122,12 +122,11 @@ public interface ID2D1Shader
|
||||
where TLoader : struct, ID2D1DispatchDataLoader;
|
||||
|
||||
/// <summary>
|
||||
/// Builds the HLSL source code for the current shader instance.
|
||||
/// Gets the HLSL source code for the current shader instance.
|
||||
/// </summary>
|
||||
/// <param name="hlslSource">The resulting HLSL source.</param>
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This method is not intended to be called directly by user code")]
|
||||
void BuildHlslSource(out string hlslSource);
|
||||
string HlslSource { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Loads the bytecode for the current shader.
|
||||
|
||||
@@ -33,7 +33,7 @@ public static class D2D1ReflectionServices
|
||||
{
|
||||
Unsafe.SkipInit(out T shader);
|
||||
|
||||
shader.BuildHlslSource(out string hlslSource);
|
||||
string hlslSource = shader.HlslSource;
|
||||
|
||||
D2D1ShaderBytecodeLoader bytecodeLoader = default;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ public static class D2D1ShaderCompiler
|
||||
where TLoader : struct, ID2D1BytecodeLoader
|
||||
where T : struct, ID2D1Shader
|
||||
{
|
||||
Unsafe.AsRef(in shader).BuildHlslSource(out string hlslSource);
|
||||
string hlslSource = Unsafe.AsRef(in shader).HlslSource;
|
||||
|
||||
using ComPtr<ID3DBlob> d3DBlobBytecode = Shaders.Translation.D3DCompiler.Compile(
|
||||
hlslSource.AsSpan(),
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする