diff --git a/hart/inferno-hart-cpu/src/kdtree.hpp b/hart/inferno-hart-cpu/src/kdtree.hpp index 12df20e..ca78853 100644 --- a/hart/inferno-hart-cpu/src/kdtree.hpp +++ b/hart/inferno-hart-cpu/src/kdtree.hpp @@ -163,6 +163,7 @@ class KDTree { std::cout << "Ray does not intersect node" << std::endl; } std::cout << std::endl; + exit(0); } glm::vec3 getVertexBounds(uint32_t index) const { diff --git a/hart/inferno-hart-cpu/src/main.cpp b/hart/inferno-hart-cpu/src/main.cpp index 41794c9..0c94a78 100644 --- a/hart/inferno-hart-cpu/src/main.cpp +++ b/hart/inferno-hart-cpu/src/main.cpp @@ -20,6 +20,7 @@ public: HARTCPU() { mMasterWorker = std::thread(&HARTCPU::intersectMasterWorker, this); + mLogModule = yolo::registerModule("hartcpu", "\u001b[35;1m"); } ~HARTCPU() @@ -38,7 +39,7 @@ public: mState = EModuleState::Build; mVert = (float*)vert; mNorm = (float*)norm; mVc = vc; mIndices = (uint32_t*)indices; mIc = ic; - yolo::info("[hartcpu] Recieved {} verticies ({}) and {} indicies ({})", vc / 3, vert, ic / 3, indices); + yolo::info(mLogModule, "Recieved {} verticies ({}) and {} indicies ({})", vc / 3, vert, ic / 3, indices); std::vector indicesToProcess(ic / 3); for (uint32_t i = 0; i < ic / 3; ++i) @@ -48,7 +49,7 @@ public: mKdTree = new KDTree(mVert, mIndices, indicesToProcess, 0, indicesToProcess.size() - 1, 10); mKdTree->printTree(mKdTree->getRoot(), 1); - yolo::info("[hartcpu] Accelerator ready.."); + yolo::info(mLogModule, "Accelerator ready.."); mState = EModuleState::Idle; } @@ -62,7 +63,7 @@ public: mState = EModuleState::Trace; _mSignalCv.notify_all(); - yolo::info("[hartcpu] Signal master to start"); + yolo::info(mLogModule, "Signal master to start"); { std::unique_lock doneLock(_mDoneMut); @@ -166,6 +167,8 @@ private: int mVc; uint32_t* mIndices; int mIc; + + uint8_t mLogModule; }; HART_INTERFACE void* _GET() diff --git a/libhart/inferno_hart.hpp b/libhart/inferno_hart.hpp index c10faa2..0ebdf78 100644 --- a/libhart/inferno_hart.hpp +++ b/libhart/inferno_hart.hpp @@ -34,6 +34,10 @@ * Once empty the module will switch to the Ready state again, so Inferno * * can get the next frame ready and repeat. * * * + * * + * The module render system is an alternative system along with the HARTModule * + * + * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * */ @@ -76,7 +80,6 @@ HART_INTERFACE typedef void* (*HART_CREDIT_F)(void); typedef void (*HART_HIT_CALLBACK)(void* context, HitInfo* hit); -// FOR NOW: Rays and tri's are owned by Inferno, _NOT_ HART class HARTModule { public: @@ -93,7 +96,6 @@ public: std::lock_guard lock(_mData); for (const auto& e: queue) mToTrace.push(e); - yolo::info("[hartmodule] New trace queue: {}", mToTrace.size()); } inline void pushtoQueue(Ray* ray) @@ -104,7 +106,6 @@ public: inline void passContext(void* context, HART_HIT_CALLBACK callback) { - yolo::debug("[hartmodule] Recieved context"); std::lock_guard lock(_mData); mCtx = context; Hit = callback;