Files
UnrealEngineUWP/Engine/Source/Runtime/Windows
Guillaume Abadie e9c634d630 Fix view dimensions on D3D11 and D3D12
FRDGTextureSRVDesc::CreateFromSlice() wanting to bind a slice of Texture2DArray as a Texture2D shader resource, is setting FRDGTextureSRVDesc::DimensionOverride to ETextureDimension::Texture2D.
While D3D11 and D3D12 allows binding a Texture2DArray as a Texture2D in shader, the only way for new D3D SRV to specify the array range is to still use D3D11/12_SRV/UAV_DIMENSION_TEXTURE2D/3D/CubeARRAY.
However current implementation refactor coming from 24989901 selected the D3D_SRV_DIMENSION based of FRHIViewDesc::FTextureSRV::FViewInfo::Dimensions ending up Texture2D.
This caused the FRHIViewDesc::FTexture::ArrayRange to be completly ignored causing the wrong array slice to be bound to shaders.

#rb Luke.Thatcher
#jira UE-183886
#preflight 6442af5af030f684d5109351
#fyi Luke.Thatcher

[CL 25147071 by Guillaume Abadie in ue5-main branch]
2023-04-21 12:13:20 -04:00
..