summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2007-07-17 17:29:55 +0200
committerRoland Scheidegger <[email protected]>2007-07-19 17:47:14 +0200
commitdbfb375805d94cb80262b8816c67a8adc778bec5 (patch)
treed3ca1413fde3fc7df597cbbfe5b7564cc2a95dfc /src/mesa/drivers
parentb9f2cf9a4e0a5ec89b27371210846942c93cb412 (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.c2
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_buffers.c7
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 349912ffecd..6f99f401c7c 100644
--- a/src/mesa/drivers/dri/i915tex/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915tex/intel_fbo.c
@@ -488,7 +488,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 f98d6665635..d498f616c90 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_buffers.c
@@ -390,9 +390,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