Wip on frame tracking,

add import statistics
This commit is contained in:
mcrcortex
2025-01-13 06:42:28 +10:00
parent d090703d32
commit 07b00bc710
6 changed files with 45 additions and 12 deletions

View File

@@ -13,6 +13,7 @@ layout(binding = SCENE_UNIFORM_BINDING, std140) uniform SceneUniform {
float screenH;
uint renderQueueMaxSize;
float minSSS;
uint frameId;
};
#import <voxy:lod/hierarchical/queue.glsl>
@@ -31,6 +32,10 @@ layout(binding = RENDER_QUEUE_BINDING, std430) restrict buffer renderQueueStruct
uint[] renderQueue;
};
layout(binding = RENDER_TRACKER_BINDING, std430) restrict writeonly buffer renderTrackerArray {
uint[] lastRenderFrame;
};
void addRequest(inout UnpackedNode node) {
//printf("Put node decend request");
if (!hasRequested(node)) {
@@ -61,6 +66,10 @@ void enqueueSelfForRender(in UnpackedNode node) {
#ifdef IS_DEBUG
debugRenderNodeQueue[atomicAdd(debugRenderNodeQueueIndex, 1)] = node.nodeId;
#endif
//TODO: decide if it should be this node id, or the mesh id
// for now do node id... think
lastRenderFrame[getId(node)] = frameId;
}
}