swr: [rasterizer core] fix clear with multiple color attachments
[mesa.git] / src / gallium / drivers / swr / rasterizer / core / api.cpp
index 7e305dafe777c341a197a3e60fab9ffbbd4e1bf6..6ade65ac61070a6235880f1dec3e77a51d7c4b74 100644 (file)
@@ -1475,14 +1475,14 @@ void SWR_API SwrStoreTiles(
 //////////////////////////////////////////////////////////////////////////
 /// @brief SwrClearRenderTarget - Clear attached render targets / depth / stencil
 /// @param hContext - Handle passed back from SwrCreateContext
-/// @param clearMask - combination of SWR_CLEAR_COLOR / SWR_CLEAR_DEPTH / SWR_CLEAR_STENCIL flags (or SWR_CLEAR_NONE)
+/// @param attachmentMask - combination of SWR_ATTACHMENT_*_BIT attachments to clear
 /// @param clearColor - color use for clearing render targets
 /// @param z - depth value use for clearing depth buffer
 /// @param stencil - stencil value used for clearing stencil buffer
 /// @param clearRect - The pixel-coordinate rectangle to clear in all cleared buffers
 void SWR_API SwrClearRenderTarget(
     HANDLE hContext,
-    uint32_t clearMask,
+    uint32_t attachmentMask,
     const float clearColor[4],
     float z,
     uint8_t stencil,
@@ -1498,15 +1498,11 @@ void SWR_API SwrClearRenderTarget(
 
     AR_API_BEGIN(APIClearRenderTarget, pDC->drawId);
 
-    CLEAR_FLAGS flags;
-    flags.bits = 0;
-    flags.mask = clearMask;
-
     pDC->FeWork.type = CLEAR;
     pDC->FeWork.pfnWork = ProcessClear;
     pDC->FeWork.desc.clear.rect = clearRect;
     pDC->FeWork.desc.clear.rect &= g_MaxScissorRect;
-    pDC->FeWork.desc.clear.flags = flags;
+    pDC->FeWork.desc.clear.attachmentMask = attachmentMask;
     pDC->FeWork.desc.clear.clearDepth = z;
     pDC->FeWork.desc.clear.clearRTColor[0] = clearColor[0];
     pDC->FeWork.desc.clear.clearRTColor[1] = clearColor[1];