mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-10 18:18:49 +00:00
D3D: Make state cache part of Renderer and not static
This commit is contained in:
parent
73a67aa413
commit
798ec96e14
4 changed files with 46 additions and 59 deletions
|
@ -23,6 +23,8 @@ namespace DX11
|
|||
class StateCache
|
||||
{
|
||||
public:
|
||||
~StateCache();
|
||||
|
||||
// Get existing or create new render state.
|
||||
// Returned objects is owned by the cache and does not need to be released.
|
||||
ID3D11SamplerState* Get(SamplerState state);
|
||||
|
@ -30,9 +32,6 @@ public:
|
|||
ID3D11RasterizerState* Get(RasterizationState state);
|
||||
ID3D11DepthStencilState* Get(DepthState state);
|
||||
|
||||
// Release all cached states and clear hash tables.
|
||||
void Clear();
|
||||
|
||||
// Convert RasterState primitive type to D3D11 primitive topology.
|
||||
static D3D11_PRIMITIVE_TOPOLOGY GetPrimitiveTopology(PrimitiveType primitive);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue