From 0e3c0b17826b7b5a21ee2c1d789b084fc167f1ed Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 25 Jun 2007 23:05:50 -0700 Subject: Use local structure for dest_surf_state --- src/i965_render.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/i965_render.c b/src/i965_render.c index 71953e78..09a43627 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -261,7 +261,7 @@ static int urb_clip_start, urb_clip_size; static int urb_sf_start, urb_sf_size; static int urb_cs_start, urb_cs_size; -static struct brw_surface_state *dest_surf_state; +static struct brw_surface_state *dest_surf_state, dest_surf_state_local; static struct brw_surface_state *src_surf_state; static struct brw_surface_state *mask_surf_state; static struct brw_sampler_state *src_sampler_state; @@ -539,7 +539,6 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, cc_viewport = (void *)(state_base + cc_viewport_offset); - dest_surf_state = (void *)(state_base + dest_surf_offset); src_surf_state = (void *)(state_base + src_surf_offset); if (pMask) mask_surf_state = (void *)(state_base + mask_surf_offset); @@ -628,6 +627,7 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, memcpy (sip_kernel, sip_kernel_static, sizeof (sip_kernel_static)); /* Set up the state buffer for the destination surface */ + dest_surf_state = &dest_surf_state_local; memset(dest_surf_state, 0, sizeof(*dest_surf_state)); dest_surf_state->ss0.surface_type = BRW_SURFACE_2D; dest_surf_state->ss0.data_return_format = BRW_SURFACERETURNFORMAT_FLOAT32; @@ -651,6 +651,9 @@ i965_prepare_composite(int op, PicturePtr pSrcPicture, dest_surf_state->ss2.render_target_rotation = 0; dest_surf_state->ss3.pitch = dst_pitch - 1; + dest_surf_state = (void *)(state_base + dest_surf_offset); + memcpy (dest_surf_state, &dest_surf_state_local, sizeof (dest_surf_state_local)); + /* Set up the source surface state buffer */ memset(src_surf_state, 0, sizeof(*src_surf_state)); src_surf_state->ss0.surface_type = BRW_SURFACE_2D; -- cgit v1.2.3