Relax job constraints, add ref type support, misc fixes

Relaxed generic constraints for job scheduling/execution to allow reference types (removed struct requirement). Updated IJob, IJobParallelFor, and IJobParallel extension methods to support both value and reference types, introducing RunRef for struct-specific overloads. Adjusted JobExecutor and JobScheduler to match new constraints. Bumped assembly version to 3.1.1. Added Value property to Wrapper<T> for ref access and inlined Get(). Changed GGXMipGenerationJob sample count to linear roughness. Removed unused usings in JobInfo.cs.
This commit is contained in:
2026-04-27 12:54:29 +09:00
parent 9f7507ba71
commit 8ce7fddd32
8 changed files with 44 additions and 23 deletions

View File

@@ -7,7 +7,6 @@ namespace Misaki.HighPerformance.Jobs;
/// This class manages pools of job data for different types. It allows allocating, retrieving, and freeing job data instances using unique IDs and generations to ensure safe access and reuse of resources.
/// </summary>
public static class JobDataPool<T>
where T : struct
{
private static readonly ConcurrentSlotMap<T> s_slots = new ConcurrentSlotMap<T>(8);