VideoCommon/FramebufferManager: Rename m_efb_cache_tiles_wide to m_efb_cache_tile_row_stride
This also initializes it in the non-tiled case just for consistency, although it's not actually read in that case.
This commit is contained in:
parent
55e1c3b51d
commit
1fdf15a1be
|
@ -386,8 +386,9 @@ bool FramebufferManager::IsEFBCacheTilePresent(bool depth, u32 x, u32 y, u32* ti
|
|||
}
|
||||
else
|
||||
{
|
||||
*tile_index =
|
||||
((y / m_efb_cache_tile_size) * m_efb_cache_tiles_wide) + (x / m_efb_cache_tile_size);
|
||||
const u32 tile_x = x / m_efb_cache_tile_size;
|
||||
const u32 tile_y = y / m_efb_cache_tile_size;
|
||||
*tile_index = (tile_y * m_efb_cache_tile_row_stride) + tile_x;
|
||||
}
|
||||
return data.tiles[*tile_index].present;
|
||||
}
|
||||
|
@ -397,8 +398,8 @@ MathUtil::Rectangle<int> FramebufferManager::GetEFBCacheTileRect(u32 tile_index)
|
|||
if (!IsUsingTiledEFBCache())
|
||||
return MathUtil::Rectangle<int>(0, 0, EFB_WIDTH, EFB_HEIGHT);
|
||||
|
||||
const u32 tile_y = tile_index / m_efb_cache_tiles_wide;
|
||||
const u32 tile_x = tile_index % m_efb_cache_tiles_wide;
|
||||
const u32 tile_y = tile_index / m_efb_cache_tile_row_stride;
|
||||
const u32 tile_x = tile_index % m_efb_cache_tile_row_stride;
|
||||
const u32 start_y = tile_y * m_efb_cache_tile_size;
|
||||
const u32 start_x = tile_x * m_efb_cache_tile_size;
|
||||
return MathUtil::Rectangle<int>(
|
||||
|
@ -682,7 +683,11 @@ bool FramebufferManager::CreateReadbackFramebuffer()
|
|||
const u32 tiles_wide = ((EFB_WIDTH + (m_efb_cache_tile_size - 1)) / m_efb_cache_tile_size);
|
||||
const u32 tiles_high = ((EFB_HEIGHT + (m_efb_cache_tile_size - 1)) / m_efb_cache_tile_size);
|
||||
total_tiles = tiles_wide * tiles_high;
|
||||
m_efb_cache_tiles_wide = tiles_wide;
|
||||
m_efb_cache_tile_row_stride = tiles_wide;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_efb_cache_tile_row_stride = 1;
|
||||
}
|
||||
|
||||
m_efb_color_cache.tiles.resize(total_tiles);
|
||||
|
|
|
@ -191,9 +191,14 @@ protected:
|
|||
// Format conversion shaders
|
||||
std::array<std::unique_ptr<AbstractPipeline>, 6> m_format_conversion_pipelines;
|
||||
|
||||
// EFB cache - for CPU EFB access
|
||||
// EFB cache - for CPU EFB access (EFB peeks/pokes), not for EFB copies
|
||||
|
||||
// Width and height of a tile in pixels at 1x IR. 0 indicates non-tiled, in which case a single
|
||||
// tile is used for the entire EFB.
|
||||
// Note that as EFB peeks and pokes are a CPU feature, they always operate at 1x IR.
|
||||
u32 m_efb_cache_tile_size = 0;
|
||||
u32 m_efb_cache_tiles_wide = 0;
|
||||
// Number of tiles that make up a row in m_efb_color_cache.tiles / m_efb_depth_cache.tiles.
|
||||
u32 m_efb_cache_tile_row_stride = 1;
|
||||
EFBCacheData m_efb_color_cache = {};
|
||||
EFBCacheData m_efb_depth_cache = {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue