intel: Lookup requested renderbuffer in intel_create_image_from_renderbuffer
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 26 Feb 2010 19:49:31 +0000 (14:49 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 26 Feb 2010 19:52:14 +0000 (14:52 -0500)
Previously we'd use the current renderbuffer.

src/mesa/drivers/dri/intel/intel_screen.c

index f19e2ee81d48ce1ad093e8384a3056f867516e80..bc394d048e20460a7eca34605c8478634a515ab3 100644 (file)
@@ -30,6 +30,7 @@
 #include "main/framebuffer.h"
 #include "main/renderbuffer.h"
 #include "main/hash.h"
+#include "main/fbobject.h"
 
 #include "utils.h"
 #include "xmlpool.h"
@@ -194,7 +195,7 @@ intel_create_image_from_renderbuffer(__DRIcontext *context,
    struct gl_renderbuffer *rb;
    struct intel_renderbuffer *irb;
 
-   rb = intel->ctx.CurrentRenderbuffer;
+   rb = _mesa_lookup_renderbuffer(&intel->ctx, renderbuffer);
    if (!rb) {
       _mesa_error(&intel->ctx,
                  GL_INVALID_OPERATION, "glRenderbufferExternalMESA");