From c75307ce6d2d3d18b9ad7ba0bbcf2e2e59ba5a2c Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 7 Oct 2020 14:12:45 -0700 Subject: Few minor updates --- Graphics/GraphicsAccessories/src/GraphicsAccessories.cpp | 3 ++- Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp | 3 ++- Graphics/GraphicsEngine/interface/Shader.h | 4 +++- Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp | 3 +-- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'Graphics') 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 +#include "Atomics.hpp" #include "ShaderResourceVariable.h" #include "PipelineState.h" #include "StringTools.hpp" @@ -340,7 +341,7 @@ template (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(); } -- cgit v1.2.3