Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="coverlet.collector" Version="10.0.1" />
<PackageVersion Include="Fluidify" Version="1.0.1" />
<PackageVersion Include="Microsoft.Build.Framework" Version="18.9.6" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="18.9.6" />
<PackageVersion Include="Microsoft.Build.Framework" Version="18.10.1" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="18.10.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.12" />
Expand All @@ -20,7 +20,7 @@
<PackageVersion Include="ppy.SDL3_image-CS" Version="2026.722.0" />
<PackageVersion Include="ppy.SDL3_mixer-CS" Version="2026.722.0" />
<PackageVersion Include="ppy.SDL3_ttf-CS" Version="2026.722.0" />
<PackageVersion Include="SlangDxcBundle.Toolchain" Version="[2026.17.0]" />
<PackageVersion Include="SlangDxcBundle.Toolchain" Version="[2026.17.1]" />
<PackageVersion Include="ZLogger" Version="2.5.10" />
</ItemGroup>
</Project>
10 changes: 3 additions & 7 deletions src/Pixely.SdlangCompiler/SdlangCompileTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ public class SdlangCompileTask : Microsoft.Build.Utilities.Task
private static readonly string[] GeneratedShaderExtensions = ["spv", "dxil", "metal"];

/// <summary>
/// The input shader file to compile. If empty or null, the task succeeds without compiling.
/// The input shader file to compile.
/// </summary>
public string? InputFile { get; set; }
[Required]
public string InputFile { get; set; } = "";

/// <summary>
/// Path to the slangc executable. Slang is build-time tooling, so it is located through this
Expand All @@ -35,11 +36,6 @@ public override bool Execute()
{
GeneratedFiles = [];

if (string.IsNullOrEmpty(InputFile))
{
return true;
}

if (string.IsNullOrEmpty(SlangCompilerPath))
{
Log.LogError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<PropertyGroup>
<SlangVersion>2026.17.0</SlangVersion>
<SlangVersion>2026.17.1</SlangVersion>
<SlangToolSourceDirectory>$(SlangDxcToolchainRoot)$(SlangPlatform)/</SlangToolSourceDirectory>
<SlangCompilerExeName>slangc</SlangCompilerExeName>
<SlangCompilerExeName Condition="$([MSBuild]::IsOSPlatform('Windows'))">slangc.exe</SlangCompilerExeName>
Expand Down
14 changes: 0 additions & 14 deletions tests/Pixely.SdlangCompiler.Tests/SdlangCompileTaskTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,4 @@ public void CompiledShaderOutputExists()
Assert.That(File.Exists(metadataPath), Is.True, "Compiled shader output file should exist at: " + metadataPath);
}
}

[Test]
public void Execute_WithNullInputFile_ReturnsTrue()
{
SdlangCompileTask task = new SdlangCompileTask { InputFile = null };
Assert.That(task.Execute(), Is.True);
}

[Test]
public void Execute_WithEmptyInputFile_ReturnsTrue()
{
SdlangCompileTask task = new SdlangCompileTask { InputFile = "" };
Assert.That(task.Execute(), Is.True);
}
}