Mesa (gallium-0.2): mesa: small cleanup
Alan Hourihane
alanh at kemper.freedesktop.org
Thu Jan 15 11:55:12 UTC 2009
Module: Mesa
Branch: gallium-0.2
Commit: bfbb57790a06bb03e9bf3237b7f8756a67702192
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfbb57790a06bb03e9bf3237b7f8756a67702192
Author: Alan Hourihane <alanh at vmware.com>
Date: Thu Jan 15 11:54:41 2009 +0000
mesa: small cleanup
---
src/mesa/state_tracker/st_cb_fbo.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 45a0542..7fdc5d9 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -354,12 +354,14 @@ st_render_texture(GLcontext *ctx,
{
struct st_renderbuffer *strb;
struct gl_renderbuffer *rb;
- struct pipe_texture *pt;
+ struct pipe_texture *pt = st_get_texobj_texture(att->Texture);
struct st_texture_object *stObj;
const struct gl_texture_image *texImage =
att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ if (!pt) return;
+
assert(!att->Renderbuffer);
/* create new renderbuffer which wraps the texture image */
@@ -387,7 +389,7 @@ st_render_texture(GLcontext *ctx,
rb->Height = texImage->Height2;
/*printf("***** render to texture level %d: %d x %d\n", att->TextureLevel, rb->Width, rb->Height);*/
- pt = st_get_texobj_texture(att->Texture);
+ /*printf("***** pipe texture %d x %d\n", pt->width[0], pt->height[0]);*/
pipe_texture_reference( &strb->texture, pt );
@@ -395,10 +397,7 @@ st_render_texture(GLcontext *ctx,
/* the new surface will be created during framebuffer validation */
- if (pt) {
- /*printf("***** pipe texture %d x %d\n", pt->width[0], pt->height[0]);*/
- init_renderbuffer_bits(strb, pt->format);
- }
+ init_renderbuffer_bits(strb, pt->format);
/*
printf("RENDER TO TEXTURE obj=%p pt=%p surf=%p %d x %d\n",
More information about the mesa-commit
mailing list