diff options
author | Marek Olšák <[email protected]> | 2011-09-11 22:24:38 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-09-30 23:19:52 +0200 |
commit | 6101b6d442b06a347c001fe85848d636ab7df260 (patch) | |
tree | f345c754e5fb587997f150f3dd4434d88123f592 /src/gallium/drivers/r600/r600_asm.c | |
parent | ba89086e79b22bd9578ea642846108de624c91e9 (diff) |
r600g: merge r600_bo with r600_resource
I have moved 'last_flush' and 'binding' from r600_bo to winsys/radeon.
The other members are now part of r600_resource.
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_asm.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index 6d92640f467..af0351b93c0 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -2262,17 +2262,19 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru ve->fs_size = bc.ndw*4; - /* use PIPE_BIND_VERTEX_BUFFER so we use the cache buffer manager */ - ve->fetch_shader = r600_bo(rctx->radeon, ve->fs_size, 256, PIPE_BIND_VERTEX_BUFFER, PIPE_USAGE_IMMUTABLE); + ve->fetch_shader = (struct r600_resource*) + pipe_buffer_create(rctx->context.screen, + PIPE_BIND_CUSTOM, + PIPE_USAGE_IMMUTABLE, ve->fs_size); if (ve->fetch_shader == NULL) { r600_bytecode_clear(&bc); return -ENOMEM; } - bytecode = r600_bo_map(rctx->radeon, ve->fetch_shader, rctx->ctx.cs, PIPE_TRANSFER_WRITE); + bytecode = rctx->ws->buffer_map(ve->fetch_shader->buf, rctx->ctx.cs, PIPE_TRANSFER_WRITE); if (bytecode == NULL) { r600_bytecode_clear(&bc); - r600_bo_reference(&ve->fetch_shader, NULL); + pipe_resource_reference((struct pipe_resource**)&ve->fetch_shader, NULL); return -ENOMEM; } @@ -2284,7 +2286,7 @@ int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, stru memcpy(bytecode, bc.bytecode, ve->fs_size); } - r600_bo_unmap(rctx->radeon, ve->fetch_shader); + rctx->ws->buffer_unmap(ve->fetch_shader->buf); r600_bytecode_clear(&bc); if (rctx->chip_class >= EVERGREEN) |