From dff8a2764cefffec1f94cc37b1353715b3377303 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 22 Mar 2018 17:18:49 -0400 Subject: [PATCH] P4 to Git Change 1530960 by gandryey@gera-lnx-rcf on 2018/03/22 17:07:41 SWDEV-79445 - OCL generic changes and code clean-up - Fix Linux build Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.cpp#4 edit --- rocclr/runtime/device/pal/palconstbuf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rocclr/runtime/device/pal/palconstbuf.cpp b/rocclr/runtime/device/pal/palconstbuf.cpp index bdac07fa4a..3a0aa1a1eb 100644 --- a/rocclr/runtime/device/pal/palconstbuf.cpp +++ b/rocclr/runtime/device/pal/palconstbuf.cpp @@ -74,8 +74,10 @@ bool ManagedBuffer::uploadDataToHw(uint32_t size) { // Check if CB has enough space for copy if ((wrtOffset_ + count) > size_) { - activeBuffer_ = (++activeBuffer_) % MaxNumberOfBuffers; - //! Make sure buffer isn't busy + // Get the next buffer in the list + ++activeBuffer_; + activeBuffer_ %= MaxNumberOfBuffers; + // Make sure the buffer isn't busy buffers_[activeBuffer_]->wait(gpu_); wrtAddress_ = buffers_[activeBuffer_]->data(); wrtOffset_ = 0;