mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d9] Clamp LOD in calls to SetLOD
MSDN says this is clamped and returns the clamped value. Closes: #1869
This commit is contained in:
parent
5d4b7db9e6
commit
c22dcdbaa3
@ -56,11 +56,13 @@ namespace dxvk {
|
||||
|
||||
DWORD STDMETHODCALLTYPE SetLOD(DWORD LODNew) final {
|
||||
DWORD oldLod = m_lod;
|
||||
m_lod = LODNew;
|
||||
m_lod = std::min<DWORD>(LODNew, m_texture.Desc()->MipLevels - 1);
|
||||
|
||||
m_texture.CreateSampleView(LODNew);
|
||||
if (this->GetPrivateRefCount() > 0)
|
||||
this->m_parent->MarkTextureBindingDirty(this);
|
||||
if (m_lod != oldLod) {
|
||||
m_texture.CreateSampleView(LODNew);
|
||||
if (this->GetPrivateRefCount() > 0)
|
||||
this->m_parent->MarkTextureBindingDirty(this);
|
||||
}
|
||||
|
||||
return oldLod;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user