diff options
author | Eric Anholt <[email protected]> | 2008-02-28 16:04:54 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-02-28 16:04:54 -0800 |
commit | b39f15b88f4ef585f260db689294c12b1aee41f2 (patch) | |
tree | 6962ffe68e6fb04844be442c7d9a8f2df9328b1b /src | |
parent | ec5ca6844bd52a3a17005314b615f1629f652686 (diff) |
[965] Fix conditional sequencing to allow the frame_buffer_texobj case.
Previously the frame_buffer_texobj case would have been bound as a normal
texture, at best resulting in no surface data being associated with it.
Diffstat (limited to 'src')
-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; |