* brw_tex.c
*/
void brwUpdateTextureState( struct intel_context *intel );
-void brw_FrameBufferTexInit( struct brw_context *brw );
+void brw_FrameBufferTexInit( struct brw_context *brw,
+ struct intel_region *region );
void brw_FrameBufferTexDestroy( struct brw_context *brw );
void brw_validate_textures( struct brw_context *brw );
brw->state.draw_region = draw_region;
brw->state.depth_region = depth_region;
+ if (intel->frame_buffer_texobj != NULL)
+ brw_FrameBufferTexDestroy(brw);
+
+ brw_FrameBufferTexInit(brw, draw_region);
+
brw->state.dirty.mesa |= _NEW_BUFFERS;
}
#include "brw_defines.h"
-void brw_FrameBufferTexInit( struct brw_context *brw )
+void brw_FrameBufferTexInit( struct brw_context *brw,
+ struct intel_region *region )
{
struct intel_context *intel = &brw->intel;
GLcontext *ctx = &intel->ctx;
- struct intel_region *region = intel->front_region;
struct gl_texture_object *obj;
struct gl_texture_image *img;
void brw_FrameBufferTexDestroy( struct brw_context *brw )
{
- brw->intel.ctx.Driver.DeleteTexture( &brw->intel.ctx,
- brw->intel.frame_buffer_texobj );
+ if (brw->intel.frame_buffer_texobj != NULL)
+ brw->intel.ctx.Driver.DeleteTexture( &brw->intel.ctx,
+ brw->intel.frame_buffer_texobj );
}
/**