diff options
author | Eric Anholt <[email protected]> | 2013-04-22 11:04:21 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-06 14:34:14 -0700 |
commit | 77a405dba7f70f8a47655e90774a5ecf5c88a6ed (patch) | |
tree | 0d0144210074d3ccfbe397ee3bb97f8afc77a391 /src/mesa/main/fbobject.c | |
parent | 5b190d19d326369a5c43fbdd1f19d9c8d112da40 (diff) |
mesa: Make Mesa core set up wrapped texture renderbuffer state.
Everyone was doing effectively the same thing, except for some funky code
reuse in Intel, and swrast mistakenly recomputing _BaseFormat instead of
using the texture's _BaseFormat. swrast's sRGB handling is left in place,
though it should be done by using _mesa_get_render_format() at render time
instead (as-is, it will miss updates to GL_FRAMEBUFFER_SRGB).
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 867798cc291..80485f7da98 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -380,6 +380,13 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx, rb->AllocStorage = NULL; } + rb->_BaseFormat = texImage->_BaseFormat; + rb->Format = texImage->TexFormat; + rb->InternalFormat = texImage->InternalFormat; + rb->Width = texImage->Width2; + rb->Height = texImage->Height2; + rb->NumSamples = texImage->NumSamples; + ctx->Driver.RenderTexture(ctx, fb, att); } |