Rename CompileShader to Compile

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-24 21:03:12 +02:00
1 親 0be83e1089
コミット beeb6882b4
5ファイル変更
+8 -8

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -106,7 +106,7 @@ public static class ReflectionServices
{
Unsafe.AsRef(in shader).BuildHlslString(out ArrayPoolStringBuilder shaderSource, 1, 1, 1);
using ComPtr<IDxcBlob> dxcBlobBytecode = Shaders.Translation.ShaderCompiler.Instance.CompileShader(shaderSource.WrittenSpan);
using ComPtr<IDxcBlob> dxcBlobBytecode = Shaders.Translation.ShaderCompiler.Instance.Compile(shaderSource.WrittenSpan);
shaderSource.Dispose();
+3 -3
ファイルの表示
@@ -83,7 +83,7 @@ internal sealed unsafe partial class ShaderCompiler
/// </summary>
/// <param name="source">The HLSL source code to compile.</param>
/// <returns>The bytecode for the compiled shader.</returns>
public ComPtr<IDxcBlob> CompileShader(ReadOnlySpan<char> source)
public ComPtr<IDxcBlob> Compile(ReadOnlySpan<char> source)
{
fixed (char* optimization = "-O3")
fixed (char* rowMajor = "-Zpr")
@@ -94,7 +94,7 @@ internal sealed unsafe partial class ShaderCompiler
ReadOnlySpan<IntPtr> arguments = stackalloc IntPtr[] { (IntPtr)optimization, (IntPtr)rowMajor, (IntPtr)warningsAsErrors };
return CompileShader(source, profile.AsSpan(), entryPoint.AsSpan(), arguments);
return Compile(source, profile.AsSpan(), entryPoint.AsSpan(), arguments);
}
}
@@ -106,7 +106,7 @@ internal sealed unsafe partial class ShaderCompiler
/// <param name="entryPoint">The entry point for the shader.</param>
/// <param name="arguments">The arguments to use for compilation (each item must be a <see cref="char"/>* to an individual argument).</param>
/// <returns>The bytecode for the compiled shader.</returns>
public ComPtr<IDxcBlob> CompileShader(ReadOnlySpan<char> source, ReadOnlySpan<char> profile, ReadOnlySpan<char> entryPoint, ReadOnlySpan<IntPtr> arguments)
public ComPtr<IDxcBlob> Compile(ReadOnlySpan<char> source, ReadOnlySpan<char> profile, ReadOnlySpan<char> entryPoint, ReadOnlySpan<IntPtr> arguments)
{
using ComPtr<IDxcBlobEncoding> dxcBlobEncoding = default;
using ComPtr<IDxcOperationResult> dxcOperationResult = default;
+1 -1
ファイルの表示
@@ -29,7 +29,7 @@ public static class ShaderCompiler
{
Unsafe.AsRef(in shader).BuildHlslString(out ArrayPoolStringBuilder builder, threadsX, threadsY, threadsZ);
using ComPtr<IDxcBlob> dxcBlobBytecode = Shaders.Translation.ShaderCompiler.Instance.CompileShader(builder.WrittenSpan);
using ComPtr<IDxcBlob> dxcBlobBytecode = Shaders.Translation.ShaderCompiler.Instance.Compile(builder.WrittenSpan);
builder.Dispose();
+1 -1
ファイルの表示
@@ -172,7 +172,7 @@ public sealed partial class IShaderGenerator
.Replace("<THREADSZ>", threadIds.Z.ToString());
// Compile the shader bytecode
using ComPtr<IDxcBlob> dxcBlobBytecode = ShaderCompiler.Instance.CompileShader(hlslSource.AsSpan());
using ComPtr<IDxcBlob> dxcBlobBytecode = ShaderCompiler.Instance.Compile(hlslSource.AsSpan());
token.ThrowIfCancellationRequested();
+2 -2
ファイルの表示
@@ -33,7 +33,7 @@ public class ShaderCompilerTests
[TestMethod]
public void CompileTest_Ok()
{
using ComPtr<IDxcBlob> dxcBlob = ShaderCompiler.Instance.CompileShader(ShaderSource.AsSpan());
using ComPtr<IDxcBlob> dxcBlob = ShaderCompiler.Instance.Compile(ShaderSource.AsSpan());
}
[TestMethod]
@@ -42,6 +42,6 @@ public class ShaderCompilerTests
{
var faultyShader = ShaderSource.Replace("ids.x", "ids.X");
using ComPtr<IDxcBlob> dxcBlob = ShaderCompiler.Instance.CompileShader(faultyShader.AsSpan());
using ComPtr<IDxcBlob> dxcBlob = ShaderCompiler.Instance.Compile(faultyShader.AsSpan());
}
}