this repo has no description

already passing a pointer

+2 -4
+2 -4
src/rayray.zig
··· 98 98 99 99 var create_pixels_node = root_node.start("Create pixel array", 0); 100 100 101 - const pixels = try self.allocator.alloc(zmath.Vec, self.scene.camera.image_height * self.scene.camera.image_width); 101 + const pixels: []zmath.Vec = try self.allocator.alloc(zmath.Vec, self.scene.camera.image_height * self.scene.camera.image_width); 102 102 defer self.allocator.free(pixels); 103 103 // const l = pixels.ptr; 104 104 ··· 107 107 108 108 var task_node = root_node.start("Creating render tasks", 0); 109 109 110 - const tasks = try self.allocator.alloc(TaskTracker, num_chunks); 110 + const tasks: []TaskTracker = try self.allocator.alloc(TaskTracker, num_chunks); 111 111 defer self.allocator.free(tasks); 112 112 113 113 for (tasks, 0..) |*t, id| { ··· 121 121 122 122 const ctx = try self.allocator.create(tracer.Context); 123 123 124 - // FIXME: might cause the segfault 125 - // possible fix: pass a pointer to the context as argument (create via allocator) 126 124 ctx.* = tracer.Context{ 127 125 .pixels = pixels, 128 126 .cam = &self.scene.camera,