summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_buffer.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-07-30 17:17:44 -0600
committerBrian <[email protected]>2007-07-30 17:17:44 -0600
commit4576d754c98e3fb5d413e294d48fb70a893defcf (patch)
tree96dd5125f77209567e7ce916e5a7be07e4eced7d /src/mesa/drivers/x11/xm_buffer.c
parent6558af67d380f2855b112ea3ce4dded9215c7cf7 (diff)
Lots of improvements to the surface-related code.
Z testing now works with i915 driver. Add gl_renderbuffer::surface pointer (and reverse pointer). Remove intel_surface and xmesa_surface types - no longer used.
Diffstat (limited to 'src/mesa/drivers/x11/xm_buffer.c')
-rw-r--r--src/mesa/drivers/x11/xm_buffer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
index 51d183bb435..8fbd9a783b0 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -35,6 +35,7 @@
#include "imports.h"
#include "framebuffer.h"
#include "renderbuffer.h"
+#include "pipe/p_state.h"
#if defined(USE_XSHM) && !defined(XFree86Server)
@@ -268,6 +269,8 @@ xmesa_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->Height = height;
rb->InternalFormat = internalFormat;
+ rb->surface->resize(rb->surface, width, height);
+
return GL_TRUE;
}
@@ -317,6 +320,8 @@ xmesa_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
xrb->origin4 = NULL;
}
+ rb->surface->resize(rb->surface, width, height);
+
return GL_TRUE;
}
@@ -352,6 +357,9 @@ xmesa_new_renderbuffer(GLcontext *ctx, GLuint name, const GLvisual *visual,
xrb->Base.IndexBits = visual->indexBits;
}
/* only need to set Red/Green/EtcBits fields for user-created RBs */
+
+ xrb->Base.surface = xmesa_new_surface(xrb);
+
}
return xrb;
}