VideoCommon: Expose SamplerState to shaders

The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
This commit is contained in:
Pokechu22
2021-08-08 21:11:50 -07:00
parent 9ef228503a
commit 4a9b26de86
14 changed files with 188 additions and 139 deletions

View File

@ -282,6 +282,15 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height)
constants.texdims[texmapid][1] = height;
}
void PixelShaderManager::SetSamplerState(int texmapid, u32 tm0, u32 tm1)
{
if (constants.pack2[texmapid][2] != tm0 || constants.pack2[texmapid][3] != tm1)
dirty = true;
constants.pack2[texmapid][2] = tm0;
constants.pack2[texmapid][3] = tm1;
}
void PixelShaderManager::SetZTextureBias()
{
constants.zbias[1][3] = bpmem.ztex1.bias;