Refactor error handling: use Error enum, update APIs

Replaces ErrorStatus with Error across all systems for consistency.
Renames ResourceBarrierData fields to camelCase.
Adds BindlessAccess enum and updates GetBindlessIndex API.
Updates method signatures, result types, and error checks.
Modernizes HLSL mesh shader syntax and fixes naming.
Improves code style and updates comments for clarity.
This commit is contained in:
2026-01-25 16:34:28 +09:00
parent e11a9ebb52
commit 364fbf9208
28 changed files with 282 additions and 252 deletions

View File

@@ -89,14 +89,14 @@ internal sealed partial class DxcShaderCompiler
return argsArray;
}
private static Result<string, ErrorStatus> GetFinalShaderCode(string shaderPath, ReadOnlySpan<string> includes, string? injectedCode)
private static Result<string, Error> GetFinalShaderCode(string shaderPath, ReadOnlySpan<string> includes, string? injectedCode)
{
string shaderCode;
if (shaderPath == "hlsl_block")
{
if (string.IsNullOrEmpty(injectedCode))
{
return ErrorStatus.InvalidArgument;
return Error.InvalidArgument;
}
shaderCode = string.Empty;
@@ -105,7 +105,7 @@ internal sealed partial class DxcShaderCompiler
{
if (!File.Exists(shaderPath))
{
return ErrorStatus.NotFound;
return Error.NotFound;
}
shaderCode = File.ReadAllText(shaderPath);
@@ -487,7 +487,7 @@ internal sealed unsafe partial class DxcShaderCompiler : IShaderCompiler
return compiled;
}
public Result<GraphicsCompiledResult, ErrorStatus> LoadCompiledCache(Key64<ShaderVariant> key)
public Result<GraphicsCompiledResult, Error> LoadCompiledCache(Key64<ShaderVariant> key)
{
ObjectDisposedException.ThrowIf(_disposed, this);
@@ -496,7 +496,7 @@ internal sealed unsafe partial class DxcShaderCompiler : IShaderCompiler
return compiledResult;
}
return ErrorStatus.NotFound;
return Error.NotFound;
}
public void Dispose()