Merge "Added shader support to pipeline cache" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / internal / graphics / gles-impl / gles-graphics-program.h
index 73ed75c..ee8a888 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_GRAPHICS_GLES_PROGRAM_H
 
 /*
- * Copyright (c) 2021 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.
@@ -87,6 +87,12 @@ public:
   uint32_t Release();
 
   /**
+   * @brief Retrieves ref count
+   * @return Refcount value
+   */
+  [[nodiscard]] uint32_t GetRefCount() const;
+
+  /**
    * @brief Returns reflection
    *
    * @return Valid reflection associated with the Program
@@ -120,6 +126,24 @@ public:
    */
   bool GetParameter(uint32_t parameterId, void* out);
 
+  /**
+   * @brief Updates standalone uniforms
+   *
+   * Updates standalone uniforms (issues the GL calls) and
+   * updates internal uniform cache
+   *
+   * @param[in] ptr Valid pointer to the uniform block memory
+   */
+  void UpdateStandaloneUniformBlock(const char* ptr);
+
+  /**
+   * @brief Builds standalone uniform cache
+   *
+   * This function allocates cache memory and
+   * gathers a list of GL functions per uniform type.
+   */
+  void BuildStandaloneUniformCache();
+
 private:
   friend class Program;
 
@@ -130,7 +154,7 @@ private:
 ///////////////////////////////////////////////////////////////
 
 /**
- * @brief Wrapper for the pipeline implementation
+ * @brief Wrapper for the program implementation
  *
  * This object is returned back to the client-side
  */