summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rowley <timothy.o.rowley@intel.com>2016-03-10 19:20:07 -0600
committerTim Rowley <timothy.o.rowley@intel.com>2016-03-25 14:43:15 -0500
commitc75314ec67f011599d8e84e6eaef897911d9e892 (patch)
treea8a76f73fada5be75137bd96fe97ddfd4dccb71b
parentfee56fda6fd78f7fb10b0e8fced0a604ca43f0c0 (diff)
swr: [rasterizer core] Guard against enquing work to invalid hot tiles
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
index 09cc23e5db7..ac2117bf4a4 100644
--- a/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp
@@ -74,6 +74,11 @@ void MacroTileMgr::enqueue(uint32_t x, uint32_t y, BE_WORK *pWork)
SWR_ASSERT(x < KNOB_NUM_HOT_TILES_X);
SWR_ASSERT(y < KNOB_NUM_HOT_TILES_Y);
+ if ((x & ~(KNOB_NUM_HOT_TILES_X-1)) | (y & ~(KNOB_NUM_HOT_TILES_Y-1)))
+ {
+ return;
+ }
+
uint32_t id = TILE_ID(x, y);
MacroTileQueue &tile = mTiles[id];