Reflection GetSamplers() returns const ref
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles-impl / gles-graphics-reflection.h
index c54c505..06cfba1 100644 (file)
@@ -186,7 +186,7 @@ public:
    *
    * @return A vector of the sampler uniforms
    */
-  [[nodiscard]] std::vector<Dali::Graphics::UniformInfo> GetSamplers() const override;
+  const std::vector<Dali::Graphics::UniformInfo>& GetSamplers() const override;
 
   // Language
 
@@ -210,11 +210,11 @@ public:
       arraySize(arraySize),
       type(type){};
 
-    uint32_t location; ///< Location of uniform
-    uint32_t size;     ///< size of uniform
-    uint32_t offset;   ///< offset of uniform within UBO
+    uint32_t location;  ///< Location of uniform
+    uint32_t size;      ///< size of uniform
+    uint32_t offset;    ///< offset of uniform within UBO
     uint32_t arraySize; ///< number of array elements (1 for non-arrays)
-    GLenum   type;     ///< type of uniform
+    GLenum   type;      ///< type of uniform
   };
 
   /**
@@ -239,6 +239,11 @@ public:
    */
   void BuildUniformBlockReflection();
 
+  /**
+   * Sort the samplers by their lexical location in the frag shader source code.
+   */
+  void SortOpaques();
+
 protected:
   Reflection(Reflection&&) = default;
   Reflection& operator=(Reflection&&) = default;