Skip to content

Commit 460b061

Browse files
D3D12: added assert that format plane count is greater than 0
1 parent 6f1337d commit 460b061

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1962,7 +1962,8 @@ void DeviceContextD3D12Impl::CopyTexture(const CopyTextureAttribs& CopyAttribs)
19621962
std::array<SubresCopyMapping, MaxFormatPlaneCount> Planes;
19631963

19641964
Uint32 NumPlanes = std::min(pSrcTexD3D12->GetFormatPlaneCount(), pDstTexD3D12->GetFormatPlaneCount());
1965-
VERIFY(NumPlanes <= MaxFormatPlaneCount, "Number of planes (", NumPlanes, ") exceeds maximum supported plane count (", MaxFormatPlaneCount, ")");
1965+
VERIFY(NumPlanes > 0, "Number of planes must be greater than 0");
1966+
VERIFY(NumPlanes <= MaxFormatPlaneCount, "Number of planes (", NumPlanes, ") exceeds maximum expected plane count (", MaxFormatPlaneCount, ")");
19661967
NumPlanes = std::min(NumPlanes, MaxFormatPlaneCount);
19671968
for (Uint32 i = 0; i < NumPlanes; ++i)
19681969
{

0 commit comments

Comments
 (0)