mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 14:20:59 +00:00
[qfvis] Add set debug prints (disabled)
They were useful for narrowing down why mightsee wasn't being updated.
This commit is contained in:
parent
9f42943589
commit
634219ea06
2 changed files with 14 additions and 0 deletions
|
@ -73,6 +73,7 @@ extern pthread_rwlock_t *portal_locks;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "QF/cmem.h"
|
#include "QF/cmem.h"
|
||||||
|
#include "QF/dstring.h"
|
||||||
#include "QF/set.h"
|
#include "QF/set.h"
|
||||||
#include "QF/simd/vec4f.h"
|
#include "QF/simd/vec4f.h"
|
||||||
|
|
||||||
|
@ -174,6 +175,7 @@ typedef struct threaddata_s {
|
||||||
sep_t *sep_freelist; ///< per-thread list of free separators
|
sep_t *sep_freelist; ///< per-thread list of free separators
|
||||||
winding_t *winding_freelist; ///< per-thread list of free windings
|
winding_t *winding_freelist; ///< per-thread list of free windings
|
||||||
memsuper_t *memsuper; ///< per-thread memory pool
|
memsuper_t *memsuper; ///< per-thread memory pool
|
||||||
|
dstring_t *str;
|
||||||
set_pool_t set_pool;
|
set_pool_t set_pool;
|
||||||
int id;
|
int id;
|
||||||
int winding_id;
|
int winding_id;
|
||||||
|
|
|
@ -474,6 +474,16 @@ PortalCompleted (threaddata_t *thread, portal_t *completed)
|
||||||
continue;
|
continue;
|
||||||
set_assign (changed, portal->mightsee);
|
set_assign (changed, portal->mightsee);
|
||||||
set_difference (changed, portal->visbits);
|
set_difference (changed, portal->visbits);
|
||||||
|
#if 0
|
||||||
|
dstring_copystr (thread->str, "mightsee: ");
|
||||||
|
set_as_string_r (thread->str, portal->mightsee);
|
||||||
|
dstring_appendstr (thread->str, "\nvisbits: ");
|
||||||
|
set_as_string_r (thread->str, portal->visbits);
|
||||||
|
dstring_appendstr (thread->str, "\nchanged: ");
|
||||||
|
set_as_string_r (thread->str, changed);
|
||||||
|
dstring_appendstr (thread->str, "\n");
|
||||||
|
write (0, thread->str->str, thread->str->size - 1);
|
||||||
|
#endif
|
||||||
for (j = 0; j < cluster->numportals; j++) {
|
for (j = 0; j < cluster->numportals; j++) {
|
||||||
if (j == i)
|
if (j == i)
|
||||||
continue;
|
continue;
|
||||||
|
@ -550,6 +560,7 @@ LeafThread (void *_thread)
|
||||||
set_pool_init (&data.set_pool);
|
set_pool_init (&data.set_pool);
|
||||||
data.id = thread;
|
data.id = thread;
|
||||||
data.memsuper = new_memsuper ();
|
data.memsuper = new_memsuper ();
|
||||||
|
data.str = dstring_new ();
|
||||||
do {
|
do {
|
||||||
portal = GetNextPortal (1);
|
portal = GetNextPortal (1);
|
||||||
if (!portal)
|
if (!portal)
|
||||||
|
@ -593,6 +604,7 @@ LeafThread (void *_thread)
|
||||||
if (working)
|
if (working)
|
||||||
working[thread] = -1;
|
working[thread] = -1;
|
||||||
delete_memsuper (data.memsuper);
|
delete_memsuper (data.memsuper);
|
||||||
|
dstring_delete (data.str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue