cell: assorted comments, clean-ups, etc.
[mesa.git] / src / gallium / drivers / cell / ppu / cell_state_emit.c
index 9d88c1cf3d2591bbcd11b3ddae0fc75532434de2..f2feaa329ab07d511962f8b6c66bcfd78ac5d8b1 100644 (file)
@@ -47,7 +47,10 @@ emit_state_cmd(struct cell_context *cell, uint cmd,
 }
 
 
-
+/**
+ * For state marked as 'dirty', construct a state-update command block
+ * and insert it into the current batch buffer.
+ */
 void
 cell_emit_state(struct cell_context *cell)
 {
@@ -90,7 +93,8 @@ cell_emit_state(struct cell_context *cell)
          blend.size = (char *) cell->blend->code.csr
              - (char *) cell->blend->code.store;
          blend.read_fb = TRUE;
-      } else {
+      }
+      else {
          blend.base = 0;
          blend.size = 0;
          blend.read_fb = FALSE;
@@ -101,7 +105,6 @@ cell_emit_state(struct cell_context *cell)
 
    if (cell->dirty & CELL_NEW_DEPTH_STENCIL) {
       struct cell_command_depth_stencil_alpha_test dsat;
-      
 
       if (cell->depth_stencil != NULL) {
         dsat.base = (intptr_t) cell->depth_stencil->code.store;
@@ -109,15 +112,15 @@ cell_emit_state(struct cell_context *cell)
             - (char *) cell->depth_stencil->code.store;
         dsat.read_depth = TRUE;
         dsat.read_stencil = FALSE;
-      } else {
+      }
+      else {
         dsat.base = 0;
         dsat.size = 0;
         dsat.read_depth = FALSE;
         dsat.read_stencil = FALSE;
       }
 
-      emit_state_cmd(cell, CELL_CMD_STATE_DEPTH_STENCIL, &dsat,
-                    sizeof(dsat));
+      emit_state_cmd(cell, CELL_CMD_STATE_DEPTH_STENCIL, &dsat, sizeof(dsat));
    }
 
    if (cell->dirty & CELL_NEW_SAMPLER) {
@@ -170,7 +173,6 @@ cell_emit_state(struct cell_context *cell)
       info.immediates = (uintptr_t) draw->vs.machine.Imms;
       info.num_immediates = draw->vs.machine.ImmLimit / 4;
 
-      emit_state_cmd(cell, CELL_CMD_STATE_BIND_VS,
-                    & info, sizeof(info));
+      emit_state_cmd(cell, CELL_CMD_STATE_BIND_VS, &info, sizeof(info));
    }
 }