disable vtxfmt_a code, switch over to vbo
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 31 Oct 2006 12:11:56 +0000 (12:11 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 31 Oct 2006 12:11:56 +0000 (12:11 +0000)
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_state.c
src/mesa/drivers/dri/r300/radeon_state.c

index 54eb081d055ed5239f27a1c6334e8e5d3ce1b02d..b58c6075c7346781167353b0ec1f63645a891884 100644 (file)
@@ -44,7 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
-#include "array_cache/acache.h"
+#include "vbo/vbo.h"
 
 #include "tnl/tnl.h"
 #include "tnl/t_pipeline.h"
@@ -287,7 +287,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
        /* Initialize the software rasterizer and helper modules.
         */
        _swrast_CreateContext(ctx);
-       _ac_CreateContext(ctx);
+       _vbo_CreateContext(ctx);
        _tnl_CreateContext(ctx);
        _swsetup_CreateContext(ctx);
        _swsetup_Wakeup(ctx);
@@ -300,7 +300,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
 
        /* Try and keep materials and vertices separate:
         */
-       _tnl_isolate_materials(ctx, GL_TRUE);
+/*     _tnl_isolate_materials(ctx, GL_TRUE); */
 
        /* Configure swrast and TNL to match hardware characteristics:
         */
@@ -478,7 +478,7 @@ void r300DestroyContext(__DRIcontextPrivate * driContextPriv)
                _swsetup_DestroyContext(r300->radeon.glCtx);
                _tnl_ProgramCacheDestroy(r300->radeon.glCtx);
                _tnl_DestroyContext(r300->radeon.glCtx);
-               _ac_DestroyContext(r300->radeon.glCtx);
+               _vbo_DestroyContext(r300->radeon.glCtx);
                _swrast_DestroyContext(r300->radeon.glCtx);
                
                if (r300->dma.current.buf) {
index df73cdedc11465d42211091310747599e9b59309..02ffbfcbefbac2264b3087707c61380f474c1abc 100644 (file)
@@ -48,7 +48,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "radeon_context.h"
 
 #define USER_BUFFERS
-#define RADEON_VTXFMT_A
+/* KW: Disable this code.  Driver should hook into vbo module
+ * directly, see i965 driver for example.
+ */
+/* #define RADEON_VTXFMT_A */
 #define HW_VBOS
 
 /* We don't handle 16 bits elts swapping yet */
@@ -739,7 +742,7 @@ struct radeon_vertex_buffer {
        
        struct dt AttribPtr[VERT_ATTRIB_MAX];
        
-       struct tnl_prim  *Primitive;                  
+       const struct _mesa_prim  *Primitive;                  
        GLuint      PrimitiveCount;
        GLint LockFirst;
        GLsizei LockCount;
index 03f168365dc7b7f94c972802239d7d11a49ac550..8c259d345c4cd5181dee532c2fa0d530e35a6c24 100644 (file)
@@ -42,7 +42,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "api_arrayelt.h"
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
-#include "array_cache/acache.h"
+#include "vbo/vbo.h"
 #include "tnl/tnl.h"
 #include "tnl/t_vp_build.h"
 
@@ -352,7 +352,7 @@ GLboolean r300_run_vb_render(GLcontext *ctx,
        r300EmitState(rmesa);
        
        for(i=0; i < VB->PrimitiveCount; i++){
-               GLuint prim = VB->Primitive[i].mode;
+               GLuint prim = _tnl_translate_prim(&VB->Primitive[i]);
                GLuint start = VB->Primitive[i].start;
                GLuint length = VB->Primitive[i].count;
                
index 29ffa7a017471eb66262424236536ffd3b26787b..5a98226300f89a66698c2c2d4d6b2af18ec77273 100644 (file)
@@ -46,7 +46,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "api_arrayelt.h"
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
-#include "array_cache/acache.h"
+#include "vbo/vbo.h"
 #include "tnl/tnl.h"
 #include "texformat.h"
 
@@ -1806,7 +1806,7 @@ static void r300InvalidateState(GLcontext * ctx, GLuint new_state)
        
        _swrast_InvalidateState(ctx, new_state);
        _swsetup_InvalidateState(ctx, new_state);
-       _ac_InvalidateState(ctx, new_state);
+       _vbo_InvalidateState(ctx, new_state);
        _tnl_InvalidateState(ctx, new_state);
        _ae_invalidate_state(ctx, new_state);
 
index 917acb7243c5df94c97330edeff4be40dd2c2b97..7726c22f4277173be406a1ea4816dff268b85687 100644 (file)
@@ -41,7 +41,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "light.h"
 
 #include "swrast/swrast.h"
-#include "array_cache/acache.h"
+#include "vbo/vbo.h"
 #include "tnl/tnl.h"
 #include "tnl/t_pipeline.h"
 #include "swrast_setup/swrast_setup.h"
@@ -134,8 +134,6 @@ void radeonUpdateScissor(GLcontext* ctx)
 
 static void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h)
 {
-       radeonContextPtr radeon = RADEON_CONTEXT(ctx);
-
        if (ctx->Scissor.Enabled) {
                /* We don't pipeline cliprect changes */
                r300Flush(ctx);