<html>
<body>
  <div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src/pvr2</tt></b></td></tr>
<tr><td><tt><a href="#file1">scene.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+5</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-1</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">5225c7c059ce -> f9aefb4613e5</td></tr>
</table>
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Clear polygon buffer map more efficiently
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/pvr2</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>scene.c</b></big> <small id="info" style="color: #888888;" >5225c7c059ce -> f9aefb4613e5</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/pvr2/scene.c
+++ lxdream/src/pvr2/scene.c
@@ -28,6 +28,7 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > #include "pvr2/scene.h"
 
 #define U8TOFLOAT(n)  (((float)((n)+1))/256.0)
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+#define POLY_IDX(addr) ( ((uint32_t *)addr) - ((uint32_t *)pvr2_scene.pvr2_pbuf))
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > 
 static void unpack_bgra(uint32_t bgra, float *rgba)
 {
</pre><pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >@@ -103,9 +104,12 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >  */
 void pvr2_scene_reset()
 {
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+    /* Faster to just clear the active entries */
+    for( int i=0; i<pvr2_scene.poly_count; i++ ) {
+        pvr2_scene.buf_to_poly_map[POLY_IDX(pvr2_scene.poly_array[i].context)] = 0;
+    }
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" >     pvr2_scene.poly_count = 0;
     pvr2_scene.vertex_count = 0;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >-    memset( pvr2_scene.buf_to_poly_map, 0, BUF_POLY_MAP_SIZE );
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > }
 
 void pvr2_scene_shutdown()
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>