diff options
author | marha <marha@users.sourceforge.net> | 2011-04-06 21:03:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-06 21:03:59 +0000 |
commit | e2b908c356746281aba48128da7dc15a28f5a773 (patch) | |
tree | 5f0a12dfa33c059d8fe09d9a5a792792f44189a6 /mesalib/src/mesa/main/fbobject.c | |
parent | 1fc1b7f67928082b9e922463be25c232d9bcba6a (diff) | |
parent | 704e01fc69ebf6302aa1876906805147248abdaa (diff) | |
download | vcxsrv-e2b908c356746281aba48128da7dc15a28f5a773.tar.gz vcxsrv-e2b908c356746281aba48128da7dc15a28f5a773.tar.bz2 vcxsrv-e2b908c356746281aba48128da7dc15a28f5a773.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/fbobject.c')
-rw-r--r-- | mesalib/src/mesa/main/fbobject.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index ce0b3b531..76493f1a8 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/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);
@@ -746,7 +746,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, continue;
}
- if (numSamples < 0) {
+ if (att->Renderbuffer && numSamples < 0) {
/* first buffer */
numSamples = att->Renderbuffer->NumSamples;
}
@@ -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);
}
}
|