summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-18 16:54:12 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-18 16:54:12 +0000
commit85c141483471794d43680c4e1af36f7b13aeeb35 (patch)
treed14c08d9941ecfabab0c0971c48045a7caa031d9 /Graphics/GraphicsEngine
parentD3D12 backend: fixed issue with the format of the swap chain's back buffer te... (diff)
downloadDiligentCore-85c141483471794d43680c4e1af36f7b13aeeb35.tar.gz
DiligentCore-85c141483471794d43680c4e1af36f7b13aeeb35.zip
Improved parameter validation of ResolveTextureSubresource()
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h
index 3cf70d30..09eed747 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h
@@ -914,6 +914,11 @@ void DeviceContextBase<BaseInterface,ImplementationTraits> ::
DEV_CHECK_ERR(!SrcFmtAttribs.IsTypeless && !DstFmtAttribs.IsTypeless,
"Format of a resolve operations must not be unknown when one of the texture formats is typeless");
}
+ if (!SrcFmtAttribs.IsTypeless && !DstFmtAttribs.IsTypeless)
+ {
+ DEV_CHECK_ERR(SrcTexDesc.Format == DstTexDesc.Format, "Source (", SrcFmtAttribs.Name, ") and destination (", DstFmtAttribs.Name, ") texture formats "
+ "of a resolve operation must match exaclty or be compatible typeless formats");
+ }
if (SrcFmtAttribs.IsTypeless || DstFmtAttribs.IsTypeless)
{
DEV_CHECK_ERR(!ResolveFmtAttribs.IsTypeless, "Format of a resolve operations must not be typeless when one of the texture formats is typeless");