r300: Removed the (completely broken since new VBO branch) OPTIMIZE_ELTS path.
authorOliver McFadden <z3ro.geek@gmail.com>
Sun, 27 May 2007 23:35:12 +0000 (23:35 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Wed, 30 May 2007 03:19:26 +0000 (03:19 +0000)
The VTXFMT code was broken by the new VBO branch and the OPTIMIZE_ELTS path
relied on the VTXFMT code...

I'm not even sure if the OPTIMIZE_ELTS path ever worked; the testing that I did
after minimizing the code duplication would have taken the same path as the
non-OPTIMIZE_ELTS code.

src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_render.c

index 9aa61a466a044d95c01d18bf89fa8fd3f314bf33..6bd74fe9cd8701b9e0c363d6f889e37db79d03a1 100644 (file)
@@ -49,8 +49,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define USER_BUFFERS
 
-//#define OPTIMIZE_ELTS
-
 struct r300_context;
 typedef struct r300_context r300ContextRec;
 typedef struct r300_context *r300ContextPtr;
index 1a7ebc91a5f745aa22f4a2ebd391a650f3a21f99..0c5750de875b075e83b7b5fbfd50a51c5f0bc09a 100644 (file)
@@ -205,8 +205,6 @@ static void r300FireEB(r300ContextPtr rmesa, unsigned long addr,
        int cmd_reserved = 0;
        int cmd_written = 0;
        drm_radeon_cmd_header_t *cmd = NULL;
-       unsigned long t_addr;
-       unsigned long magic_1, magic_2;
 
        assert(elt_size == 2 || elt_size == 4);
 
@@ -215,10 +213,6 @@ static void r300FireEB(r300ContextPtr rmesa, unsigned long addr,
                return;
        }
 
-       magic_1 = (addr % 32) / 4;
-       t_addr = addr & ~0x1d;
-       magic_2 = (vertex_count + 1 + (t_addr & 0x2)) / 2 + magic_1;
-
        start_packet3(RADEON_CP_PACKET3_3D_DRAW_INDX_2, 0);
        if (elt_size == 4) {
                e32(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (vertex_count << 16) | type | R300_VAP_VF_CNTL__INDEX_SIZE_32bit);
@@ -227,27 +221,13 @@ static void r300FireEB(r300ContextPtr rmesa, unsigned long addr,
        }
 
        start_packet3(RADEON_CP_PACKET3_INDX_BUFFER, 2);
-#ifdef OPTIMIZE_ELTS
-       if (elt_size == 4) {
-               e32(R300_EB_UNK1 | (0 << 16) | R300_EB_UNK2);
-               e32(addr);
-       } else {
-               e32(R300_EB_UNK1 | (magic_1 << 16) | R300_EB_UNK2);
-               e32(t_addr);
-       }
-#else
        e32(R300_EB_UNK1 | (0 << 16) | R300_EB_UNK2);
        e32(addr);
-#endif
 
        if (elt_size == 4) {
                e32(vertex_count);
        } else {
-#ifdef OPTIMIZE_ELTS
-               e32(magic_2);
-#else
                e32((vertex_count + 1) / 2);
-#endif
        }
 }