Mesa (master): swr/rast: enforce use of tile offsets

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 26 18:43:22 UTC 2019


Module: Mesa
Branch: master
Commit: 8bfb34fd0adf23fdb73cf5e4253b42cb2da58188
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8bfb34fd0adf23fdb73cf5e4253b42cb2da58188

Author: Alok Hota <alok.hota at intel.com>
Date:   Mon Oct 22 11:53:38 2018 -0500

swr/rast: enforce use of tile offsets

Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>

---

 src/gallium/drivers/swr/rasterizer/core/backend_impl.h           | 1 +
 src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp       | 1 +
 src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp | 1 +
 src/gallium/drivers/swr/rasterizer/core/state.h                  | 2 ++
 4 files changed, 5 insertions(+)

diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_impl.h b/src/gallium/drivers/swr/rasterizer/core/backend_impl.h
index 83d662bd9a7..b3de4e3e4e9 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend_impl.h
+++ b/src/gallium/drivers/swr/rasterizer/core/backend_impl.h
@@ -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))
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp b/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp
index 9b0b80f766f..03152bb0cf7 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/backend_sample.cpp
@@ -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)
             {
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp b/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp
index 46aabcdf34b..fe76d50fbfa 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/backend_singlesample.cpp
@@ -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;
 
diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h
index 3f8123250c6..a4d5e873d51 100644
--- a/src/gallium/drivers/swr/rasterizer/core/state.h
+++ b/src/gallium/drivers/swr/rasterizer/core/state.h
@@ -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.
 };
 




More information about the mesa-commit mailing list