swr: [rasterizer core] fix primID provoking vertex for GS
authorTim Rowley <timothy.o.rowley@intel.com>
Thu, 2 Mar 2017 22:41:22 +0000 (16:41 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Sun, 5 Mar 2017 13:33:49 +0000 (07:33 -0600)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/frontend.cpp

index c150c51199f5b584aef5863dc6218d8a714ea07d..18728e5f55716a67c1729d92603356cf306f6a21 100644 (file)
@@ -815,7 +815,7 @@ static void GeometryShaderStage(
                                 {
                                     simdvector primIdAttrib[3];
                                     gsPa.Assemble(VERTEX_PRIMID_SLOT, primIdAttrib);
-                                    vPrimId = _simd_castps_si(primIdAttrib[0].x);
+                                    vPrimId = _simd_castps_si(primIdAttrib[state.frontendState.topologyProvokingVertex].x);
                                 }
                                 else
                                 {
@@ -1682,4 +1682,4 @@ PFN_FE_WORK_FUNC GetProcessDrawFunc(
     bool HasRasterization)
 {
     return TemplateArgUnroller<FEDrawChooser>::GetFunc(IsIndexed, IsCutIndexEnabled, HasTessellation, HasGeometryShader, HasStreamOut, HasRasterization);
-}
\ No newline at end of file
+}