Dumb slang...

This commit is contained in:
2026-11-09 19:48:48 +01:00
parent b6f4a9c432
commit 918eb97342
4 changed files with 11 additions and 9 deletions
+3 -4
View File
@@ -57,8 +57,7 @@ public interface IVoxelCache
{
// The voxel cache tracer needs to store a small stack.
// Keeping it in registers is wastefull thus using groupshared memory is the best option
associatedtype GroupSharedData;
public bool trace<L : ILodPolicy>(uint32_t root, inout GroupSharedData data, Ray r, L lod, float offset_t, out Hit v);
public bool trace<L : ILodPolicy>(uint32_t root, uint32_t thread_id, Ray r, L lod, float offset_t, out Hit v);
}
public struct Tracer<S : IStructure, C : IVoxelCache, L : ILodPolicy>
@@ -68,7 +67,7 @@ public struct Tracer<S : IStructure, C : IVoxelCache, L : ILodPolicy>
public C cache;
public L lod;
public bool trace(inout C.GroupSharedData gsData, out Hit h, Ray r, Span s)
public bool trace(uint32_t thread_id, out Hit h, Ray r, Span s)
{
/* loop: next cell -> cache.trace -> early out */
S.Cursor cursor = this.structure.begin(r, s);
@@ -81,7 +80,7 @@ public struct Tracer<S : IStructure, C : IVoxelCache, L : ILodPolicy>
while (this.structure.next(cursor, cell))
{
if (cache.trace(cell.cache_pointer, gsData, cell.local_ray, lod, cell.t, h))
if (cache.trace(cell.cache_pointer, thread_id, cell.local_ray, lod, cell.t, h))
{
return true;
}