From db0f9e701d59dcfcd3b50f4d245897692f27fec9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 5 Apr 2011 07:51:01 -0600 Subject: mesa: added _mesa_get_attachment_teximage() helpers --- src/mesa/main/fbobject.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/fbobject.c') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 4eab3e11911..f0065ad06a9 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -335,7 +335,7 @@ _mesa_set_texture_attachment(struct gl_context *ctx, att->Zoffset = zoffset; att->Complete = GL_FALSE; - if (att->Texture->Image[att->CubeMapFace][att->TextureLevel]) { + if (_mesa_get_attachment_teximage(att)) { ctx->Driver.RenderTexture(ctx, fb, att); } @@ -716,8 +716,8 @@ _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 - = att->Texture->Image[att->CubeMapFace][att->TextureLevel]; + const struct gl_texture_image *texImg = + _mesa_get_attachment_teximage(att); minWidth = MIN2(minWidth, texImg->Width); maxWidth = MAX2(maxWidth, texImg->Width); minHeight = MIN2(minHeight, texImg->Height); @@ -1496,9 +1496,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; - struct gl_texture_object *texObj = att->Texture; - if (texObj - && texObj->Image[att->CubeMapFace][att->TextureLevel]) { + if (att->Texture && _mesa_get_attachment_teximage(att)) { ctx->Driver.RenderTexture(ctx, fb, att); } } -- cgit v1.2.3