summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_tex.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2008-02-26 17:57:41 -0500
committerKristian Høgsberg <krh@redhat.com>2008-02-26 18:01:13 -0500
commit20b8bff49cba3e8246e29004c5ff38f231d589ff (patch)
tree5a09f5f8d4e4fbae726eabd97b03ea4ebd695451 /src/mesa/drivers/dri/i965/brw_tex.c
parent451bd1941e9791882f7931c8613643f152871e79 (diff)
i965: Setup framebuffer texture in meta_draw_region.
With DRI2 we there is no screen region until a drawable is bound to the context. Set up the framebuffer texture in meta_draw_region instead which should also handle the case where the draw region changes as a result of resizing a redirected window or resizing the screen.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_tex.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tex.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_tex.c b/src/mesa/drivers/dri/i965/brw_tex.c
index 05f724cc23..ef14b8e89f 100644
--- a/src/mesa/drivers/dri/i965/brw_tex.c
+++ b/src/mesa/drivers/dri/i965/brw_tex.c
@@ -49,11 +49,11 @@
#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;
@@ -74,8 +74,9 @@ void brw_FrameBufferTexInit( struct brw_context *brw )
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 );
}
/**