summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-03-26 18:40:00 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-03-26 18:40:00 +0000
commit09b9f1dc1ec69683c3143f309e6e8a0141361624 (patch)
treeb6f1a63031e72e09d313f681a311eb3043405441 /Graphics/GraphicsEngine
parentFixed latest MSVC (19.25.28610.4) build issue (diff)
downloadDiligentCore-09b9f1dc1ec69683c3143f309e6e8a0141361624.tar.gz
DiligentCore-09b9f1dc1ec69683c3143f309e6e8a0141361624.zip
Renamed _DEBUG and DEVELOPMENT macros to DILGENT_DEBUG and DILIGENT_DEVELOPMENT
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/BufferBase.hpp4
-rw-r--r--Graphics/GraphicsEngine/include/DeviceContextBase.hpp92
-rw-r--r--Graphics/GraphicsEngine/include/PipelineStateBase.hpp18
-rw-r--r--Graphics/GraphicsEngine/include/ShaderBase.hpp2
-rw-r--r--Graphics/GraphicsEngine/include/TextureBase.hpp4
-rw-r--r--Graphics/GraphicsEngine/include/TextureViewBase.hpp2
-rw-r--r--Graphics/GraphicsEngine/src/Texture.cpp4
7 files changed, 69 insertions, 57 deletions
diff --git a/Graphics/GraphicsEngine/include/BufferBase.hpp b/Graphics/GraphicsEngine/include/BufferBase.hpp
index 17d09c91..aeee4114 100644
--- a/Graphics/GraphicsEngine/include/BufferBase.hpp
+++ b/Graphics/GraphicsEngine/include/BufferBase.hpp
@@ -71,7 +71,7 @@ public:
const BufferDesc& BuffDesc,
bool bIsDeviceInternal) :
TDeviceObjectBase{pRefCounters, pDevice, BuffDesc, bIsDeviceInternal},
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
m_dbgBuffViewAllocator{BuffViewObjAllocator},
#endif
m_pDefaultUAV{nullptr, STDDeleter<BufferViewImplType, TBuffViewObjAllocator>(BuffViewObjAllocator)},
@@ -164,7 +164,7 @@ protected:
/// Corrects buffer view description and validates view parameters.
void CorrectBufferViewDesc(struct BufferViewDesc& ViewDesc);
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
TBuffViewObjAllocator& m_dbgBuffViewAllocator;
#endif
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.hpp b/Graphics/GraphicsEngine/include/DeviceContextBase.hpp
index 87b209b8..b4c271fa 100644
--- a/Graphics/GraphicsEngine/include/DeviceContextBase.hpp
+++ b/Graphics/GraphicsEngine/include/DeviceContextBase.hpp
@@ -225,7 +225,7 @@ protected:
bool EndQuery(IQuery* pQuery, int);
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
// clang-format off
bool DvpVerifyDrawArguments (const DrawAttribs& Attribs)const;
bool DvpVerifyDrawIndexedArguments (const DrawIndexedAttribs& Attribs)const;
@@ -311,7 +311,7 @@ protected:
const bool m_bIsDeferred = false;
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
// std::unordered_map is unbelievably slow. Keeping track of mapped buffers
// in release builds is not feasible
struct DbgMappedBufferInfo
@@ -332,7 +332,7 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode,
SET_VERTEX_BUFFERS_FLAGS Flags)
{
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (StartSlot >= MAX_BUFFER_SLOTS)
{
LOG_ERROR_MESSAGE("Start vertex buffer slot ", StartSlot, " is out of allowed range [0, ", MAX_BUFFER_SLOTS - 1, "].");
@@ -364,7 +364,7 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
auto& CurrStream = m_VertexStreams[StartSlot + Buff];
CurrStream.pBuffer = ppBuffers ? ValidatedCast<BufferImplType>(ppBuffers[Buff]) : nullptr;
CurrStream.Offset = pOffsets ? pOffsets[Buff] : 0;
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (CurrStream.pBuffer)
{
const auto& BuffDesc = CurrStream.pBuffer->GetDesc();
@@ -391,7 +391,7 @@ template <typename BaseInterface, typename ImplementationTraits>
inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode, int)
{
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (!m_pPipelineState)
{
LOG_ERROR_MESSAGE("No pipeline state is bound to the pipeline");
@@ -422,7 +422,7 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
{
m_pIndexBuffer = ValidatedCast<BufferImplType>(pIndexBuffer);
m_IndexDataStartOffset = ByteOffset;
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (m_pIndexBuffer)
{
const auto& BuffDesc = m_pIndexBuffer->GetDesc();
@@ -569,7 +569,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
if (pRTView)
{
const auto& RTVDesc = pRTView->GetDesc();
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (RTVDesc.ViewType != TEXTURE_VIEW_RENDER_TARGET)
LOG_ERROR("Texture view object named '", RTVDesc.Name ? RTVDesc.Name : "", "' has incorrect view type (", GetTexViewTypeLiteralName(RTVDesc.ViewType), "). Render target view is expected");
#endif
@@ -584,7 +584,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
}
else
{
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
const auto& TexDesc = pRTView->GetTexture()->GetDesc();
if (m_FramebufferWidth != std::max(TexDesc.Width >> RTVDesc.MostDetailedMip, 1U))
LOG_ERROR("Render target width (", std::max(TexDesc.Width >> RTVDesc.MostDetailedMip, 1U), ") specified by RTV '", RTVDesc.Name, "' is inconsistent with the width of previously bound render targets (", m_FramebufferWidth, ")");
@@ -609,7 +609,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
if (pDepthStencil != nullptr)
{
const auto& DSVDesc = pDepthStencil->GetDesc();
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (DSVDesc.ViewType != TEXTURE_VIEW_DEPTH_STENCIL)
LOG_ERROR("Texture view object named '", DSVDesc.Name ? DSVDesc.Name : "", "' has incorrect view type (", GetTexViewTypeLiteralName(DSVDesc.ViewType), "). Depth stencil view is expected");
#endif
@@ -625,7 +625,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
}
else
{
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
const auto& TexDesc = pDepthStencil->GetTexture()->GetDesc();
if (m_FramebufferWidth != std::max(TexDesc.Width >> DSVDesc.MostDetailedMip, 1U))
LOG_ERROR("Depth-stencil target width (", std::max(TexDesc.Width >> DSVDesc.MostDetailedMip, 1U), ") specified by DSV '", DSVDesc.Name, "' is inconsistent with the width of previously bound render targets (", m_FramebufferWidth, ")");
@@ -688,7 +688,7 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::ClearStateCa
{
for (Uint32 stream = 0; stream < m_NumVertexStreams; ++stream)
m_VertexStreams[stream] = VertexStreamInfo<BufferImplType>{};
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
for (Uint32 stream = m_NumVertexStreams; stream < _countof(m_VertexStreams); ++stream)
{
VERIFY(m_VertexStreams[stream].pBuffer == nullptr, "Unexpected non-null buffer");
@@ -801,7 +801,7 @@ void DeviceContextBase<BaseInterface, ImplementationTraits>::ResetRenderTargets(
{
for (Uint32 rt = 0; rt < m_NumBoundRenderTargets; ++rt)
m_pBoundRenderTargets[rt].Release();
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
for (Uint32 rt = m_NumBoundRenderTargets; rt < _countof(m_pBoundRenderTargets); ++rt)
{
VERIFY(m_pBoundRenderTargets[rt] == nullptr, "Non-null render target found");
@@ -825,7 +825,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::ClearDepthSt
return false;
}
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
{
const auto& ViewDesc = pView->GetDesc();
if (ViewDesc.ViewType != TEXTURE_VIEW_DEPTH_STENCIL)
@@ -867,7 +867,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::ClearRenderT
return false;
}
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
{
const auto& ViewDesc = pView->GetDesc();
if (ViewDesc.ViewType != TEXTURE_VIEW_RENDER_TARGET)
@@ -957,11 +957,13 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
UpdateBuffer(IBuffer* pBuffer, Uint32 Offset, Uint32 Size, const void* pData, RESOURCE_STATE_TRANSITION_MODE StateTransitionMode)
{
VERIFY(pBuffer != nullptr, "Buffer must not be null");
-#ifdef DEVELOPMENT
- const auto& BuffDesc = ValidatedCast<BufferImplType>(pBuffer)->GetDesc();
- DEV_CHECK_ERR(BuffDesc.Usage == USAGE_DEFAULT, "Unable to update buffer '", BuffDesc.Name, "': only USAGE_DEFAULT buffers can be updated with UpdateData()");
- DEV_CHECK_ERR(Offset < BuffDesc.uiSizeInBytes, "Unable to update buffer '", BuffDesc.Name, "': offset (", Offset, ") exceeds the buffer size (", BuffDesc.uiSizeInBytes, ")");
- DEV_CHECK_ERR(Size + Offset <= BuffDesc.uiSizeInBytes, "Unable to update buffer '", BuffDesc.Name, "': Update region [", Offset, ",", Size + Offset, ") is out of buffer bounds [0,", BuffDesc.uiSizeInBytes, ")");
+#ifdef DILIGENT_DEVELOPMENT
+ {
+ const auto& BuffDesc = ValidatedCast<BufferImplType>(pBuffer)->GetDesc();
+ DEV_CHECK_ERR(BuffDesc.Usage == USAGE_DEFAULT, "Unable to update buffer '", BuffDesc.Name, "': only USAGE_DEFAULT buffers can be updated with UpdateData()");
+ DEV_CHECK_ERR(Offset < BuffDesc.uiSizeInBytes, "Unable to update buffer '", BuffDesc.Name, "': offset (", Offset, ") exceeds the buffer size (", BuffDesc.uiSizeInBytes, ")");
+ DEV_CHECK_ERR(Size + Offset <= BuffDesc.uiSizeInBytes, "Unable to update buffer '", BuffDesc.Name, "': Update region [", Offset, ",", Size + Offset, ") is out of buffer bounds [0,", BuffDesc.uiSizeInBytes, ")");
+ }
#endif
}
@@ -977,11 +979,13 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
{
VERIFY(pSrcBuffer != nullptr, "Source buffer must not be null");
VERIFY(pDstBuffer != nullptr, "Destination buffer must not be null");
-#ifdef DEVELOPMENT
- const auto& SrcBufferDesc = ValidatedCast<BufferImplType>(pSrcBuffer)->GetDesc();
- const auto& DstBufferDesc = ValidatedCast<BufferImplType>(pDstBuffer)->GetDesc();
- DEV_CHECK_ERR(DstOffset + Size <= DstBufferDesc.uiSizeInBytes, "Failed to copy buffer '", SrcBufferDesc.Name, "' to '", DstBufferDesc.Name, "': Destination range [", DstOffset, ",", DstOffset + Size, ") is out of buffer bounds [0,", DstBufferDesc.uiSizeInBytes, ")");
- DEV_CHECK_ERR(SrcOffset + Size <= SrcBufferDesc.uiSizeInBytes, "Failed to copy buffer '", SrcBufferDesc.Name, "' to '", DstBufferDesc.Name, "': Source range [", SrcOffset, ",", SrcOffset + Size, ") is out of buffer bounds [0,", SrcBufferDesc.uiSizeInBytes, ")");
+#ifdef DILIGENT_DEVELOPMENT
+ {
+ const auto& SrcBufferDesc = ValidatedCast<BufferImplType>(pSrcBuffer)->GetDesc();
+ const auto& DstBufferDesc = ValidatedCast<BufferImplType>(pDstBuffer)->GetDesc();
+ DEV_CHECK_ERR(DstOffset + Size <= DstBufferDesc.uiSizeInBytes, "Failed to copy buffer '", SrcBufferDesc.Name, "' to '", DstBufferDesc.Name, "': Destination range [", DstOffset, ",", DstOffset + Size, ") is out of buffer bounds [0,", DstBufferDesc.uiSizeInBytes, ")");
+ DEV_CHECK_ERR(SrcOffset + Size <= SrcBufferDesc.uiSizeInBytes, "Failed to copy buffer '", SrcBufferDesc.Name, "' to '", DstBufferDesc.Name, "': Source range [", SrcOffset, ",", SrcOffset + Size, ") is out of buffer bounds [0,", SrcBufferDesc.uiSizeInBytes, ")");
+ }
#endif
}
@@ -993,9 +997,11 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
const auto& BuffDesc = pBuffer->GetDesc();
-#ifdef _DEBUG
- VERIFY(m_DbgMappedBuffers.find(pBuffer) == m_DbgMappedBuffers.end(), "Buffer '", BuffDesc.Name, "' has already been mapped");
- m_DbgMappedBuffers[pBuffer] = DbgMappedBufferInfo{MapType};
+#ifdef DILIGENT_DEBUG
+ {
+ VERIFY(m_DbgMappedBuffers.find(pBuffer) == m_DbgMappedBuffers.end(), "Buffer '", BuffDesc.Name, "' has already been mapped");
+ m_DbgMappedBuffers[pBuffer] = DbgMappedBufferInfo{MapType};
+ }
#endif
pMappedData = nullptr;
@@ -1040,11 +1046,13 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
UnmapBuffer(IBuffer* pBuffer, MAP_TYPE MapType)
{
VERIFY(pBuffer, "pBuffer must not be null");
-#ifdef _DEBUG
- auto MappedBufferIt = m_DbgMappedBuffers.find(pBuffer);
- VERIFY(MappedBufferIt != m_DbgMappedBuffers.end(), "Buffer '", pBuffer->GetDesc().Name, "' has not been mapped.");
- VERIFY(MappedBufferIt->second.MapType == MapType, "MapType (", MapType, ") does not match the map type that was used to map the buffer ", MappedBufferIt->second.MapType);
- m_DbgMappedBuffers.erase(MappedBufferIt);
+#ifdef DILIGENT_DEBUG
+ {
+ auto MappedBufferIt = m_DbgMappedBuffers.find(pBuffer);
+ VERIFY(MappedBufferIt != m_DbgMappedBuffers.end(), "Buffer '", pBuffer->GetDesc().Name, "' has not been mapped.");
+ VERIFY(MappedBufferIt->second.MapType == MapType, "MapType (", MapType, ") does not match the map type that was used to map the buffer ", MappedBufferIt->second.MapType);
+ m_DbgMappedBuffers.erase(MappedBufferIt);
+ }
#endif
}
@@ -1094,12 +1102,14 @@ inline void DeviceContextBase<BaseInterface, ImplementationTraits>::
GenerateMips(ITextureView* pTexView)
{
VERIFY(pTexView != nullptr, "pTexView must not be null");
-#ifdef DEVELOPMENT
- const auto& ViewDesc = pTexView->GetDesc();
- DEV_CHECK_ERR(ViewDesc.ViewType == TEXTURE_VIEW_SHADER_RESOURCE, "Shader resource view '", ViewDesc.Name,
- "' can't be used to generate mipmaps because its type is ", GetTexViewTypeLiteralName(ViewDesc.ViewType), ". Required view type: TEXTURE_VIEW_SHADER_RESOURCE.");
- DEV_CHECK_ERR((ViewDesc.Flags & TEXTURE_VIEW_FLAG_ALLOW_MIP_MAP_GENERATION) != 0, "Shader resource view '", ViewDesc.Name,
- "' was not created with TEXTURE_VIEW_FLAG_ALLOW_MIP_MAP_GENERATION flag and can't be used to generate mipmaps.");
+#ifdef DILIGENT_DEVELOPMENT
+ {
+ const auto& ViewDesc = pTexView->GetDesc();
+ DEV_CHECK_ERR(ViewDesc.ViewType == TEXTURE_VIEW_SHADER_RESOURCE, "Shader resource view '", ViewDesc.Name,
+ "' can't be used to generate mipmaps because its type is ", GetTexViewTypeLiteralName(ViewDesc.ViewType), ". Required view type: TEXTURE_VIEW_SHADER_RESOURCE.");
+ DEV_CHECK_ERR((ViewDesc.Flags & TEXTURE_VIEW_FLAG_ALLOW_MIP_MAP_GENERATION) != 0, "Shader resource view '", ViewDesc.Name,
+ "' was not created with TEXTURE_VIEW_FLAG_ALLOW_MIP_MAP_GENERATION flag and can't be used to generate mipmaps.");
+ }
#endif
}
@@ -1110,7 +1120,7 @@ void DeviceContextBase<BaseInterface, ImplementationTraits>::
ITexture* pDstTexture,
const ResolveTextureSubresourceAttribs& ResolveAttribs)
{
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
VERIFY_EXPR(pSrcTexture != nullptr && pDstTexture != nullptr);
const auto& SrcTexDesc = pSrcTexture->GetDesc();
const auto& DstTexDesc = pDstTexture->GetDesc();
@@ -1151,7 +1161,7 @@ void DeviceContextBase<BaseInterface, ImplementationTraits>::
#endif
}
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
template <typename BaseInterface, typename ImplementationTraits>
inline bool DeviceContextBase<BaseInterface, ImplementationTraits>::
DvpVerifyDrawArguments(const DrawAttribs& Attribs) const
@@ -1522,6 +1532,6 @@ bool DeviceContextBase<BaseInterface, ImplementationTraits>::
return true;
}
-#endif // DEVELOPMENT
+#endif // DILIGENT_DEVELOPMENT
} // namespace Diligent
diff --git a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
index ea00cc90..6d70f4da 100644
--- a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
+++ b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
@@ -122,15 +122,17 @@ public:
for (Uint32 i = 0; i < SrcLayout.NumStaticSamplers; ++i)
{
VERIFY(SrcLayout.StaticSamplers[i].SamplerOrTextureName != nullptr, "Static sampler or texture name can't be null");
-#ifdef DEVELOPMENT
- const auto& BorderColor = SrcLayout.StaticSamplers[i].Desc.BorderColor;
- if (!((BorderColor[0] == 0 && BorderColor[1] == 0 && BorderColor[2] == 0 && BorderColor[3] == 0) ||
- (BorderColor[0] == 0 && BorderColor[1] == 0 && BorderColor[2] == 0 && BorderColor[3] == 1) ||
- (BorderColor[0] == 1 && BorderColor[1] == 1 && BorderColor[2] == 1 && BorderColor[3] == 1)))
+#ifdef DILIGENT_DEVELOPMENT
{
- LOG_WARNING_MESSAGE("Static sampler for variable \"", SrcLayout.StaticSamplers[i].SamplerOrTextureName, "\" specifies border color (",
- BorderColor[0], ", ", BorderColor[1], ", ", BorderColor[2], ", ", BorderColor[3],
- "). D3D12 static samplers only allow transparent black (0,0,0,0), opaque black (0,0,0,1) or opaque white (1,1,1,1) as border colors");
+ const auto& BorderColor = SrcLayout.StaticSamplers[i].Desc.BorderColor;
+ if (!((BorderColor[0] == 0 && BorderColor[1] == 0 && BorderColor[2] == 0 && BorderColor[3] == 0) ||
+ (BorderColor[0] == 0 && BorderColor[1] == 0 && BorderColor[2] == 0 && BorderColor[3] == 1) ||
+ (BorderColor[0] == 1 && BorderColor[1] == 1 && BorderColor[2] == 1 && BorderColor[3] == 1)))
+ {
+ LOG_WARNING_MESSAGE("Static sampler for variable \"", SrcLayout.StaticSamplers[i].SamplerOrTextureName, "\" specifies border color (",
+ BorderColor[0], ", ", BorderColor[1], ", ", BorderColor[2], ", ", BorderColor[3],
+ "). D3D12 static samplers only allow transparent black (0,0,0,0), opaque black (0,0,0,1) or opaque white (1,1,1,1) as border colors");
+ }
}
#endif
diff --git a/Graphics/GraphicsEngine/include/ShaderBase.hpp b/Graphics/GraphicsEngine/include/ShaderBase.hpp
index 3aac5a2d..9874206a 100644
--- a/Graphics/GraphicsEngine/include/ShaderBase.hpp
+++ b/Graphics/GraphicsEngine/include/ShaderBase.hpp
@@ -53,7 +53,7 @@ inline Int32 GetShaderTypeIndex(SHADER_TYPE Type)
Int32 ShaderIndex = PlatformMisc::GetLSB(Type);
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
switch (Type)
{
// clang-format off
diff --git a/Graphics/GraphicsEngine/include/TextureBase.hpp b/Graphics/GraphicsEngine/include/TextureBase.hpp
index 1cd9fd18..38414be2 100644
--- a/Graphics/GraphicsEngine/include/TextureBase.hpp
+++ b/Graphics/GraphicsEngine/include/TextureBase.hpp
@@ -84,7 +84,7 @@ public:
const TextureDesc& Desc,
bool bIsDeviceInternal = false) :
TDeviceObjectBase(pRefCounters, pDevice, Desc, bIsDeviceInternal),
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
m_dbgTexViewObjAllocator(TexViewObjAllocator),
#endif
m_pDefaultSRV(nullptr, STDDeleter<TTextureViewImpl, TTexViewObjAllocator>(TexViewObjAllocator)),
@@ -200,7 +200,7 @@ protected:
/// Pure virtual function that creates texture view for the specific engine implementation.
virtual void CreateViewInternal(const struct TextureViewDesc& ViewDesc, ITextureView** ppView, bool bIsDefaultView) = 0;
-#ifdef _DEBUG
+#ifdef DILIGENT_DEBUG
TTexViewObjAllocator& m_dbgTexViewObjAllocator;
#endif
// WARNING! We cannot use ITextureView here, because ITextureView has no virtual dtor!
diff --git a/Graphics/GraphicsEngine/include/TextureViewBase.hpp b/Graphics/GraphicsEngine/include/TextureViewBase.hpp
index f416796f..07552d97 100644
--- a/Graphics/GraphicsEngine/include/TextureViewBase.hpp
+++ b/Graphics/GraphicsEngine/include/TextureViewBase.hpp
@@ -79,7 +79,7 @@ public:
/// Implementation of ITextureView::SetSampler()
virtual void DILIGENT_CALL_TYPE SetSampler(ISampler* pSampler) override final
{
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
if (this->m_Desc.ViewType != TEXTURE_VIEW_SHADER_RESOURCE)
LOG_ERROR("Texture view \"", this->m_Desc.Name, "\": a sampler can be attached to a shader resource view only. The view type is ", GetTexViewTypeLiteralName(this->m_Desc.ViewType));
#endif
diff --git a/Graphics/GraphicsEngine/src/Texture.cpp b/Graphics/GraphicsEngine/src/Texture.cpp
index 3c9ec721..4cfdbd0b 100644
--- a/Graphics/GraphicsEngine/src/Texture.cpp
+++ b/Graphics/GraphicsEngine/src/Texture.cpp
@@ -142,7 +142,7 @@ void ValidateTextureRegion(const TextureDesc& TexDesc, Uint32 MipLevel, Uint32 S
} \
} while (false)
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_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, "Invalid X range: ", Box.MinX, "..", Box.MaxX);
VERIFY_TEX_PARAMS(Box.MinY < Box.MaxY, "Invalid Y range: ", Box.MinY, "..", Box.MaxY);
@@ -208,7 +208,7 @@ void ValidateUpdateTextureParams(const TextureDesc& TexDesc, Uint32 MipLevel, Ui
VERIFY((SubresData.pData != nullptr) ^ (SubresData.pSrcBuffer != nullptr), "Either CPU data pointer (pData) or GPU buffer (pSrcBuffer) must not be null, but not both");
ValidateTextureRegion(TexDesc, MipLevel, Slice, DstBox);
-#ifdef DEVELOPMENT
+#ifdef DILIGENT_DEVELOPMENT
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");