summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-11-30 06:40:42 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-11-30 06:40:42 +0000
commit34cab1f1c50047f2a82cbb2656921c2d88e39ee7 (patch)
tree9c520570008618d81bc4cba9a3aa5dd9455ba714 /Graphics/GraphicsEngineVulkan
parentImproved const-correctness; updated comments; added DRAW_FLAG_VERIFY_STATES a... (diff)
downloadDiligentCore-34cab1f1c50047f2a82cbb2656921c2d88e39ee7.tar.gz
DiligentCore-34cab1f1c50047f2a82cbb2656921c2d88e39ee7.zip
Improved type safety of different flag types
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h10
-rw-r--r--Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp10
-rw-r--r--Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp2
3 files changed, 11 insertions, 11 deletions
diff --git a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
index a1d645af..8678f2af 100644
--- a/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
+++ b/Graphics/GraphicsEngineVulkan/include/DeviceContextVkImpl.h
@@ -67,13 +67,13 @@ public:
virtual void TransitionShaderResources(IPipelineState* pPipelineState, IShaderResourceBinding* pShaderResourceBinding)override final;
- virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, Uint32 Flags)override final;
+ virtual void CommitShaderResources(IShaderResourceBinding* pShaderResourceBinding, COMMIT_SHADER_RESOURCES_FLAGS Flags)override final;
virtual void SetStencilRef(Uint32 StencilRef)override final;
virtual void SetBlendFactors(const float* pBlendFactors = nullptr)override final;
- virtual void SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32* pOffsets, Uint32 Flags )override final;
+ virtual void SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32* pOffsets, SET_VERTEX_BUFFERS_FLAGS Flags )override final;
virtual void InvalidateState()override final;
@@ -89,7 +89,7 @@ public:
virtual void DispatchCompute( const DispatchComputeAttribs& DispatchAttrs )override final;
- virtual void ClearDepthStencil( ITextureView* pView, Uint32 ClearFlags, float fDepth, Uint8 Stencil)override final;
+ virtual void ClearDepthStencil( ITextureView* pView, CLEAR_DEPTH_STENCIL_FLAGS ClearFlags, float fDepth, Uint8 Stencil)override final;
virtual void ClearRenderTarget( ITextureView* pView, const float* RGBA )override final;
@@ -99,7 +99,7 @@ public:
virtual void CopyBuffer(IBuffer *pSrcBuffer, Uint32 SrcOffset, IBuffer *pDstBuffer, Uint32 DstOffset, Uint32 Size)override final;
- virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, Uint32 MapFlags, PVoid& pMappedData)override final;
+ virtual void MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData)override final;
virtual void UnmapBuffer(IBuffer* pBuffer)override final;
@@ -120,7 +120,7 @@ public:
Uint32 MipLevel,
Uint32 ArraySlice,
MAP_TYPE MapType,
- Uint32 MapFlags,
+ MAP_FLAGS MapFlags,
const Box* pMapRegion,
MappedTextureSubresource& MappedData )override final;
diff --git a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
index de99f36f..b594aa35 100644
--- a/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp
@@ -263,7 +263,7 @@ namespace Diligent
pPipelineStateVk->CommitAndTransitionShaderResources(pShaderResourceBinding, this, false, COMMIT_SHADER_RESOURCES_FLAG_TRANSITION_RESOURCES, nullptr);
}
- void DeviceContextVkImpl::CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, Uint32 Flags)
+ void DeviceContextVkImpl::CommitShaderResources(IShaderResourceBinding *pShaderResourceBinding, COMMIT_SHADER_RESOURCES_FLAGS Flags)
{
if (!DeviceContextBase::CommitShaderResources(pShaderResourceBinding, Flags, 0 /*Dummy*/))
return;
@@ -636,7 +636,7 @@ namespace Diligent
++m_State.NumCommands;
}
- void DeviceContextVkImpl::ClearDepthStencil( ITextureView* pView, Uint32 ClearFlags, float fDepth, Uint8 Stencil )
+ void DeviceContextVkImpl::ClearDepthStencil( ITextureView* pView, CLEAR_DEPTH_STENCIL_FLAGS ClearFlags, float fDepth, Uint8 Stencil )
{
ITextureViewVk* pVkDSV = nullptr;
if ( pView != nullptr )
@@ -968,7 +968,7 @@ namespace Diligent
m_pPipelineState = nullptr;
}
- void DeviceContextVkImpl::SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pOffsets, Uint32 Flags )
+ void DeviceContextVkImpl::SetVertexBuffers( Uint32 StartSlot, Uint32 NumBuffersSet, IBuffer **ppBuffers, Uint32 *pOffsets, SET_VERTEX_BUFFERS_FLAGS Flags )
{
TDeviceContextBase::SetVertexBuffers( StartSlot, NumBuffersSet, ppBuffers, pOffsets, Flags );
m_State.CommittedVBsUpToDate = false;
@@ -1292,7 +1292,7 @@ namespace Diligent
++m_State.NumCommands;
}
- void DeviceContextVkImpl::MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, Uint32 MapFlags, PVoid& pMappedData)
+ void DeviceContextVkImpl::MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_FLAGS MapFlags, PVoid& pMappedData)
{
TDeviceContextBase::MapBuffer(pBuffer, MapType, MapFlags, pMappedData);
auto* pBufferVk = ValidatedCast<BufferVkImpl>(pBuffer);
@@ -1709,7 +1709,7 @@ namespace Diligent
Uint32 MipLevel,
Uint32 ArraySlice,
MAP_TYPE MapType,
- Uint32 MapFlags,
+ MAP_FLAGS MapFlags,
const Box* pMapRegion,
MappedTextureSubresource& MappedData )
{
diff --git a/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp b/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp
index 7fcc6b27..ec6d61c3 100644
--- a/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/GenerateMipsVkHelper.cpp
@@ -304,7 +304,7 @@ namespace Diligent
if (CurrLayout != VK_IMAGE_LAYOUT_GENERAL)
Ctx.TransitionImageLayout(*pTexVk, CurrLayout, VK_IMAGE_LAYOUT_GENERAL, SubresRange);
- Ctx.CommitShaderResources(&SRB, 0);
+ Ctx.CommitShaderResources(&SRB, COMMIT_SHADER_RESOURCES_FLAG_NONE);
DispatchComputeAttribs DispatchAttrs((DstWidth + 7) / 8, (DstHeight + 7) / 8, ViewDesc.NumArraySlices);
Ctx.DispatchCompute(DispatchAttrs);