swr/rast: add renderTargetArrayIndex to SWR_PS_CONTEXT
authorTim Rowley <timothy.o.rowley@intel.com>
Tue, 16 May 2017 21:51:58 +0000 (16:51 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Tue, 30 May 2017 22:21:30 +0000 (17:21 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/backend.h
src/gallium/drivers/swr/rasterizer/core/state.h

index 7bb1f5585fbd62bd79086a8f8efade449c1dfa89..dba5041140f2da0ec2a26a69068249f534b86767 100644 (file)
@@ -499,6 +499,7 @@ void SetupPixelShaderContext(SWR_PS_CONTEXT *psContext, const SWR_MULTISAMPLE_PO
     psContext->pPerspAttribs = work.pPerspAttribs;
     psContext->frontFace = work.triFlags.frontFacing;
     psContext->primID = work.triFlags.primID;
+    psContext->renderTargetArrayIndex = work.triFlags.renderTargetArrayIndex;
 
     // save Ia/Ib/Ic and Ja/Jb/Jc if we need to reevaluate i/j/k in the shader because of pull attribs
     psContext->I = work.I;
index 8812fbaab5f4fc98d7b426adb9d663f47fa0ecc1..75d1210cce32ff8804090b4da9dae67f975bbfe5 100644 (file)
@@ -342,11 +342,11 @@ struct SWR_PS_CONTEXT
     simdvector shaded[SWR_NUM_RENDERTARGETS];
                                 // OUT: result color per rendertarget
 
-    uint32_t frontFace;         // IN: front- 1, back- 0
-    uint32_t primID;            // IN: primitive ID
-    uint32_t sampleIndex;       // IN: sampleIndex
-
-    uint32_t rasterizerSampleCount; // IN: sample count used by the rasterizer
+    uint32_t frontFace;                 // IN: front- 1, back- 0
+    uint32_t primID;                    // IN: primitive ID
+    uint32_t sampleIndex;               // IN: sampleIndex
+    uint32_t renderTargetArrayIndex;    // IN: render target array index from GS
+    uint32_t rasterizerSampleCount;     // IN: sample count used by the rasterizer
 
     uint8_t* pColorBuffer[SWR_NUM_RENDERTARGETS]; // IN: Pointers to render target hottiles
 };