diff options
author | Keith Whitwell <[email protected]> | 2010-03-16 09:02:38 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-03-16 09:02:38 +0000 |
commit | 8cdfd1219a2d13d252a8691ee6dddb0d773bdc77 (patch) | |
tree | 087318efba7eb0fb5e1c1d8422eca611abdee3e7 /src/mesa/state_tracker/st_cb_fbo.c | |
parent | 6420aca08ba6910dce22ab9f813cc57d611b0aa8 (diff) | |
parent | e0ce4a4a0994211ead8e5a77cccdd2a084e8a288 (diff) |
Merge commit 'origin/master' into gallium-sampler-view
This branch already seems to have the nv50_tex.c fix.
Conflicts:
src/gallium/drivers/nv50/nv50_tex.c
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index b219763beab..4ccba1db85d 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -48,6 +48,7 @@ #include "st_format.h" #include "st_public.h" #include "st_texture.h" +#include "st_manager.h" #include "util/u_format.h" #include "util/u_rect.h" @@ -618,8 +619,18 @@ check_create_front_buffers(GLcontext *ctx, struct gl_framebuffer *fb) static void st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers) { + GLframebuffer *fb = ctx->DrawBuffer; + GLuint i; + (void) count; (void) buffers; + + /* add the renderbuffers on demand */ + for (i = 0; i < fb->_NumColorDrawBuffers; i++) { + gl_buffer_index idx = fb->_ColorDrawBufferIndexes[i]; + st_manager_add_color_renderbuffer(ctx->st, fb, idx); + } + check_create_front_buffers(ctx, ctx->DrawBuffer); } @@ -630,8 +641,13 @@ st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers) static void st_ReadBuffer(GLcontext *ctx, GLenum buffer) { + GLframebuffer *fb = ctx->ReadBuffer; + (void) buffer; - check_create_front_buffers(ctx, ctx->ReadBuffer); + + /* add the renderbuffer on demand */ + st_manager_add_color_renderbuffer(ctx->st, fb, fb->_ColorReadBufferIndex); + check_create_front_buffers(ctx, fb); } |