summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-11-05 09:53:02 -0700
committerBrian <[email protected]>2007-11-05 09:53:02 -0700
commit9fc03fed01e3988f6cf07bb9c041328232b7bacf (patch)
tree66bba293c475a7ebfa86341fa972de785fa477c5 /src/mesa
parent616bf3556939d94852b1dfe73f92ef94b10782c4 (diff)
replace get_color_surface() with st_get_framebuffer_surface()
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_context.c1
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c19
2 files changed, 3 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_context.c b/src/mesa/drivers/dri/intel_winsys/intel_context.c
index c1169c621fe..565e377669f 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_context.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_context.c
@@ -192,6 +192,7 @@ intelUnbindContext(__DRIcontextPrivate * driContextPriv)
{
struct intel_context *intel = intel_context(driContextPriv);
st_flush(intel->st);
+ /* XXX make_current(NULL)? */
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
index b1cbebb944c..0d5ceec1e5c 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_swapbuffers.c
@@ -63,21 +63,6 @@ intelScreenContext(intelScreenPrivate *intelScreen)
/**
- * Return the pipe_surface for the given renderbuffer.
- */
-static struct pipe_surface *
-get_color_surface(struct intel_framebuffer *intel_fb,
- GLuint bufferIndex)
-{
- struct st_renderbuffer *strb
- = st_renderbuffer(intel_fb->stfb->Base.Attachment[bufferIndex].Renderbuffer);
- if (strb)
- return strb->surface;
- return NULL;
-}
-
-
-/**
* Display a colorbuffer surface in an X window.
* Used for SwapBuffers and flushing front buffer rendering.
*
@@ -255,7 +240,7 @@ intelSwapBuffers(__DRIdrawablePrivate * dPriv)
if (ctx->Visual.doubleBufferMode) {
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
struct pipe_surface *back_surf
- = get_color_surface(intel_fb, BUFFER_BACK_LEFT);
+ = st_get_framebuffer_surface(intel_fb->stfb, ST_SURFACE_BACK_LEFT);
_mesa_notifySwapBuffers(ctx); /* flush pending rendering comands */
@@ -283,7 +268,7 @@ intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h)
if (ctx->Visual.doubleBufferMode) {
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
struct pipe_surface *back_surf
- = get_color_surface(intel_fb, BUFFER_BACK_LEFT);
+ = st_get_framebuffer_surface(intel_fb->stfb, ST_SURFACE_BACK_LEFT);
drm_clip_rect_t rect;
/* fixup cliprect (driDrawable may have changed?) later */