gallivm,draw,llvmpipe: use base ptr + mip offsets instead of mip pointers
[mesa.git] / src / gallium / drivers / i915 / i915_prim_emit.c
index d9a5c40ab9785fd900e56e3b5d81ccde67a27a1f..85656cd784626ac0436ece27b20772c5bd03f038 100644 (file)
@@ -102,6 +102,13 @@ emit_hw_vertex( struct i915_context *i915,
          count += 4;
          break;
       case EMIT_4UB:
+         OUT_BATCH( pack_ub4(float_to_ubyte( attrib[0] ),
+                             float_to_ubyte( attrib[1] ),
+                             float_to_ubyte( attrib[2] ),
+                             float_to_ubyte( attrib[3] )) );
+         count += 1;
+         break;
+      case EMIT_4UB_BGRA:
          OUT_BATCH( pack_ub4(float_to_ubyte( attrib[2] ),
                              float_to_ubyte( attrib[1] ),
                              float_to_ubyte( attrib[0] ),
@@ -137,15 +144,14 @@ emit_prim( struct draw_stage *stage,
    vertex_size = i915->current.vertex_info.size * 4; /* in bytes */
    assert(vertex_size >= 12); /* never smaller than 12 bytes */
 
-   if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
+   if (!BEGIN_BATCH( 1 + nr * vertex_size / 4)) {
       FLUSH_BATCH(NULL);
 
       /* Make sure state is re-emitted after a flush: 
        */
-      i915_update_derived( i915 );
       i915_emit_hardware_state( i915 );
 
-      if (!BEGIN_BATCH( 1 + nr * vertex_size / 4, 0 )) {
+      if (!BEGIN_BATCH( 1 + nr * vertex_size / 4)) {
         assert(0);
         return;
       }