From c75314ec67f011599d8e84e6eaef897911d9e892 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Thu, 10 Mar 2016 19:20:07 -0600 Subject: [PATCH] swr: [rasterizer core] Guard against enquing work to invalid hot tiles --- src/gallium/drivers/swr/rasterizer/core/tilemgr.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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]; -- 2.30.2