aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915tex/intel_fbo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915tex/intel_fbo.c')
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_fbo.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_fbo.c b/src/mesa/drivers/dri/i915tex/intel_fbo.c
index a09db46163d..5a93eb7ad19 100644
--- a/src/mesa/drivers/dri/i915tex/intel_fbo.c
+++ b/src/mesa/drivers/dri/i915tex/intel_fbo.c
@@ -289,6 +289,12 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
rb->Width = width;
rb->Height = height;
+#if 1
+ /* update the surface's size too */
+ rb->surface->width = width;
+ rb->surface->height = height;
+#endif
+
/* This sets the Get/PutRow/Value functions */
intel_set_span_functions(&irb->Base);
@@ -451,6 +457,12 @@ intel_create_renderbuffer(GLenum intFormat, GLsizei width, GLsizei height,
return irb;
}
+
+/**
+ * Create a new renderbuffer which corresponds to an X window buffer
+ * (color, depth, stencil, etc) - not a user-created GL renderbuffer.
+ * The internal format is set at creation time and does not change.
+ */
struct gl_renderbuffer *
intel_new_renderbuffer_fb(GLcontext * ctx, GLuint intFormat)
{
@@ -472,6 +484,9 @@ intel_new_renderbuffer_fb(GLcontext * ctx, GLuint intFormat)
irb->Base.GetPointer = intel_get_pointer;
/* span routines set in alloc_storage function */
+ irb->Base.surface = intel_new_surface(intFormat);
+ irb->Base.surface->rb = irb;
+
return &irb->Base;
}
@@ -500,6 +515,9 @@ intel_new_renderbuffer(GLcontext * ctx, GLuint name)
irb->Base.GetPointer = intel_get_pointer;
/* span routines set in alloc_storage function */
+ irb->Base.surface = intel_new_surface(0 /*unknown format*/);
+ irb->Base.surface->rb = irb;
+
return &irb->Base;
}