From: Eunki, Hong Date: Tue, 7 Mar 2023 17:47:13 +0000 (+0900) Subject: Reset array of uniform buffer only required X-Git-Tag: dali_2.2.17~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a49f6f8952a761840ffef7df43ebf651fae8975;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Reset array of uniform buffer only required Previously, we reset 64 x sizeof(UniformBufferBindingDescriptor) everytimes. for each BindUniformBuffer commands. It is useless job for standalone case. So move initialize process only required. Change-Id: I294d481cb32bec544aa2be864d08fd35322acaec Signed-off-by: Eunki, Hong --- diff --git a/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.cpp b/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.cpp index 0e72a8c..70dfbb8 100644 --- a/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.cpp +++ b/dali/internal/graphics/gles-impl/gles-graphics-command-buffer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -270,10 +270,7 @@ void CommandBuffer::BindUniformBuffers(const std::vectorAllocate(maxBinding + 1); + auto destBindings = mCommandPool->Allocate(maxBindingCount); // copy - memcpy(destBindings.Ptr(), sTempBindings, sizeof(UniformBufferBindingDescriptor) * (maxBinding + 1)); + memcpy(destBindings.Ptr(), sTempBindings, sizeof(UniformBufferBindingDescriptor) * (maxBindingCount)); bindCmd.uniformBufferBindings = destBindings; - bindCmd.uniformBufferBindingsCount = maxBinding + 1; + bindCmd.uniformBufferBindingsCount = maxBindingCount; } }