diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-03-06 04:40:36 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-03-06 05:38:56 +0300 |
commit | af72fc75559e059a7d8e91f2b203efbb3b01f8c6 (patch) | |
tree | 28b00a8e99f29ab91e78675f544133e4a4cb11c7 /source/blender/draw | |
parent | 18e5540a48b614a51a911cb06b9be0247b2c1366 (diff) |
DRW: Fix State tracking being off when calling GPU_framebuffer_clear
State tracking works in pretty much all cases but calling the clear command
does change the write mask outside the draw manager. For now we just reset
the write mask before each pass.
Fix T62203 The selected bone is not highlighted inside the other bone.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index e6248b70df5..2e8ba259a31 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -1315,6 +1315,10 @@ static void drw_draw_pass_ex(DRWPass *pass, DRWShadingGroup *start_group, DRWSha drw_update_view(); + /* GPU_framebuffer_clear calls can change the state outside the DRW module. + * Force reset the affected states to avoid problems later. */ + drw_state_set(DST.state | DRW_STATE_WRITE_DEPTH | DRW_STATE_WRITE_COLOR); + drw_state_set(pass->state); DRW_stats_query_start(pass->name); |