#include "pipe/p_shader_tokens.h"
#include "cso_cache/cso_context.h"
#include "util/u_draw_quad.h"
-#include "util/p_tile.h"
+#include "util/u_tile.h"
#include "tgsi/tgsi_text.h"
#include "tgsi/tgsi_dump.h"
const float *vertices)
{
struct pipe_context *pipe = $self->pipe;
- struct pipe_winsys *winsys = pipe->winsys;
+ struct pipe_screen *screen = pipe->screen;
struct pipe_buffer *vbuf;
float *map;
unsigned size;
size = num_verts * num_attribs * 4 * sizeof(float);
- vbuf = winsys->buffer_create(winsys,
- 32,
- PIPE_BUFFER_USAGE_VERTEX,
- size);
+ vbuf = pipe_buffer_create(screen,
+ 32,
+ PIPE_BUFFER_USAGE_VERTEX,
+ size);
if(!vbuf)
goto error1;
- map = winsys->buffer_map(winsys, vbuf, PIPE_BUFFER_USAGE_CPU_WRITE);
+ map = pipe_buffer_map(screen, vbuf, PIPE_BUFFER_USAGE_CPU_WRITE);
if (!map)
goto error2;
memcpy(map, vertices, size);
- pipe->winsys->buffer_unmap(pipe->winsys, vbuf);
+ pipe_buffer_unmap(screen, vbuf);
util_draw_vertex_buffer(pipe, vbuf, prim, num_verts, num_attribs);
error2:
- pipe_buffer_reference(pipe->screen, &vbuf, NULL);
+ pipe_buffer_reference(screen, &vbuf, NULL);
error1:
;
}
}
void write( const char *STRING, unsigned LENGTH, unsigned offset = 0) {
- struct pipe_winsys *winsys = $self->st_dev->screen->winsys;
+ struct pipe_screen *screen = $self->st_dev->screen;
char *map;
assert($self->buffer->refcount);
return;
}
- map = winsys->buffer_map(winsys, $self->buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
+ map = pipe_buffer_map(screen, $self->buffer, PIPE_BUFFER_USAGE_CPU_WRITE);
if(map) {
memcpy(map + offset, STRING, LENGTH);
- winsys->buffer_unmap(winsys, $self->buffer);
+ pipe_buffer_unmap(screen, $self->buffer);
}
}
};
st_buffer_destroy(struct st_buffer *st_buf)
{
if(st_buf) {
- struct pipe_winsys *winsys = st_buf->st_dev->screen->winsys;
- pipe_buffer_reference(pipe->screen, &st_buf->buffer, NULL);
+ struct pipe_screen *screen = st_buf->st_dev->screen;
+ pipe_buffer_reference(screen, &st_buf->buffer, NULL);
FREE(st_buf);
}
}
st_buffer_create(struct st_device *st_dev,
unsigned alignment, unsigned usage, unsigned size)
{
- struct pipe_winsys *winsys = st_dev->screen->winsys;
+ struct pipe_screen *screen = st_dev->screen;
struct st_buffer *st_buf;
st_buf = CALLOC_STRUCT(st_buffer);
st_buf->st_dev = st_dev;
- st_buf->buffer = winsys->buffer_create(winsys, alignment, usage, size);
+ st_buf->buffer = pipe_buffer_create(screen, alignment, usage, size);
if(!st_buf->buffer) {
st_buffer_destroy(st_buf);
return NULL;