diff options
author | Axel Davy <[email protected]> | 2015-01-23 23:20:17 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-02-06 00:07:19 +0100 |
commit | 9ac74e604bbce3b24565a9c277dc8f8fe9826e97 (patch) | |
tree | 67282c85dcde9e0dbc20294a4124916268bdc059 /src/gallium/state_trackers/nine/device9.c | |
parent | ee606b47800021d74732bf5155a1d7d68822fa02 (diff) |
st/nine: Fix update_framebuffer binding cbufs the pixel shader wouldn't render to
Reviewed-by: Tiziano Bacocco <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/device9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 5eb9d54f457..25e1444f6b4 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -3297,6 +3297,8 @@ NineDevice9_SetPixelShader( struct NineDevice9 *This, IDirect3DPixelShader9 *pShader ) { struct nine_state *state = This->update; + unsigned old_mask = state->ps ? state->ps->rt_mask : 1; + unsigned mask; DBG("This=%p pShader=%p\n", This, pShader); @@ -3304,6 +3306,12 @@ NineDevice9_SetPixelShader( struct NineDevice9 *This, state->changed.group |= NINE_STATE_PS; + mask = state->ps ? state->ps->rt_mask : 1; + /* We need to update cbufs if the pixel shader would + * write to different render targets */ + if (mask != old_mask) + state->changed.group |= NINE_STATE_FB; + return D3D_OK; } |