diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 7bb8e4d1185..f2ae210c386 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -392,19 +392,17 @@ static void upload_wm_surfaces(struct brw_context *brw ) for (i = 0; i < BRW_MAX_TEX_UNIT; i++) { struct gl_texture_unit *texUnit = &brw->attribs.Texture->Unit[i]; - /* _NEW_TEXTURE, BRW_NEW_TEXDATA - */ - if (texUnit->_ReallyEnabled) { - brw_update_texture_surface(ctx, i); - brw->wm.nr_surfaces = i+2; - } - else if( texUnit->_ReallyEnabled && - texUnit->_Current == intel->frame_buffer_texobj ) + /* _NEW_TEXTURE, BRW_NEW_TEXDATA */ + if(texUnit->_ReallyEnabled && + texUnit->_Current == intel->frame_buffer_texobj) { dri_bo_unreference(brw->wm.surf_bo[i+1]); brw->wm.surf_bo[i+1] = brw->wm.surf_bo[0]; dri_bo_reference(brw->wm.surf_bo[i+1]); brw->wm.nr_surfaces = i+2; + } else if (texUnit->_ReallyEnabled) { + brw_update_texture_surface(ctx, i); + brw->wm.nr_surfaces = i+2; } else { dri_bo_unreference(brw->wm.surf_bo[i+1]); brw->wm.surf_bo[i+1] = NULL; |