diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateInitializeFromDispatchDataMethod.Syntax.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateCreateFromConstantBufferMethod.Syntax.cs
similarity index 98%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateInitializeFromDispatchDataMethod.Syntax.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateCreateFromConstantBufferMethod.Syntax.cs
index ec970a6e..66084b04 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateInitializeFromDispatchDataMethod.Syntax.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateCreateFromConstantBufferMethod.Syntax.cs
@@ -8,7 +8,7 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- partial class InitializeFromDispatchData
+ partial class CreateFromConstantBuffer
{
///
/// Writes the CreateFromConstantBuffer method.
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadBytecodeMethod.Syntax.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateHlslBytecodeProperties.Syntax.cs
similarity index 99%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadBytecodeMethod.Syntax.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateHlslBytecodeProperties.Syntax.cs
index 9f6d3708..6c2b84c7 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadBytecodeMethod.Syntax.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateHlslBytecodeProperties.Syntax.cs
@@ -10,7 +10,7 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- partial class LoadBytecode
+ partial class HlslBytecode
{
///
/// Writes the ShaderProfile property.
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadBytecodeMethod.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateHlslBytecodeProperties.cs
similarity index 98%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadBytecodeMethod.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateHlslBytecodeProperties.cs
index 876be56c..fcf764fa 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadBytecodeMethod.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateHlslBytecodeProperties.cs
@@ -21,9 +21,9 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- /// A helper with all logic to generate the LoadBytecode method.
+ /// A helper with all logic to generate the HLSL bytecode properties.
///
- internal static partial class LoadBytecode
+ internal static partial class HlslBytecode
{
///
/// The shared cache of values.
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadDispatchDataMethod.Syntax.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadConstantBufferMethod.Syntax.cs
similarity index 98%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadDispatchDataMethod.Syntax.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadConstantBufferMethod.Syntax.cs
index f327dded..f5e58d3e 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadDispatchDataMethod.Syntax.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadConstantBufferMethod.Syntax.cs
@@ -9,10 +9,10 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- partial class LoadDispatchData
+ partial class LoadConstantBuffer
{
///
- /// Writes the LoadDispatchData method.
+ /// Writes the LoadConstantBuffer method.
///
/// The input instance with gathered shader info.
/// The instance to write into.
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadDispatchDataMethod.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadConstantBufferMethod.cs
similarity index 98%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadDispatchDataMethod.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadConstantBufferMethod.cs
index 46c83eb2..dc12107f 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadDispatchDataMethod.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateLoadConstantBufferMethod.cs
@@ -18,9 +18,9 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- /// A helper with all logic to generate the LoadDispatchData method.
+ /// A helper with all logic to generate the LoadConstantBuffer method.
///
- private static partial class LoadDispatchData
+ private static partial class LoadConstantBuffer
{
///
/// Explores a given type hierarchy and generates statements to load fields.
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs
index 317238a5..810264f2 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs
@@ -74,7 +74,7 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
using ImmutableArrayBuilder diagnostics = ImmutableArrayBuilder.Rent();
// LoadDispatchData() info
- ImmutableArray fieldInfos = LoadDispatchData.GetInfo(
+ ImmutableArray fieldInfos = LoadConstantBuffer.GetInfo(
diagnostics,
typeSymbol,
out int constantBufferSizeInBytes);
@@ -132,11 +132,11 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
token.ThrowIfCancellationRequested();
// Get the shader profile and linking info for LoadBytecode()
- bool isLinkingSupported = LoadBytecode.IsSimpleInputShader(typeSymbol, inputCount);
- D2D1ShaderProfile? requestedShaderProfile = LoadBytecode.GetRequestedShaderProfile(typeSymbol);
- D2D1CompileOptions? requestedCompileOptions = LoadBytecode.GetRequestedCompileOptions(diagnostics, typeSymbol);
- D2D1ShaderProfile effectiveShaderProfile = LoadBytecode.GetEffectiveShaderProfile(requestedShaderProfile);
- D2D1CompileOptions effectiveCompileOptions = LoadBytecode.GetEffectiveCompileOptions(requestedCompileOptions, isLinkingSupported);
+ bool isLinkingSupported = HlslBytecode.IsSimpleInputShader(typeSymbol, inputCount);
+ D2D1ShaderProfile? requestedShaderProfile = HlslBytecode.GetRequestedShaderProfile(typeSymbol);
+ D2D1CompileOptions? requestedCompileOptions = HlslBytecode.GetRequestedCompileOptions(diagnostics, typeSymbol);
+ D2D1ShaderProfile effectiveShaderProfile = HlslBytecode.GetEffectiveShaderProfile(requestedShaderProfile);
+ D2D1CompileOptions effectiveCompileOptions = HlslBytecode.GetEffectiveCompileOptions(requestedCompileOptions, isLinkingSupported);
bool hasErrors = diagnostics.Count > 0;
token.ThrowIfCancellationRequested();
@@ -152,12 +152,12 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
hasErrors);
// TODO: cache this across transform runs
- HlslBytecodeInfo hlslInfo = LoadBytecode.GetInfo(ref hlslInfoKey, token);
+ HlslBytecodeInfo hlslInfo = HlslBytecode.GetInfo(ref hlslInfoKey, token);
token.ThrowIfCancellationRequested();
// Append any diagnostic for the shader compilation
- LoadBytecode.GetInfoDiagnostics(typeSymbol, hlslInfo, diagnostics);
+ HlslBytecode.GetInfoDiagnostics(typeSymbol, hlslInfo, diagnostics);
token.ThrowIfCancellationRequested();
@@ -210,20 +210,20 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
declaredMembers.Add(PixelOptions.WriteSyntax);
declaredMembers.Add(OutputBuffer.WriteBufferPrecisionSyntax);
declaredMembers.Add(OutputBuffer.WriteChannelDepthSyntax);
- declaredMembers.Add(LoadBytecode.WriteShaderProfileSyntax);
- declaredMembers.Add(LoadBytecode.WriteCompileOptionsSyntax);
+ declaredMembers.Add(HlslBytecode.WriteShaderProfileSyntax);
+ declaredMembers.Add(HlslBytecode.WriteCompileOptionsSyntax);
declaredMembers.Add(HlslSource.WriteSyntax);
- declaredMembers.Add(LoadBytecode.WriteHlslBytecodeSyntax);
- declaredMembers.Add(InitializeFromDispatchData.WriteSyntax);
- declaredMembers.Add(LoadDispatchData.WriteSyntax);
+ declaredMembers.Add(HlslBytecode.WriteHlslBytecodeSyntax);
+ declaredMembers.Add(CreateFromConstantBuffer.WriteSyntax);
+ declaredMembers.Add(LoadConstantBuffer.WriteSyntax);
using ImmutableArrayBuilder> additionalTypes = ImmutableArrayBuilder>.Rent();
using ImmutableHashSetBuilder usingDirectives = ImmutableHashSetBuilder.Rent();
- LoadDispatchData.RegisterAdditionalTypeSyntax(item, additionalTypes, usingDirectives);
+ LoadConstantBuffer.RegisterAdditionalTypeSyntax(item, additionalTypes, usingDirectives);
InputDescriptions.RegisterAdditionalTypeSyntax(item, additionalTypes, usingDirectives);
InputTypes.RegisterAdditionalTypeSyntax(item, additionalTypes, usingDirectives);
- LoadBytecode.RegisterAdditionalTypeSyntax(item, additionalTypes, usingDirectives);
+ HlslBytecode.RegisterAdditionalTypeSyntax(item, additionalTypes, usingDirectives);
using IndentedTextWriter writer = IndentedTextWriter.Rent();