summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-03-07 17:02:28 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-03-07 17:02:28 +0000
commit195dfd3a09bc917135deeb4a4450638ae47997d1 (patch)
tree5b827c7e71cbc34e7e927d8dc10873acefc3d8a1 /Graphics/GraphicsEngineOpenGL
parentImproved handling input layout elements in the pipeline state (diff)
downloadDiligentCore-195dfd3a09bc917135deeb4a4450638ae47997d1.tar.gz
DiligentCore-195dfd3a09bc917135deeb4a4450638ae47997d1.zip
Improved buffer stride management in PSO
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp b/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp
index fece99b3..b9d2237b 100644
--- a/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp
+++ b/Graphics/GraphicsEngineOpenGL/src/VAOCache.cpp
@@ -90,7 +90,6 @@ const GLObjectWrappers::GLVertexArrayObj& VAOCache::GetVAO( IPipelineState *pPSO
const auto &InputLayout = pPSOGL->GetDesc().GraphicsPipeline.InputLayout;
const LayoutElement *LayoutElems = InputLayout.LayoutElements;
Uint32 NumElems = InputLayout.NumElements;
- const Uint32 *Strides = pPSOGL->GetBufferStrides();
// Construct the key
VAOCacheKey Key(pPSO, pIndexBuffer);
@@ -115,7 +114,7 @@ const GLObjectWrappers::GLVertexArrayObj& VAOCache::GetVAO( IPipelineState *pPSO
Key.NumUsedSlots = MaxUsedSlot;
auto &CurrStream = VertexStreams[BuffSlot];
- auto Stride = Strides[BuffSlot];
+ auto Stride = pPSOGL->GetBufferStride(BuffSlot);
auto &pCurrBuf = VertexBuffers[BuffSlot];
auto &CurrStreamKey = Key.Streams[BuffSlot];
if (pCurrBuf == nullptr)
@@ -179,7 +178,7 @@ const GLObjectWrappers::GLVertexArrayObj& VAOCache::GetVAO( IPipelineState *pPSO
// Get buffer through the strong reference. Note that we are not
// using pointers stored in the key for safety
auto &CurrStream = VertexStreams[BuffSlot];
- auto Stride = Strides[BuffSlot];
+ auto Stride = pPSOGL->GetBufferStride(BuffSlot);
auto *pBuff = VertexBuffers[BuffSlot];
VERIFY( pBuff != nullptr, "Vertex buffer is null" );
const BufferGLImpl *pBufferOGL = static_cast<const BufferGLImpl*>( pBuff );