for (i = 0; i < 2; i++) {
if (sp->constants[i].size)
sp->mapped_constants[i] = ws->buffer_map(ws, sp->constants[i].buffer,
- PIPE_BUFFER_FLAG_READ);
+ PIPE_BUFFER_USAGE_CPU_READ);
}
draw_set_mapped_constant_buffer(sp->draw,
if (sp->vertex_buffer[i].buffer) {
void *buf = pipe->winsys->buffer_map(pipe->winsys,
sp->vertex_buffer[i].buffer,
- PIPE_BUFFER_FLAG_READ);
+ PIPE_BUFFER_USAGE_CPU_READ);
draw_set_mapped_vertex_buffer(draw, i, buf);
}
}
if (indexBuffer) {
void *mapped_indexes = pipe->winsys->buffer_map(pipe->winsys,
indexBuffer,
- PIPE_BUFFER_FLAG_READ);
+ PIPE_BUFFER_USAGE_CPU_READ);
draw_set_mapped_element_buffer(draw, indexSize, mapped_indexes);
}
else {
#include "pipe/p_defines.h"
#include "pipe/p_util.h"
+#include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "pipe/draw/draw_context.h"
#if 0
assert(index == 0);
/* note: reference counting */
- ws->buffer_reference(ws,
+ pipe_buffer_reference(ws,
&cell->constants[shader].buffer,
buf->buffer);
cell->constants[shader].size = buf->size;
cell_texture_layout(spt);
- spt->buffer = pipe->winsys->buffer_create(pipe->winsys, 32, 0, 0);
-
- if (spt->buffer) {
- pipe->winsys->buffer_data(pipe->winsys, spt->buffer, spt->buffer_size,
- NULL, PIPE_BUFFER_USAGE_PIXEL);
- }
+ spt->buffer = pipe->winsys->buffer_create(pipe->winsys, 32,
+ PIPE_BUFFER_USAGE_PIXEL,
+ spt->buffer_size);
if (!spt->buffer) {
FREE(spt);
DBG("%s deleting %p\n", __FUNCTION__, (void *) spt);
*/
- pipe->winsys->buffer_reference(pipe->winsys, &spt->buffer, NULL);
+ pipe_buffer_reference(pipe->winsys, &spt->buffer, NULL);
FREE(spt);
}
if (ps) {
assert(ps->refcount);
assert(ps->winsys);
- pipe->winsys->buffer_reference(pipe->winsys, &ps->buffer, spt->buffer);
+ pipe_buffer_reference(pipe->winsys, &ps->buffer, spt->buffer);
ps->format = pt->format;
ps->cpp = pt->cpp;
ps->width = pt->width[level];