Fix non-MSAA cube RTs

d3d11
Caleb Cornett 2024-02-10 00:19:11 -06:00 committed by cosmonaut
parent 644763f004
commit a5284ba0cd
1 changed files with 8 additions and 1 deletions

View File

@ -2649,7 +2649,14 @@ static ID3D11RenderTargetView* D3D11_INTERNAL_FetchRTV(
/* Let's create a new RTV! */ /* Let's create a new RTV! */
rtvDesc.Format = RefreshToD3D11_TextureFormat[texture->format]; rtvDesc.Format = RefreshToD3D11_TextureFormat[texture->format];
if (texture->depth > 1) if (texture->isCube && !isMultisample)
{
rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
rtvDesc.Texture2DArray.FirstArraySlice = info->layer;
rtvDesc.Texture2DArray.ArraySize = 1;
rtvDesc.Texture2DArray.MipSlice = info->level;
}
else if (texture->depth > 1)
{ {
rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D; rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D;
rtvDesc.Texture3D.MipSlice = info->level; rtvDesc.Texture3D.MipSlice = info->level;