diff options
author | Roland Scheidegger <sroland@tungstengraphics.com> | 2007-07-17 17:29:55 +0200 |
---|---|---|
committer | Roland Scheidegger <sroland@tungstengraphics.com> | 2007-07-17 17:29:55 +0200 |
commit | d9499a151df85fef6bb6f31b58657e44cadba50a (patch) | |
tree | 3e8f88219f15959c350f9a460f0bb63c2b5b5810 /src/mesa/drivers | |
parent | 04d49ff24d0f9c7c3a99c45b50f62aa32b0a28ed (diff) |
fix mesa fb binding
Make sure that we bind the right buffer (draw or read) when rebinding
the window framebuffer (the api doesn't allow binding different draw and
read buffers at the same time, but the default window framebuffer is basically
2 fb objects, one for read, one for write, which can be different). Pass both
of these two down the driver api (no driver uses this right now).
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_fbo.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_buffers.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_fbo.c b/src/mesa/drivers/dri/i915tex/intel_fbo.c index afee07c689..b0c243ebe0 100644 --- a/src/mesa/drivers/dri/i915tex/intel_fbo.c +++ b/src/mesa/drivers/dri/i915tex/intel_fbo.c @@ -513,7 +513,7 @@ intel_new_renderbuffer(GLcontext * ctx, GLuint name) */ static void intel_bind_framebuffer(GLcontext * ctx, GLenum target, - struct gl_framebuffer *fb) + struct gl_framebuffer *fb, struct gl_framebuffer *fbread) { if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) { intel_draw_buffer(ctx, fb); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c index 857cd30584..6a2c2013e3 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c @@ -395,9 +395,12 @@ nouveauNewRenderbuffer(GLcontext *ctx, GLuint name) } static void -nouveauBindFramebuffer(GLcontext *ctx, GLenum target, struct gl_framebuffer *fb) +nouveauBindFramebuffer(GLcontext *ctx, GLenum target, + struct gl_framebuffer *fb, struct gl_framebuffer *fbread) { - nouveau_build_framebuffer(ctx, fb); + if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) { + nouveau_build_framebuffer(ctx, fb); + } } static void |