Skip to content

Commit

Permalink
Fixed binding point of array instance for optimized 'packed' case
Browse files Browse the repository at this point in the history
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
  • Loading branch information
asimiklit committed Feb 11, 2019
1 parent d53a69a commit 91cff81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/gles31/functional/es31fSSBOLayoutCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,7 @@ SSBOLayoutCase::IterateResult SSBOLayoutCase::iterate (void)
{
const BufferBlock& block = m_interface.getBlock(blockDeclNdx);
const int numInst = block.isArray() ? block.getArraySize() : 1;
int arrayInstanceBindingPoint = bindingPoint;

for (int instNdx = 0; instNdx < numInst; instNdx++)
{
Expand All @@ -2243,7 +2244,9 @@ SSBOLayoutCase::IterateResult SSBOLayoutCase::iterate (void)
const BlockLocation& blockLoc = blockLocations[layoutNdx];

if (blockLoc.size > 0)
gl.bindBufferRange(GL_SHADER_STORAGE_BUFFER, bindingPoint, buffers[blockLoc.index].buffer, blockLoc.offset, blockLoc.size);
gl.bindBufferRange(GL_SHADER_STORAGE_BUFFER, arrayInstanceBindingPoint, buffers[blockLoc.index].buffer, blockLoc.offset, blockLoc.size);

arrayInstanceBindingPoint += 1;
}

bindingPoint += 1;
Expand Down

0 comments on commit 91cff81

Please sign in to comment.