Fix non-MSAA cube RTs
continuous-integration/drone/pr Build is failing Details

pull/47/head
Caleb Cornett 2024-02-10 00:19:11 -06:00
parent 81351a1c1b
commit 01a36b940b
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;