(DR) Fix texture binding 87/278987/4
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 29 Jul 2022 02:35:32 +0000 (11:35 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Tue, 15 Nov 2022 06:22:29 +0000 (06:22 +0000)
Change-Id: Idc56257d5864962facd7dc33628b24167ff0598b

automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.cpp
automated-tests/src/dali/dali-test-suite-utils/test-graphics-controller.h
dali/graphics-api/graphics-controller.h
dali/internal/render/renderers/render-renderer.cpp

index fc176e5..04d193c 100644 (file)
@@ -1302,7 +1302,7 @@ Graphics::MemoryRequirements TestGraphicsController::GetBufferMemoryRequirements
   return Graphics::MemoryRequirements{};
 }
 
-const Graphics::TextureProperties& TestGraphicsController::GetTextureProperties(const Graphics::Texture& texture)
+Graphics::TextureProperties TestGraphicsController::GetTextureProperties(const Graphics::Texture& texture)
 {
   static Graphics::TextureProperties textureProperties{};
   mCallStack.PushCall("GetTextureProperties", "");
index cabc414..81b93d2 100644 (file)
@@ -2,7 +2,7 @@
 #define TEST_GRAPHICS_CONTROLLER_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -354,7 +354,7 @@ public:
    *
    * @return Returns the TextureProperties object
    */
-  const Graphics::TextureProperties& GetTextureProperties(const Graphics::Texture& texture) override;
+  Graphics::TextureProperties GetTextureProperties(const Graphics::Texture& texture) override;
 
   /**
    * @brief Returns the reflection of the given program
index 7aa13b0..bba245a 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GRAPHICS_CONTROLLER_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -349,7 +349,7 @@ public:
    *
    * @return Returns the TextureProperties object
    */
-  virtual const TextureProperties& GetTextureProperties(const Texture& texture) = 0;
+  virtual TextureProperties GetTextureProperties(const Texture& texture) = 0;
 
   /**
    * @brief Returns the reflection of the given program
index 11a83d0..4731747 100644 (file)
@@ -466,10 +466,10 @@ bool Renderer::Render(Graphics::CommandBuffer&                             comma
         auto& textureImpl     = GetImplementation(texture);
         auto  graphicsTexture = textureImpl.GetRenderObject()->GetGraphicsObject();
 
-        const auto& properties = mGraphicsController->GetTextureProperties(*graphicsTexture);
+        auto properties = mGraphicsController->GetTextureProperties(*graphicsTexture);
 
         mRenderCallbackTextureBindings.emplace_back(graphicsTexture);
-        mRenderCallbackInput.textureBindings[i] = properties.nativeHandle;
+        mRenderCallbackInput.textureBindings[i++] = properties.nativeHandle;
       }
       info.textureCount = mRenderCallbackTextureBindings.size();
       info.textureList  = mRenderCallbackTextureBindings.data();