From: Axel Davy Date: Tue, 9 Feb 2016 07:20:34 +0000 (+0100) Subject: st/nine: Use bufs instead of Flags for Clear X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c77673de75049a3f1d707efce8ee30df03634c8;p=mesa.git st/nine: Use bufs instead of Flags for Clear bufs doesn't contain depthstencil if there is z buffer mismatch. This is the behaviour we want. Signed-off-by: Axel Davy --- diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 1a345b93d3c..61a4a0c2b9f 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -1994,7 +1994,7 @@ NineDevice9_Clear( struct NineDevice9 *This, for (i = 0; i < This->caps.NumSimultaneousRTs; ++i) { rt = This->state.rt[i]; if (!rt || rt->desc.Format == D3DFMT_NULL || - !(Flags & D3DCLEAR_TARGET)) + !(bufs & PIPE_CLEAR_COLOR)) continue; /* save space, compiler should hoist this */ cbuf = NineSurface9_GetSurface(rt, sRGB); for (r = 0; r < Count; ++r) { @@ -2019,7 +2019,7 @@ NineDevice9_Clear( struct NineDevice9 *This, x1, y1, x2 - x1, y2 - y1); } } - if (!(Flags & NINED3DCLEAR_DEPTHSTENCIL)) + if (!(bufs & PIPE_CLEAR_DEPTHSTENCIL)) return D3D_OK; bufs &= PIPE_CLEAR_DEPTHSTENCIL;