summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-08-28 01:18:53 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-08-28 01:18:53 +0000
commitf920b651a8c4cd4a61155eef0f6a48b45024578a (patch)
tree927095fcd43d3646176cbc8cea8e16e0ce2c1da5 /Graphics/GraphicsEngine
parentFew minor updates (diff)
downloadDiligentCore-f920b651a8c4cd4a61155eef0f6a48b45024578a.tar.gz
DiligentCore-f920b651a8c4cd4a61155eef0f6a48b45024578a.zip
Fixed a problem with accessing variables in inactive shader stages in D3D11 backend; improved error messages
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/src/Texture.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngine/src/Texture.cpp b/Graphics/GraphicsEngine/src/Texture.cpp
index 74c86fd6..5e7dc932 100644
--- a/Graphics/GraphicsEngine/src/Texture.cpp
+++ b/Graphics/GraphicsEngine/src/Texture.cpp
@@ -117,9 +117,9 @@ void ValidateTextureRegion(const TextureDesc &TexDesc, Uint32 MipLevel, Uint32 S
#define VERIFY_TEX_PARAMS(Expr, ...) if(!(Expr))LOG_ERROR("Texture \"", TexDesc.Name ? TexDesc.Name : "", "\": ", ##__VA_ARGS__)
#ifdef DEVELOPMENT
VERIFY_TEX_PARAMS( MipLevel < TexDesc.MipLevels, "Mip level (", MipLevel, ") is out of allowed range [0, ", TexDesc.MipLevels-1, "]" );
- VERIFY_TEX_PARAMS( Box.MinX < Box.MaxX, "Incorrect X range [",Box.MinX, ", ", Box.MaxX, ")" );
- VERIFY_TEX_PARAMS( Box.MinY < Box.MaxY, "Incorrect Y range [",Box.MinY, ", ", Box.MaxY, ")" );
- VERIFY_TEX_PARAMS( Box.MinZ < Box.MaxZ, "Incorrect Z range [",Box.MinZ, ", ", Box.MaxZ, ")" );
+ VERIFY_TEX_PARAMS( Box.MinX < Box.MaxX, "X range of the update region is invalid: ", Box.MinX, "..", Box.MaxX);
+ VERIFY_TEX_PARAMS( Box.MinY < Box.MaxY, "Y range of the update region is invalid: ", Box.MinY, "..", Box.MaxY);
+ VERIFY_TEX_PARAMS( Box.MinZ < Box.MaxZ, "Z range of the update region is invalid: ", Box.MinZ, "..", Box.MaxZ);
if( TexDesc.Type == RESOURCE_DIM_TEX_1D_ARRAY ||
TexDesc.Type == RESOURCE_DIM_TEX_2D_ARRAY ||
@@ -157,6 +157,8 @@ void ValidateUpdateDataParams( const TextureDesc &TexDesc, Uint32 MipLevel, Uint
ValidateTextureRegion(TexDesc, MipLevel, Slice, DstBox);
#ifdef DEVELOPMENT
+ VERIFY_TEX_PARAMS( TexDesc.Usage == USAGE_DEFAULT, "Only textures created with USAGE_DEFAULT can be updated with UpdateData()" );
+ VERIFY_TEX_PARAMS( TexDesc.SampleCount == 1, "Only non-multisampled textures can be updated with UpdateData()" );
VERIFY_TEX_PARAMS( (SubresData.Stride & 0x03) == 0, "Texture data stride (", SubresData.Stride, ") must be at least 32-bit aligned" );
VERIFY_TEX_PARAMS( (SubresData.DepthStride & 0x03) == 0, "Texture data depth stride (", SubresData.DepthStride, ") must be at least 32-bit aligned" );
#endif