summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2008-05-29 15:49:23 +0200
committerJakob Bornecrantz <[email protected]>2008-05-29 15:49:23 +0200
commit056bea86b013858832a6ab390fe6efe310a7bc8f (patch)
treeaa177b664623a9c916264f704e1a7a7b61f3baa5
parent79b67d8408d1ba5b2232791ae35e731a5953b52d (diff)
i915: Deprecated pipe_winsys buffer functions
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c2
-rw-r--r--src/gallium/winsys/dri/intel/intel_winsys_pipe.c45
2 files changed, 8 insertions, 39 deletions
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 122f88fe3a0..935bc742b11 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -619,7 +619,7 @@ i915_get_tex_surface(struct pipe_screen *screen,
assert(zslice == 0);
}
- ps = ws->surface_alloc(ws);
+ ps = CALLOC_STRUCT(pipe_surface);//ws->surface_alloc(ws);
if (ps) {
assert(ps->refcount);
assert(ps->winsys);
diff --git a/src/gallium/winsys/dri/intel/intel_winsys_pipe.c b/src/gallium/winsys/dri/intel/intel_winsys_pipe.c
index a7f3047352c..af439a796f9 100644
--- a/src/gallium/winsys/dri/intel/intel_winsys_pipe.c
+++ b/src/gallium/winsys/dri/intel/intel_winsys_pipe.c
@@ -190,40 +190,16 @@ intel_flush_frontbuffer( struct pipe_winsys *winsys,
intelDisplaySurface(dPriv, surf, NULL);
}
-
+/*
+ * Deprecated surface functions
+ */
static struct pipe_surface *
intel_i915_surface_alloc(struct pipe_winsys *winsys)
{
- struct pipe_surface *surf = CALLOC_STRUCT(pipe_surface);
- if (surf) {
- surf->refcount = 1;
- surf->winsys = winsys;
- }
- return surf;
+ assert("intel_i915_surface_alloc is deprecated" & 0);
+ return NULL;
}
-
-/**
- * Round n up to next multiple.
- */
-static INLINE unsigned
-round_up(unsigned n, unsigned multiple)
-{
- return (n + multiple - 1) & ~(multiple - 1);
-}
-
-static unsigned
-power_of_two(unsigned x)
-{
- int value = 1;
- while (value <= x)
- value = value << 1;
- return value;
-}
-
-/**
- * Copied from xm_winsys.c
- */
static int
intel_i915_surface_alloc_storage(struct pipe_winsys *winsys,
struct pipe_surface *surf,
@@ -232,21 +208,14 @@ intel_i915_surface_alloc_storage(struct pipe_winsys *winsys,
unsigned flags,
unsigned tex_usage)
{
+ assert("intel_i915_surface_alloc_storage is deprecated" & 0);
return -1;
}
-
static void
intel_i915_surface_release(struct pipe_winsys *winsys, struct pipe_surface **s)
{
- struct pipe_surface *surf = *s;
- surf->refcount--;
- if (surf->refcount == 0) {
- if (surf->buffer)
- pipe_buffer_reference(winsys, &surf->buffer, NULL);
- free(surf);
- }
- *s = NULL;
+ assert("intel_i915_surface_release is deprecated" & 0);
}