swr/rast: enforce use of tile offsets
authorAlok Hota <alok.hota@intel.com>
Mon, 22 Oct 2018 16:53:38 +0000 (11:53 -0500)
committerAlok Hota <alok.hota@intel.com>
Fri, 26 Apr 2019 18:00:45 +0000 (13:00 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/backend_impl.h
src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp
src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp
src/gallium/drivers/swr/rasterizer/core/state.h

index 83d662bd9a71be024cb1747e2cb5a40c56ca0fe9..b3de4e3e4e94b05ab3b21daa0a63cb26c3754e58 100644 (file)
@@ -1056,6 +1056,7 @@ void BackendPixelRate(DRAW_CONTEXT*        pDC,
         {
             const bool useAlternateOffset = ((xx & SIMD_TILE_X_DIM) != 0);
 
+            psContext.alternateOffset = useAlternateOffset ? 1 : 0;
 
             simdscalar activeLanes;
             if (!(work.anyCoveredSamples & MASK))
index 9b0b80f766fee1bd138d0d061344d196fa66c489..03152bb0cf70950421782bac1c59f7d0234ece5e 100644 (file)
@@ -83,6 +83,7 @@ void BackendSampleRate(DRAW_CONTEXT*        pDC,
         {
             const bool useAlternateOffset = ((xx & SIMD_TILE_X_DIM) != 0);
 
+            psContext.alternateOffset = useAlternateOffset ? 1 : 0;
 
             if (T::InputCoverage != SWR_INPUT_COVERAGE_NONE)
             {
index 46aabcdf34bbfa16c8457b075d4b32454007c121..fe76d50fbfa4d607ed827dd987154c1968049694 100644 (file)
@@ -84,6 +84,7 @@ void BackendSingleSample(DRAW_CONTEXT*        pDC,
         {
             const bool useAlternateOffset = ((xx & SIMD_TILE_X_DIM) != 0);
 
+            psContext.alternateOffset = useAlternateOffset ? 1 : 0;
 
             simdmask coverageMask = work.coverageMask[0] & MASK;
 
index 3f8123250c68915fc5aa6b2994e7db95a24d55ac..a4d5e873d51cc2b1dfa5d6769bf7ecc334c73f89 100644 (file)
@@ -380,6 +380,8 @@ struct SWR_PS_CONTEXT
 
     uint8_t* pColorBuffer[SWR_NUM_RENDERTARGETS]; // IN: Pointers to render target hottiles
 
+    uint32_t alternateOffset; // IN: for 8x2 tile backend, which 4x2 do we need to read from
+
     SWR_SHADER_STATS stats; // OUT: shader statistics used for archrast.
 };