shithub: libgraphics

Download patch

ref: 216f83db15a2c6f28794e4be25165f5ac55270ef
parent: ddbb6a2f4c9204b4539b7d43a0251d3f92538b10
author: rodri <rgl@antares-labs.eu>
date: Sun Sep 8 12:37:16 EDT 2024

render: increase queue sizes.

--- a/render.c
+++ b/render.c
@@ -616,7 +616,7 @@
 	paramsout = emalloc(nproc*sizeof(*paramsout));
 	taskchans = emalloc(nproc*sizeof(*taskchans));
 	for(i = 0; i < nproc; i++){
-		paramsout[i] = chancreate(sizeof(SUparams*), 8);
+		paramsout[i] = chancreate(sizeof(SUparams*), 256);
 		tp = emalloc(sizeof *tp);
 		tp->id = i;
 		tp->paramsc = paramsout[i];
@@ -627,7 +627,7 @@
 	for(i = 0; i < nproc; i++){
 		rp = emalloc(sizeof *rp);
 		rp->id = i;
-		rp->taskc = taskchans[i] = chancreate(sizeof(Rastertask*), 32);
+		rp->taskc = taskchans[i] = chancreate(sizeof(Rastertask*), 512);
 		proccreate(rasterizer, rp, mainstacksize);
 	}
 
@@ -696,7 +696,7 @@
 
 	ep = emalloc(sizeof *ep);
 	ep->rctl = rctl;
-	ep->paramsc = chancreate(sizeof(SUparams*), 8);
+	ep->paramsc = chancreate(sizeof(SUparams*), 256);
 	proccreate(entityproc, ep, mainstacksize);
 
 	while((job = recvp(rctl->jobq)) != nil){