/*printf("***** render to texture level %d: %d x %d\n", att->TextureLevel, rb->Width, rb->Height);*/
pt = st_get_texobj_texture(att->Texture);
- assert(pt);
- /*printf("***** pipe texture %d x %d\n", pt->width[0], pt->height[0]);*/
pipe_texture_reference( &strb->texture, pt );
/* the new surface will be created during framebuffer validation */
- init_renderbuffer_bits(strb, pt->format);
+ if (pt) {
+ /*printf("***** pipe texture %d x %d\n", pt->width[0], pt->height[0]);*/
+ init_renderbuffer_bits(strb, pt->format);
+ }
/*
printf("RENDER TO TEXTURE obj=%p pt=%p surf=%p %d x %d\n",
if (!strb)
return;
- ctx->st->pipe->flush(ctx->st->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+ st_flush( ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL );
if (strb->surface)
screen->tex_surface_release( screen, &strb->surface );