diff options
author | Eric Anholt <[email protected]> | 2013-05-10 11:51:01 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-17 13:04:05 -0700 |
commit | e98c39c109f9b38d6bb97e3890382fdf66c25176 (patch) | |
tree | 3f51aa191af6052243787b0b10e1a4d581a64583 /src/mesa/main/fbobject.c | |
parent | 7b085d1bfa7630571e04a7d630765d3e5ed63e25 (diff) |
mesa: Track the TexImage being rendered to in the gl_renderbuffer.
We keep having to pass the attachments around with our gl_renderbuffers
because that's the only way to find what the gl_renderbuffer actually
refers to. This is a step toward removing that (though drivers still need
the Zoffset as well).
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index f00d11ab9f1..070fb8c5356 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -363,7 +363,7 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx, struct gl_texture_image *texImage; struct gl_renderbuffer *rb; - texImage = _mesa_get_attachment_teximage(att); + texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel]; if (!texImage) return; @@ -390,6 +390,7 @@ _mesa_update_texture_renderbuffer(struct gl_context *ctx, rb->Width = texImage->Width2; rb->Height = texImage->Height2; rb->NumSamples = texImage->NumSamples; + rb->TexImage = texImage; ctx->Driver.RenderTexture(ctx, fb, att); } @@ -889,8 +890,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, /* get width, height, format of the renderbuffer/texture */ if (att->Type == GL_TEXTURE) { - const struct gl_texture_image *texImg = - _mesa_get_attachment_teximage(att); + const struct gl_texture_image *texImg = att->Renderbuffer->TexImage; minWidth = MIN2(minWidth, texImg->Width); maxWidth = MAX2(maxWidth, texImg->Width); minHeight = MIN2(minHeight, texImg->Height); @@ -1862,7 +1862,7 @@ check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb) for (i = 0; i < BUFFER_COUNT; i++) { struct gl_renderbuffer_attachment *att = fb->Attachment + i; - if (att->Texture && _mesa_get_attachment_teximage(att)) { + if (att->Texture && att->Renderbuffer->TexImage) { ctx->Driver.RenderTexture(ctx, fb, att); } } |