gallium: rename pipe_buffer_handle to pipe_buffer, rework pipebuffer/ code

Provide an actual definition of the pipe_buffer struct,  containing
the parameters used to create the buffer, and its refcount.

Shift refcounting buffers out of the winsys interface, similar to
surfaces & textures.

Rework pipebuffer/ to reflect the fact these changes, and also Michel's
reworking of the buffer interface.
This commit is contained in:
Keith Whitwell
2008-01-25 20:53:31 +00:00
parent 756d52ec12
commit 1e0d30a515
62 changed files with 529 additions and 894 deletions

View File

@@ -37,6 +37,7 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/p_inlines.h"
#include "st_context.h"
#include "st_atom.h"
@@ -70,7 +71,7 @@ void st_upload_constants( struct st_context *st,
_mesa_load_state_parameters(st->ctx, params);
if (cbuf->buffer && cbuf->size != paramBytes)
ws->buffer_reference( ws, &cbuf->buffer, NULL );
pipe_buffer_reference( ws, &cbuf->buffer, NULL );
if (!cbuf->buffer) {
cbuf->buffer = ws->buffer_create(ws, 1, PIPE_BUFFER_USAGE_CONSTANT,