allow "null surfaces" to register mResolveTargets to at least attempt to gen mips

This commit is contained in:
AzaezelX 2025-08-04 17:55:18 -05:00
parent 022f8d1732
commit 36c906a72d

View file

@ -134,16 +134,13 @@ void GFXD3D11TextureTarget::attachTexture( RenderSlot slot, GFXTextureObject *te
mTargets[slot]->AddRef(); mTargets[slot]->AddRef();
mTargetViews[slot] = d3dto->getRTView(); mTargetViews[slot] = d3dto->getRTView();
mTargetViews[slot]->AddRef(); mTargetViews[slot]->AddRef();
mResolveTargets[slot] = d3dto;
} }
else else
{ {
mTargets[slot] = d3dto->getSurface(); mTargets[slot] = d3dto->getSurface();
mTargets[slot]->AddRef(); mTargets[slot]->AddRef();
mTargetViews[slot]->AddRef(); mTargetViews[slot]->AddRef();
// Only assign resolve target if d3dto has a surface to give us.
//
// That usually means there is an MSAA target involved, which is why
// the resolve is needed to get the data out of the target.
mResolveTargets[slot] = d3dto; mResolveTargets[slot] = d3dto;
if ( tex && slot == Color0 ) if ( tex && slot == Color0 )