diff options
author | Michel Dänzer <[email protected]> | 2009-08-27 20:27:28 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2009-08-27 20:27:28 +0200 |
commit | bfbfcdd7036add7121eb728daad6131fd77304d0 (patch) | |
tree | 52412e9f2e940b9e62292579c9e712d7c07063a8 /src/gallium/state_trackers/dri/dri_drawable.c | |
parent | d73d4cfcf1ed1fbd6bccfd231953cf4e6b5df3ae (diff) |
st/dri: Make sure the front left renderbuffer is there for texture-from-pixmap.
Diffstat (limited to 'src/gallium/state_trackers/dri/dri_drawable.c')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_drawable.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c index 871ae074ab1..c092afe56af 100644 --- a/src/gallium/state_trackers/dri/dri_drawable.c +++ b/src/gallium/state_trackers/dri/dri_drawable.c @@ -36,6 +36,8 @@ #include "pipe/p_context.h" #include "pipe/p_screen.h" #include "pipe/p_inlines.h" +#include "main/mtypes.h" +#include "main/renderbuffer.h" #include "state_tracker/drm_api.h" #include "state_tracker/dri1_api.h" #include "state_tracker/st_public.h" @@ -236,6 +238,12 @@ void dri2_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target, struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_surface *ps; + if (!drawable->stfb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer) { + struct gl_renderbuffer *rb = + st_new_renderbuffer_fb(drawable->color_format, 0 /*XXX*/, FALSE); + _mesa_add_renderbuffer(&drawable->stfb->Base, BUFFER_FRONT_LEFT, rb); + } + dri_get_buffers(drawable->dPriv); st_get_framebuffer_surface(drawable->stfb, ST_SURFACE_FRONT_LEFT, &ps); |