summaryrefslogtreecommitdiffstats
path: root/Graphics
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-10-07 21:12:45 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-10-07 21:12:45 +0000
commitc75307ce6d2d3d18b9ad7ba0bbcf2e2e59ba5a2c (patch)
tree8ed496ca42fc711e1ff9ac344b17e6a0c0824cfb /Graphics
parentFixed typo (diff)
downloadDiligentCore-c75307ce6d2d3d18b9ad7ba0bbcf2e2e59ba5a2c.tar.gz
DiligentCore-c75307ce6d2d3d18b9ad7ba0bbcf2e2e59ba5a2c.zip
Few minor updates
Diffstat (limited to 'Graphics')
-rw-r--r--Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp3
-rw-r--r--Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp3
-rw-r--r--Graphics/GraphicsEngine/interface/Shader.h4
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp3
4 files changed, 8 insertions, 5 deletions
diff --git a/Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp b/Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp
index 780562df..af77319a 100644
--- a/Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp
+++ b/Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp
@@ -1454,7 +1454,8 @@ Uint32 GetStagingTextureLocationOffset(const TextureDesc& TexDesc,
// For non-compressed formats, BlockWidth is 1.
Offset += (LocationX / FmtAttribs.BlockWidth) * FmtAttribs.GetElementSize();
- // Note: this addressing complies with how Vulkan addresses textures when copying data to/from buffer:
+ // Note: this addressing complies with how Vulkan (as well as OpenGL/GLES and Metal) address
+ // textures when copying data to/from buffers:
// address of (x,y,z) = bufferOffset + (((z * imageHeight) + y) * rowLength + x) * texelBlockSize; (18.4.1)
}
diff --git a/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp b/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp
index 5648e39d..f82f18cf 100644
--- a/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp
+++ b/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp
@@ -32,6 +32,7 @@
#include <vector>
+#include "Atomics.hpp"
#include "ShaderResourceVariable.h"
#include "PipelineState.h"
#include "StringTools.hpp"
@@ -340,7 +341,7 @@ template <typename ResourceLayoutType,
struct ShaderVariableBase : public ResourceVariableBaseInterface
{
ShaderVariableBase(ResourceLayoutType& ParentResLayout) :
- m_ParentResLayout(ParentResLayout)
+ m_ParentResLayout{ParentResLayout}
{
}
diff --git a/Graphics/GraphicsEngine/interface/Shader.h b/Graphics/GraphicsEngine/interface/Shader.h
index e004f7f1..dce77a82 100644
--- a/Graphics/GraphicsEngine/interface/Shader.h
+++ b/Graphics/GraphicsEngine/interface/Shader.h
@@ -346,7 +346,9 @@ DILIGENT_TYPED_ENUM(SHADER_RESOURCE_TYPE, Uint8)
SHADER_RESOURCE_TYPE_SAMPLER,
/// Input attachment in a render pass
- SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT
+ SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT,
+
+ SHADER_RESOURCE_TYPE_LAST = SHADER_RESOURCE_TYPE_INPUT_ATTACHMENT
};
// clang-format on
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
index 6e6c142f..53a92a59 100644
--- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp
@@ -87,10 +87,9 @@ ShaderResourceBindingVkImpl::ShaderResourceBindingVkImpl(IReferenceCounters* pR
ShaderResourceBindingVkImpl::~ShaderResourceBindingVkImpl()
{
- PipelineStateVkImpl* pPSO = ValidatedCast<PipelineStateVkImpl>(m_pPSO);
for (Uint32 s = 0; s < m_NumShaders; ++s)
{
- auto& VarDataAllocator = pPSO->GetSRBMemoryAllocator().GetShaderVariableDataAllocator(s);
+ auto& VarDataAllocator = m_pPSO->GetSRBMemoryAllocator().GetShaderVariableDataAllocator(s);
m_pShaderVarMgrs[s].DestroyVariables(VarDataAllocator);
m_pShaderVarMgrs[s].~ShaderVariableManagerVk();
}