mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 00:28:56 +00:00
D3D: Moved setting texture by slot mask into StateManager
This commit is contained in:
parent
764aee6995
commit
5688c27610
3 changed files with 14 additions and 8 deletions
|
@ -215,6 +215,17 @@ u32 StateManager::UnsetTexture(ID3D11ShaderResourceView* srv)
|
|||
return mask;
|
||||
}
|
||||
|
||||
void StateManager::SetTextureByMask(u32 textureSlotMask, ID3D11ShaderResourceView* srv)
|
||||
{
|
||||
while (textureSlotMask)
|
||||
{
|
||||
unsigned long index;
|
||||
_BitScanForward(&index, textureSlotMask);
|
||||
SetTexture(index, srv);
|
||||
textureSlotMask &= ~(1 << index);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace D3D
|
||||
|
||||
ID3D11SamplerState* StateCache::Get(SamplerState state)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue