mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
Cell: updates to match pipe_buffer changes
This commit is contained in:
parent
b5618330c6
commit
0b958e3b7c
3 changed files with 10 additions and 12 deletions
|
|
@ -51,7 +51,7 @@ cell_map_constant_buffers(struct cell_context *sp)
|
|||
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,
|
||||
|
|
@ -123,7 +123,7 @@ cell_draw_elements(struct pipe_context *pipe,
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -131,7 +131,7 @@ cell_draw_elements(struct pipe_context *pipe,
|
|||
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 {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#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
|
||||
|
|
@ -163,7 +164,7 @@ cell_set_constant_buffer(struct pipe_context *pipe,
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -91,12 +91,9 @@ cell_texture_create(struct pipe_context *pipe, struct pipe_texture **pt)
|
|||
|
||||
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);
|
||||
|
|
@ -124,7 +121,7 @@ cell_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
|
|||
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);
|
||||
}
|
||||
|
|
@ -147,7 +144,7 @@ cell_get_tex_surface(struct pipe_context *pipe,
|
|||
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];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue