cell: attempt conversion to sw_winsys
[mesa.git] / src / gallium / drivers / cell / ppu / cell_state_emit.c
index a59c7828ac307c426e08f2d634a756653f8324cf..424e2628a9563483695c3d5690d7aadc5272218d 100644 (file)
@@ -245,16 +245,13 @@ cell_emit_state(struct cell_context *cell)
       uint i, j;
       float *buf = cell_batch_alloc16(cell, ROUNDUP16(32 + num_const * sizeof(float)));
       uint32_t *ibuf = (uint32_t *) buf;
-      const float *constants = pipe_buffer_map(cell->pipe.screen,
-                                               cell->constants[shader],
-                                               PIPE_BUFFER_USAGE_CPU_READ);
+      const float *constants = cell->mapped_constants[shader];
       ibuf[0] = CELL_CMD_STATE_FS_CONSTANTS;
       ibuf[4] = num_const;
       j = 8;
       for (i = 0; i < num_const; i++) {
          buf[j++] = constants[i];
       }
-      pipe_buffer_unmap(cell->pipe.screen, cell->constants[shader]);
    }
 
    if (cell->dirty & (CELL_NEW_FRAMEBUFFER |