Refactor SPMD job system, add GGX mipmap benchmark
- Replace IJobSPMD with T4-generated, multi-type SPMD job interfaces and wrappers (up to 8 numeric types) - Extend ISPMD with Cast/BitCast; implement for ScalarLane and WideLane (SIMD-aware) - Add unary minus, scalar-lane, and lane-scalar operators to Vector2/3/4; improve Select methods - WideLane now partial with T4-generated Cast/BitCast (SIMD conversions) - SPMD job Execute now requires unmanaged TLane; update all usages and benchmarks - Add GGXMipGenerationBenchmark with vectorized and scalar paths, SkiaSharp output - Update project files: add generated code, SkiaSharp, bump version to 1.3.0 - Misc: fix formatting, method signatures, FreeList logic
This commit is contained in:
@@ -239,7 +239,7 @@ internal unsafe struct NoiseJobMathSPMD : IJobSPMD<float>
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static T GradDot<T>(T ix, T iy, T fx, T fy)
|
||||
where T : ISPMD<T, float>
|
||||
where T : unmanaged, ISPMD<T, float>
|
||||
{
|
||||
var c289 = T.Create(289f);
|
||||
var c34 = T.Create(34f);
|
||||
@@ -267,7 +267,7 @@ internal unsafe struct NoiseJobMathSPMD : IJobSPMD<float>
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static T Noise<T>(T uvX, T uvY)
|
||||
where T : ISPMD<T, float>
|
||||
where T : unmanaged, ISPMD<T, float>
|
||||
{
|
||||
var c1 = T.Create(1f);
|
||||
var c6 = T.Create(6f);
|
||||
@@ -292,7 +292,7 @@ internal unsafe struct NoiseJobMathSPMD : IJobSPMD<float>
|
||||
}
|
||||
|
||||
public readonly void Execute<TLane>(int baseIndex, ref readonly JobExecutionContext ctx)
|
||||
where TLane : ISPMD<TLane, float>
|
||||
where TLane : unmanaged, ISPMD<TLane, float>
|
||||
{
|
||||
var indices = TLane.Sequence(baseIndex, 1f);
|
||||
var w = TLane.Create(width);
|
||||
|
||||
Reference in New Issue
Block a user