(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 fc176e507108f480c2ec5f09cc163e49675a3ab0..04d193c42f7a91fa4f5b61656502133feb54b53c 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 cabc414740955c4532831101a6ae7649681235e0..81b93d28728cc9a959a9e9d7320907a40d0c95c5 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 7aa13b0e010f810badf4d5d08312c9a1e28bbe76..bba245a45a8394df0e502e8b4d0ef604136984ab 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 11a83d0d849d351e44e5c5855e1bc043935a568b..473174711dbec2e7d5a6aad89043b922ffd75aa8 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();