[Mesa-dev] [PATCH 04/39] st/nine: Use bufs instead of Flags for Clear

Axel Davy axel.davy at ens.fr
Sun May 15 10:45:18 UTC 2016


bufs doesn't contain depthstencil if
there is z buffer mismatch. This is the behaviour
we want.

Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/device9.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 74ba304..9ecd1ee 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;
-- 
2.8.2



More information about the mesa-dev mailing list