summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-11-23 08:20:14 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-11-23 08:20:14 +0000
commitb446208dea918d3a1b53cf38f8c3fb7b7bec5358 (patch)
tree7807f12cdff38d163a46590682956ee413291695 /Graphics/GraphicsEngine
parentUpdated .clang-format (diff)
parentFixed bug in ResolveTextureSubresource parameter validation (diff)
downloadDiligentCore-b446208dea918d3a1b53cf38f8c3fb7b7bec5358.tar.gz
DiligentCore-b446208dea918d3a1b53cf38f8c3fb7b7bec5358.zip
Merge branch 'master'
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.h b/Graphics/GraphicsEngine/include/DeviceContextBase.h
index 09eed747..4ca3e286 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.h
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.h
@@ -909,19 +909,19 @@ void DeviceContextBase<BaseInterface,ImplementationTraits> ::
const auto& SrcFmtAttribs = GetTextureFormatAttribs(SrcTexDesc.Format);
const auto& DstFmtAttribs = GetTextureFormatAttribs(DstTexDesc.Format);
const auto& ResolveFmtAttribs = GetTextureFormatAttribs(ResolveAttribs.Format);
- if (ResolveAttribs.Format != TEX_FORMAT_UNKNOWN)
- {
- 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");
+ DEV_CHECK_ERR(ResolveAttribs.Format == TEX_FORMAT_UNKNOWN || SrcTexDesc.Format == ResolveAttribs.Format, "Invalid format of a resolve operation");
+ }
+ if (SrcFmtAttribs.IsTypeless && DstFmtAttribs.IsTypeless)
+ {
+ DEV_CHECK_ERR(ResolveAttribs.Format != TEX_FORMAT_UNKNOWN, "Format of a resolve operation must not be unknown when both src and dst texture formats are typeless");
}
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");
+ DEV_CHECK_ERR(!ResolveFmtAttribs.IsTypeless, "Format of a resolve operation must not be typeless when one of the texture formats is typeless");
}
#endif
}