Commit e5cdca7e by Shahmeer Esmail Committed by Commit Bot

RenderStateCache memory usage

Reduce RenderStateCache cache sizes from 4k to 2k. Saves 64kb of memory. Change-Id: I9e92bbdf095f1e66cf9b84ba81899a8af59d6d86 Reviewed-on: https://chromium-review.googlesource.com/453886Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c1f8d61a
...@@ -36,10 +36,12 @@ static void ClearStateMap(mapType &map) ...@@ -36,10 +36,12 @@ static void ClearStateMap(mapType &map)
// MSDN's documentation of ID3D11Device::CreateBlendState, ID3D11Device::CreateRasterizerState, // MSDN's documentation of ID3D11Device::CreateBlendState, ID3D11Device::CreateRasterizerState,
// ID3D11Device::CreateDepthStencilState and ID3D11Device::CreateSamplerState claims the maximum // ID3D11Device::CreateDepthStencilState and ID3D11Device::CreateSamplerState claims the maximum
// number of unique states of each type an application can create is 4096 // number of unique states of each type an application can create is 4096
const unsigned int RenderStateCache::kMaxBlendStates = 4096; // TODO(ShahmeerEsmail): Revisit the cache sizes to make sure they are appropriate for most
const unsigned int RenderStateCache::kMaxRasterizerStates = 4096; // scenarios.
const unsigned int RenderStateCache::kMaxDepthStencilStates = 4096; const unsigned int RenderStateCache::kMaxBlendStates = 2048;
const unsigned int RenderStateCache::kMaxSamplerStates = 4096; const unsigned int RenderStateCache::kMaxRasterizerStates = 2048;
const unsigned int RenderStateCache::kMaxDepthStencilStates = 2048;
const unsigned int RenderStateCache::kMaxSamplerStates = 2048;
RenderStateCache::RenderStateCache(Renderer11 *renderer) RenderStateCache::RenderStateCache(Renderer11 *renderer)
: mRenderer(renderer), : mRenderer(renderer),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment