summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-01-25 20:53:31 +0000
committerKeith Whitwell <[email protected]>2008-01-25 20:53:31 +0000
commit1e0d30a515e4cac891b6c590f12a33e0e8a8e295 (patch)
tree72ffec9e89bd0bd9202fcfc39f5e7bdf881adcf2 /src/mesa/pipe/i915simple
parent756d52ec12c41ee90ee9598dc9028cc134806bd2 (diff)
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.
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r--src/mesa/pipe/i915simple/i915_blit.c6
-rw-r--r--src/mesa/pipe/i915simple/i915_blit.h6
-rw-r--r--src/mesa/pipe/i915simple/i915_context.c2
-rw-r--r--src/mesa/pipe/i915simple/i915_context.h4
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_vbuf.c3
-rw-r--r--src/mesa/pipe/i915simple/i915_state_emit.c2
-rw-r--r--src/mesa/pipe/i915simple/i915_surface.c2
-rw-r--r--src/mesa/pipe/i915simple/i915_texture.c2
-rw-r--r--src/mesa/pipe/i915simple/i915_winsys.h4
9 files changed, 16 insertions, 15 deletions
diff --git a/src/mesa/pipe/i915simple/i915_blit.c b/src/mesa/pipe/i915simple/i915_blit.c
index 6e95313a0d2..d49876f9708 100644
--- a/src/mesa/pipe/i915simple/i915_blit.c
+++ b/src/mesa/pipe/i915simple/i915_blit.c
@@ -38,7 +38,7 @@ void
i915_fill_blit(struct i915_context *i915,
unsigned cpp,
short dst_pitch,
- struct pipe_buffer_handle *dst_buffer,
+ struct pipe_buffer *dst_buffer,
unsigned dst_offset,
short x, short y,
short w, short h,
@@ -87,10 +87,10 @@ void
i915_copy_blit( struct i915_context *i915,
unsigned cpp,
short src_pitch,
- struct pipe_buffer_handle *src_buffer,
+ struct pipe_buffer *src_buffer,
unsigned src_offset,
short dst_pitch,
- struct pipe_buffer_handle *dst_buffer,
+ struct pipe_buffer *dst_buffer,
unsigned dst_offset,
short src_x, short src_y,
short dst_x, short dst_y,
diff --git a/src/mesa/pipe/i915simple/i915_blit.h b/src/mesa/pipe/i915simple/i915_blit.h
index 7ea4e979eca..d7a66be10ae 100644
--- a/src/mesa/pipe/i915simple/i915_blit.h
+++ b/src/mesa/pipe/i915simple/i915_blit.h
@@ -33,10 +33,10 @@
extern void i915_copy_blit(struct i915_context *i915,
unsigned cpp,
short src_pitch,
- struct pipe_buffer_handle *src_buffer,
+ struct pipe_buffer *src_buffer,
unsigned src_offset,
short dst_pitch,
- struct pipe_buffer_handle *dst_buffer,
+ struct pipe_buffer *dst_buffer,
unsigned dst_offset,
short srcx, short srcy,
short dstx, short dsty,
@@ -45,7 +45,7 @@ extern void i915_copy_blit(struct i915_context *i915,
extern void i915_fill_blit(struct i915_context *i915,
unsigned cpp,
short dst_pitch,
- struct pipe_buffer_handle *dst_buffer,
+ struct pipe_buffer *dst_buffer,
unsigned dst_offset,
short x, short y,
short w, short h, unsigned color);
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c
index c2b96d2554e..497623a7006 100644
--- a/src/mesa/pipe/i915simple/i915_context.c
+++ b/src/mesa/pipe/i915simple/i915_context.c
@@ -166,7 +166,7 @@ static void i915_destroy( struct pipe_context *pipe )
static boolean
i915_draw_elements( struct pipe_context *pipe,
- struct pipe_buffer_handle *indexBuffer,
+ struct pipe_buffer *indexBuffer,
unsigned indexSize,
unsigned prim, unsigned start, unsigned count)
{
diff --git a/src/mesa/pipe/i915simple/i915_context.h b/src/mesa/pipe/i915simple/i915_context.h
index 2f1f0369934..b4ea63c3e74 100644
--- a/src/mesa/pipe/i915simple/i915_context.h
+++ b/src/mesa/pipe/i915simple/i915_context.h
@@ -172,7 +172,7 @@ struct i915_texture {
/* The data is held here:
*/
- struct pipe_buffer_handle *buffer;
+ struct pipe_buffer *buffer;
};
struct i915_context
@@ -204,7 +204,7 @@ struct i915_context
unsigned *batch_start;
/** Vertex buffer */
- struct pipe_buffer_handle *vbo;
+ struct pipe_buffer *vbo;
struct i915_state current;
unsigned hardware_dirty;
diff --git a/src/mesa/pipe/i915simple/i915_prim_vbuf.c b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
index 0887f9a1c66..39154b2488b 100644
--- a/src/mesa/pipe/i915simple/i915_prim_vbuf.c
+++ b/src/mesa/pipe/i915simple/i915_prim_vbuf.c
@@ -42,6 +42,7 @@
#include "pipe/draw/draw_vbuf.h"
#include "pipe/p_util.h"
+#include "pipe/p_inlines.h"
#include "pipe/p_winsys.h"
#include "i915_context.h"
@@ -192,7 +193,7 @@ i915_vbuf_render_release_vertices( struct vbuf_render *render,
assert(i915->vbo);
winsys->buffer_unmap(winsys, i915->vbo);
- winsys->buffer_reference(winsys, &i915->vbo, NULL);
+ pipe_buffer_reference(winsys, &i915->vbo, NULL);
}
diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c
index 8598eacc9c3..657f5238938 100644
--- a/src/mesa/pipe/i915simple/i915_state_emit.c
+++ b/src/mesa/pipe/i915simple/i915_state_emit.c
@@ -278,7 +278,7 @@ i915_emit_hardware_state(struct i915_context *i915 )
OUT_BATCH(enabled);
for (unit = 0; unit < I915_TEX_UNITS; unit++) {
if (enabled & (1 << unit)) {
- struct pipe_buffer_handle *buf =
+ struct pipe_buffer *buf =
i915->texture[unit]->buffer;
uint offset = 0;
assert(buf);
diff --git a/src/mesa/pipe/i915simple/i915_surface.c b/src/mesa/pipe/i915simple/i915_surface.c
index e625f5a68c8..8ef02b99cd1 100644
--- a/src/mesa/pipe/i915simple/i915_surface.c
+++ b/src/mesa/pipe/i915simple/i915_surface.c
@@ -65,7 +65,7 @@ i915_get_tex_surface(struct pipe_context *pipe,
if (ps) {
assert(ps->refcount);
assert(ps->winsys);
- pipe->winsys->buffer_reference(pipe->winsys, &ps->buffer, tex->buffer);
+ pipe_buffer_reference(pipe->winsys, &ps->buffer, tex->buffer);
ps->format = pt->format;
ps->cpp = pt->cpp;
ps->width = pt->width[level];
diff --git a/src/mesa/pipe/i915simple/i915_texture.c b/src/mesa/pipe/i915simple/i915_texture.c
index bf80e18233f..61944fe7d9a 100644
--- a/src/mesa/pipe/i915simple/i915_texture.c
+++ b/src/mesa/pipe/i915simple/i915_texture.c
@@ -523,7 +523,7 @@ i915_texture_release(struct pipe_context *pipe, struct pipe_texture **pt)
DBG("%s deleting %p\n", __FUNCTION__, (void *) tex);
*/
- pipe->winsys->buffer_reference(pipe->winsys, &tex->buffer, NULL);
+ pipe_buffer_reference(pipe->winsys, &tex->buffer, NULL);
for (i = 0; i < PIPE_MAX_TEXTURE_LEVELS; i++)
if (tex->image_offset[i])
diff --git a/src/mesa/pipe/i915simple/i915_winsys.h b/src/mesa/pipe/i915simple/i915_winsys.h
index 2c0f335d346..fe49710852b 100644
--- a/src/mesa/pipe/i915simple/i915_winsys.h
+++ b/src/mesa/pipe/i915simple/i915_winsys.h
@@ -50,7 +50,7 @@
* etc.
*/
-struct pipe_buffer_handle;
+struct pipe_buffer;
struct pipe_winsys;
@@ -93,7 +93,7 @@ struct i915_winsys {
* I915_BUFFER_ACCESS_READ macros.
*/
void (*batch_reloc)( struct i915_winsys *sws,
- struct pipe_buffer_handle *buf,
+ struct pipe_buffer *buf,
unsigned access_flags,
unsigned delta );