summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/swr/rasterizer
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-03-10 19:19:30 -0600
committerTim Rowley <[email protected]>2016-03-25 14:43:14 -0500
commitfee56fda6fd78f7fb10b0e8fced0a604ca43f0c0 (patch)
tree4522827e810d90a09e55b70601ff1437c0af448f /src/gallium/drivers/swr/rasterizer
parente374d2d24b0d755c9380da0eb33e4151b1ad145f (diff)
swr: [rasterizer] Stop setting viewport size to larger than hottile array
Guard against enquing work to invalid tiles
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/frontend.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
index 6db36395c86..27afc9640c7 100644
--- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp
@@ -243,6 +243,12 @@ void ProcessDiscardInvalidateTiles(
macroTileEndY = (rect.bottom + macroHeight - 1) / macroHeight;
}
+ SWR_ASSERT(macroTileEndX < KNOB_NUM_HOT_TILES_X);
+ SWR_ASSERT(macroTileEndY < KNOB_NUM_HOT_TILES_Y);
+
+ macroTileEndX = std::min<uint32_t>(macroTileEndX, KNOB_NUM_HOT_TILES_X);
+ macroTileEndY = std::min<uint32_t>(macroTileEndY, KNOB_NUM_HOT_TILES_Y);
+
// load tiles
BE_WORK work;
work.type = DISCARDINVALIDATETILES;