Drop GLcontext typedef and use struct gl_context instead
[mesa.git] / src / mesa / drivers / dri / r200 / r200_maos_arrays.c
index 383a0c4b0d3ea6c67c3f8ea1d973a77fcec32f4c..8a047e6419b38522ebcbdb3595ae1355490f1256 100644 (file)
@@ -70,11 +70,11 @@ do {                                                \
 } while (0)
 #endif
 
-static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
+static void r200_emit_vecfog(struct gl_context *ctx, struct radeon_aos *aos,
                             GLvoid *data, int stride, int count)
 {
        radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
-       uint32_t *out;
+       GLfloat *out;
        int i;
        int size = 1;
 
@@ -90,18 +90,20 @@ static void r200_emit_vecfog(GLcontext *ctx, struct radeon_aos *aos,
        aos->components = size;
        aos->count = count;
 
-       out = (uint32_t*)((char*)aos->bo->ptr + aos->offset);
+       radeon_bo_map(aos->bo, 1);
+       out = (GLfloat*)((char*)aos->bo->ptr + aos->offset);
        for (i = 0; i < count; i++) {
          out[0] = r200ComputeFogBlendFactor( ctx, *(GLfloat *)data );
          out++;
          data += stride;
        }
+       radeon_bo_unmap(aos->bo);
 }
 
 /* Emit any changed arrays to new GART memory, re-emit a packet to
  * update the arrays.  
  */
-void r200EmitArrays( GLcontext *ctx, GLubyte *vimap_rev )
+void r200EmitArrays( struct gl_context *ctx, GLubyte *vimap_rev )
 {
    r200ContextPtr rmesa = R200_CONTEXT( ctx );
    struct vertex_buffer *VB = &TNL_CONTEXT( ctx )->vb;