Tweeks
This commit is contained in:
@@ -47,7 +47,7 @@ public class RenderService<T extends AbstractSectionRenderer<J, ?>, J extends Vi
|
||||
|
||||
//Max sections: ~500k
|
||||
//Max geometry: 1 gb
|
||||
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<19, (1L<<31)-1024);
|
||||
this.sectionRenderer = (T) createSectionRenderer(this.modelService.getStore(),1<<19, (1L<<30)-1024);
|
||||
|
||||
//Do something incredibly hacky, we dont need to keep the reference to this around, so just connect and discard
|
||||
var router = new SectionUpdateRouter();
|
||||
|
||||
@@ -65,7 +65,11 @@ public class RenderGenerationService {
|
||||
private void processJob(RenderDataFactory factory) {
|
||||
BuildTask task;
|
||||
synchronized (this.taskQueue) {
|
||||
task = this.taskQueue.removeFirst();
|
||||
if (Math.random() < 0.5) {
|
||||
task = this.taskQueue.removeLast();
|
||||
} else {
|
||||
task = this.taskQueue.removeFirst();
|
||||
}
|
||||
}
|
||||
//long time = BuiltSection.getTime();
|
||||
var section = task.sectionSupplier.get();
|
||||
@@ -150,6 +154,6 @@ public class RenderGenerationService {
|
||||
}
|
||||
|
||||
public void addDebugData(List<String> debug) {
|
||||
debug.add("RMQ: " + this.taskQueue.size());//render mesh queue
|
||||
debug.add("RSSQ: " + this.taskQueue.size());//render section service queue
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public class HierarchicalOcclusionTraverser {
|
||||
.defineIf("DEBUG", Voxy.SHADER_DEBUG)
|
||||
.define("MAX_ITERATIONS", MAX_ITERATIONS)
|
||||
.define("LOCAL_SIZE_BITS", LOCAL_WORK_SIZE_BITS)
|
||||
.define("REQUEST_QUEUE_SIZE", NodeManager.REQUEST_QUEUE_SIZE)
|
||||
|
||||
.define("HIZ_BINDING", 0)
|
||||
|
||||
@@ -112,7 +113,6 @@ public class HierarchicalOcclusionTraverser {
|
||||
|
||||
MemoryUtil.memPutInt(ptr, viewport.height); ptr += 4;
|
||||
|
||||
MemoryUtil.memPutInt(ptr, NodeManager.REQUEST_QUEUE_SIZE); ptr += 4;//TODO maybe these to a #define
|
||||
MemoryUtil.memPutInt(ptr, (int) (this.renderList.size()/4-1)); ptr += 4;
|
||||
|
||||
//Screen space size for descending
|
||||
|
||||
@@ -11,7 +11,6 @@ layout(binding = SCENE_UNIFORM_BINDING, std140) uniform SceneUniform {
|
||||
uint screenW;
|
||||
vec3 camSubSecPos;
|
||||
uint screenH;
|
||||
uint requestQueueMaxSize;
|
||||
uint renderQueueMaxSize;
|
||||
float minSSS;
|
||||
};
|
||||
@@ -26,9 +25,9 @@ SIMPLE_QUEUE(uint, renderQueue, RENDER_QUEUE_BINDING);
|
||||
void addRequest(inout UnpackedNode node) {
|
||||
printf("Put node decend request");
|
||||
if (!hasRequested(node)) {
|
||||
if (requestQueueIndex.x < requestQueueMaxSize) {
|
||||
if (requestQueueIndex.x < REQUEST_QUEUE_SIZE) {
|
||||
uint atomRes = atomicAdd(requestQueueIndex.x, 1);
|
||||
if (atomRes < requestQueueMaxSize) {
|
||||
if (atomRes < REQUEST_QUEUE_SIZE) {
|
||||
//Mark node as having a request submitted to prevent duplicate submissions
|
||||
requestQueue[atomRes] = getRawPos(node);
|
||||
markRequested(node);
|
||||
|
||||
Reference in New Issue
Block a user