diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2007-12-19 12:23:27 +0000 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2007-12-19 12:23:30 +0000 |
commit | f367c57802f3800f695acae975fdc30ece6a63b3 (patch) | |
tree | 9cf026b25009b2046f872e772ca6f714dc701adb /src/mesa/pipe | |
parent | bc1fc7d6739476748c902a79dcf1676b0ddc17fd (diff) |
965: fill unused surface pointers with zero
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r-- | src/mesa/pipe/i965simple/brw_wm_surface_state.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/mesa/pipe/i965simple/brw_wm_surface_state.c b/src/mesa/pipe/i965simple/brw_wm_surface_state.c index 69b6202fc8..5c7dee5790 100644 --- a/src/mesa/pipe/i965simple/brw_wm_surface_state.c +++ b/src/mesa/pipe/i965simple/brw_wm_surface_state.c @@ -235,28 +235,18 @@ static void upload_wm_surfaces(struct brw_context *brw ) } + /* BRW_NEW_TEXTURE + */ for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { const struct brw_texture *texUnit = brw->attribs.Texture[i]; - if (texUnit == NULL) - continue; - - /* BRW_NEW_TEXTURE - */ - if (texUnit->base.refcount/*(texUnit->refcount > 0) == really used */) { + if (texUnit && + texUnit->base.refcount/*(texUnit->refcount > 0) == really used */) { brw_update_texture_surface(brw, i); brw->wm.nr_surfaces = i+2; } -#if 0 - else if( texUnit->refcount && - texUnit->_Current == intel->frame_buffer_texobj ) - { - brw->wm.bind.surf_ss_offset[i+1] = brw->wm.bind.surf_ss_offset[0]; - brw->wm.nr_surfaces = i+2; - } -#endif else { brw->wm.bind.surf_ss_offset[i+1] = 0; } |