From f684120417c6b3ca9e7486ffeb24fe88e428834d Mon Sep 17 00:00:00 2001 From: Brian Date: Thu, 25 Oct 2007 19:27:29 -0600 Subject: Move region_alloc() and region_release() to pipe_winsys. This allows regions to be allocated w/out a rendering context. --- src/mesa/state_tracker/st_cb_fbo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_fbo.c') diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 94e286feab..f22132b3cf 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -41,6 +41,7 @@ #include "pipe/p_context.h" #include "pipe/p_defines.h" +#include "pipe/p_winsys.h" #include "st_context.h" #include "st_cb_fbo.h" #include "st_cb_texture.h" @@ -95,10 +96,11 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, struct pipe_region *r = strb->surface->region; while (r->map) pipe->region_unmap(pipe, r); - pipe->region_release(pipe, &strb->surface->region); + pipe->winsys->region_release(pipe->winsys, &strb->surface->region); } - strb->surface->region = pipe->region_alloc(pipe, cpp, width, height, flags); + strb->surface->region = pipe->winsys->region_alloc(pipe->winsys, cpp, + width, height, flags); if (!strb->surface->region) return GL_FALSE; /* out of memory, try s/w buffer? */ @@ -125,7 +127,7 @@ st_renderbuffer_delete(struct gl_renderbuffer *rb) ASSERT(strb); if (strb && strb->surface) { if (strb->surface->region) { - pipe->region_release(pipe, &strb->surface->region); + pipe->winsys->region_release(pipe->winsys, &strb->surface->region); } free(strb->surface); } -- cgit v1.2.3