summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-10-26 10:45:42 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-10-26 10:45:42 -0600
commite4f6f0ec02133e9297c3f2db787dee14bf0ae6e1 (patch)
treea5706d83a96964b2cf63cd66ca25ed63641b4a56 /src/mesa/drivers/dri
parentf7be1b419aab80c4e011183611964eb4d7c023c2 (diff)
surface_alloc() is now a winsys function.
This allows surfaces to be allocated without a rendering context. A few loose ends to resolve, but in working condition.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
index 6f244e1100..4569b1e3bf 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c
@@ -253,6 +253,18 @@ intel_i915_region_release(struct pipe_winsys *winsys,
}
+static struct pipe_surface *
+intel_i915_surface_alloc(struct pipe_winsys *winsys, unsigned format)
+{
+ struct pipe_surface *surf = CALLOC_STRUCT(pipe_surface);
+ if (surf) {
+ surf->format = format;
+ surf->refcount = 1;
+ }
+ return surf;
+}
+
+
static void
intel_printf( struct pipe_winsys *sws, const char *fmtString, ... )
{
@@ -298,5 +310,7 @@ intel_create_pipe_winsys( struct intel_context *intel )
iws->winsys.region_alloc = intel_i915_region_alloc;
iws->winsys.region_release = intel_i915_region_release;
+ iws->winsys.surface_alloc = intel_i915_surface_alloc;
+
return &iws->winsys;
}