i965: Move device info initialization to common code
[mesa.git] / src / mesa / drivers / dri / r200 / r200_maos_arrays.c
index 973dcaf07d990a15c7ae1c165ece18d7c1c0c30b..a3d45cf736975e86c9a8c532cc4e1a89f1a262c0 100644 (file)
@@ -29,14 +29,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /*
  * Authors:
- *   Keith Whitwell <keith@tungstengraphics.com>
+ *   Keith Whitwell <keithw@vmware.com>
  */
 
 #include "main/glheader.h"
 #include "main/mtypes.h"
-#include "main/colormac.h"
 #include "main/imports.h"
 #include "main/macros.h"
+#include "main/state.h"
 
 #include "swrast_setup/swrast_setup.h"
 #include "math/m_translate.h"
@@ -102,9 +102,7 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
            }
            break;
         case 1:
-           assert(attrib == VERT_ATTRIB_WEIGHT);
-           emitsize = (VB->AttribPtr[attrib]->size);
-           vfmt0 |= emitsize << R200_VTX_WEIGHT_COUNT_SHIFT;
+            unreachable("r200: vertex weight attrib unsupported");
            break;
         case 2:
            assert(attrib == VERT_ATTRIB_NORMAL);
@@ -115,7 +113,7 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
            /* special handling to fix up fog. Will get us into trouble with vbos...*/
            assert(attrib == VERT_ATTRIB_FOG);
            if (!rmesa->radeon.tcl.aos[i].bo) {
-              if (ctx->VertexProgram._Enabled)
+              if (_mesa_arb_vertex_program_enabled(ctx))
                  rcommon_emit_vector( ctx,
                                       &(rmesa->radeon.tcl.aos[nr]),
                                       (char *)VB->AttribPtr[attrib]->data,
@@ -166,8 +164,9 @@ void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
               /* fallthrough */
            case 4:
               vfmt0 |= R200_VTX_W1;
-           break;
+              /* fallthrough */
            }
+           break;
         default:
            assert(0);
            emitsize = 0;