Merge "Remove old pipeline caches" into devel/master
[platform/core/uifw/dali-core.git] / dali / internal / render / renderers / render-renderer.h
index daef91f..202277f 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_RENDER_RENDERER_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.
  */
 
 // INTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/math/matrix.h>
 #include <dali/public-api/math/vector4.h>
 #include <dali/public-api/rendering/texture-set.h>
+#include <dali/public-api/signals/render-callback.h>
 
 #include <dali/graphics-api/graphics-controller.h>
 #include <dali/integration-api/debug.h>
@@ -31,7 +33,6 @@
 #include <dali/internal/common/type-abstraction-enums.h>
 #include <dali/internal/event/common/property-input-impl.h>
 #include <dali/internal/render/data-providers/render-data-provider.h>
-#include <dali/internal/render/gl-resources/gl-resource-owner.h>
 #include <dali/internal/render/renderers/render-geometry.h>
 #include <dali/internal/render/renderers/uniform-buffer-manager.h>
 #include <dali/internal/render/shaders/program.h>
@@ -41,7 +42,6 @@ namespace Dali
 {
 namespace Internal
 {
-class Context;
 class Texture;
 class ProgramCache;
 
@@ -50,21 +50,41 @@ namespace SceneGraph
 class SceneController;
 class Shader;
 class NodeDataProvider;
-
-class RenderInstruction; //for relfection effect
+class RenderInstruction; //for reflection effect
 } // namespace SceneGraph
 
 namespace Render
 {
 struct ShaderCache;
+class PipelineCache;
+class PipelineCacheL2;
 class UniformBufferManager;
+class Renderer;
+
+using RendererKey = MemoryPoolKey<Render::Renderer>;
+} //namespace Render
+} //namespace Internal
+
+// Ensure RendererKey can be used in Dali::Vector
+template<>
+struct TypeTraits<Internal::Render::RendererKey> : public BasicTypes<Internal::Render::RendererKey>
+{
+  enum
+  {
+    IS_TRIVIAL_TYPE = true
+  };
+};
 
+namespace Internal
+{
+namespace Render
+{
 /**
  * Renderers are used to render meshes
  * These objects are used during RenderManager::Render(), so properties modified during
  * the Update must either be double-buffered, or set via a message added to the RenderQueue.
  */
-class Renderer : public GlResourceOwner
+class Renderer
 {
 public:
   /**
@@ -95,21 +115,16 @@ public:
   };
 
   /**
-   * @copydoc Dali::Internal::GlResourceOwner::GlContextDestroyed()
-   */
-  void GlContextDestroyed() override;
-
-  /**
-   * @copydoc Dali::Internal::GlResourceOwner::GlCleanup()
+   * @brief Global static initialize for Render::Renderer before new CommandBuffer's Render fill start.
    */
-  void GlCleanup() override;
+  static void PrepareCommandBuffer();
 
   /**
    * Create a new renderer instance
    * @param[in] dataProviders The data providers for the renderer
    * @param[in] geometry The geometry for the renderer
    * @param[in] blendingBitmask A bitmask of blending options.
-   * @param[in] blendColor The blend color to pass to GL
+   * @param[in] blendColor The blend color
    * @param[in] faceCullingMode The face-culling mode.
    * @param[in] preMultipliedAlphaEnabled whether alpha is pre-multiplied.
    * @param[in] depthWriteMode Depth buffer write mode
@@ -117,23 +132,23 @@ public:
    * @param[in] depthFunction Depth function
    * @param[in] stencilParameters Struct containing all stencil related options
    */
-  static Renderer* New(SceneGraph::RenderDataProvider* dataProviders,
-                       Render::Geometry*               geometry,
-                       uint32_t                        blendingBitmask,
-                       const Vector4&                  blendColor,
-                       FaceCullingMode::Type           faceCullingMode,
-                       bool                            preMultipliedAlphaEnabled,
-                       DepthWriteMode::Type            depthWriteMode,
-                       DepthTestMode::Type             depthTestMode,
-                       DepthFunction::Type             depthFunction,
-                       StencilParameters&              stencilParameters);
+  static RendererKey NewKey(SceneGraph::RenderDataProvider* dataProviders,
+                            Render::Geometry*               geometry,
+                            uint32_t                        blendingBitmask,
+                            const Vector4&                  blendColor,
+                            FaceCullingMode::Type           faceCullingMode,
+                            bool                            preMultipliedAlphaEnabled,
+                            DepthWriteMode::Type            depthWriteMode,
+                            DepthTestMode::Type             depthTestMode,
+                            DepthFunction::Type             depthFunction,
+                            StencilParameters&              stencilParameters);
 
   /**
    * Constructor.
    * @param[in] dataProviders The data providers for the renderer
    * @param[in] geometry The geometry for the renderer
    * @param[in] blendingBitmask A bitmask of blending options.
-   * @param[in] blendColor The blend color to pass to GL
+   * @param[in] blendColor The blend color
    * @param[in] faceCullingMode The face-culling mode.
    * @param[in] preMultipliedAlphaEnabled whether alpha is pre-multiplied.
    * @param[in] depthWriteMode Depth buffer write mode
@@ -153,6 +168,38 @@ public:
            StencilParameters&              stencilParameters);
 
   /**
+   * Second-phase construction.
+   * This is called when the renderer is inside render thread
+   * @param[in] graphicsController The graphics controller to use
+   * @param[in] programCache Cache of program objects
+   * @param[in] shaderCache Cache of shaders
+   * @param[in] uniformBufferManager Uniform buffer manager
+   * @param[in] pipelineCache Cache of pipelines
+   */
+  void Initialize(Graphics::Controller&         graphicsController,
+                  ProgramCache&                 programCache,
+                  Render::ShaderCache&          shaderCache,
+                  Render::UniformBufferManager& uniformBufferManager,
+                  Render::PipelineCache&        pipelineCache);
+
+  /**
+   * Destructor
+   */
+  ~Renderer();
+
+  /**
+   * Overriden delete operator
+   * Deletes the renderer from its global memory pool
+   */
+  void operator delete(void* ptr);
+
+  /**
+   * Get a pointer to the object from the given key.
+   * Used by MemoryPoolKey to provide pointer semantics.
+   */
+  static Renderer* Get(RendererKey::KeyType rendererKey);
+
+  /**
    * Change the geometry used by the renderer
    * @param[in] geometry The new geometry
    */
@@ -164,28 +211,12 @@ public:
    * @brief Returns a reference to an array of draw commands
    * @return Valid array of draw commands (may be empty)
    */
-  const std::vector<Dali::DevelRenderer::DrawCommand>& GetDrawCommands() const
+  [[nodiscard]] const std::vector<Dali::DevelRenderer::DrawCommand>& GetDrawCommands() const
   {
     return mDrawCommands;
   }
 
   /**
-   * Second-phase construction.
-   * This is called when the renderer is inside render thread
-   * @param[in] context Context used by the renderer (To be removed)
-   * @param[in] graphicsController The graphics controller to use
-   * @param[in] programCache Cache of program objects
-   * @param[in] shaderCache Cache of shaders
-   * @param[in] uniformBufferManager Uniform buffer manager
-   */
-  void Initialize(Context& context, Graphics::Controller& graphicsController, ProgramCache& programCache, Render::ShaderCache& shaderCache, Render::UniformBufferManager& uniformBufferManager);
-
-  /**
-   * Destructor
-   */
-  ~Renderer() override;
-
-  /**
    * Set the face-culling mode.
    * @param[in] mode The face-culling mode.
    */
@@ -199,7 +230,7 @@ public:
 
   /**
    * Set the blend color for blending options
-   * @param[in] blendColor The blend color to pass to GL
+   * @param[in] blendColor The blend color
    */
   void SetBlendColor(const Vector4& color);
 
@@ -232,7 +263,7 @@ public:
    * Query the Renderer's depth write mode
    * @return The renderer depth write mode
    */
-  DepthWriteMode::Type GetDepthWriteMode() const;
+  [[nodiscard]] DepthWriteMode::Type GetDepthWriteMode() const;
 
   /**
    * Sets the depth test mode
@@ -244,7 +275,7 @@ public:
    * Query the Renderer's depth test mode
    * @return The renderer depth test mode
    */
-  DepthTestMode::Type GetDepthTestMode() const;
+  [[nodiscard]] DepthTestMode::Type GetDepthTestMode() const;
 
   /**
    * Sets the depth function
@@ -256,7 +287,7 @@ public:
    * Query the Renderer's depth function
    * @return The renderer depth function
    */
-  DepthFunction::Type GetDepthFunction() const;
+  [[nodiscard]] DepthFunction::Type GetDepthFunction() const;
 
   /**
    * Sets the render mode
@@ -268,7 +299,7 @@ public:
    * Gets the render mode
    * @return The render mode
    */
-  RenderMode::Type GetRenderMode() const;
+  [[nodiscard]] RenderMode::Type GetRenderMode() const;
 
   /**
    * Sets the stencil function
@@ -280,7 +311,7 @@ public:
    * Gets the stencil function
    * @return The stencil function
    */
-  StencilFunction::Type GetStencilFunction() const;
+  [[nodiscard]] StencilFunction::Type GetStencilFunction() const;
 
   /**
    * Sets the stencil function mask
@@ -292,7 +323,7 @@ public:
    * Gets the stencil function mask
    * @return The stencil function mask
    */
-  int GetStencilFunctionMask() const;
+  [[nodiscard]] int GetStencilFunctionMask() const;
 
   /**
    * Sets the stencil function reference
@@ -304,7 +335,7 @@ public:
    * Gets the stencil function reference
    * @return The stencil function reference
    */
-  int GetStencilFunctionReference() const;
+  [[nodiscard]] int GetStencilFunctionReference() const;
 
   /**
    * Sets the stencil mask
@@ -316,7 +347,7 @@ public:
    * Gets the stencil mask
    * @return The stencil mask
    */
-  int GetStencilMask() const;
+  [[nodiscard]] int GetStencilMask() const;
 
   /**
    * Sets the stencil operation for when the stencil test fails
@@ -328,7 +359,7 @@ public:
    * Gets the stencil operation for when the stencil test fails
    * @return The stencil operation
    */
-  StencilOperation::Type GetStencilOperationOnFail() const;
+  [[nodiscard]] StencilOperation::Type GetStencilOperationOnFail() const;
 
   /**
    * Sets the stencil operation for when the depth test fails
@@ -340,7 +371,7 @@ public:
    * Gets the stencil operation for when the depth test fails
    * @return The stencil operation
    */
-  StencilOperation::Type GetStencilOperationOnZFail() const;
+  [[nodiscard]] StencilOperation::Type GetStencilOperationOnZFail() const;
 
   /**
    * Sets the stencil operation for when the depth test passes
@@ -352,7 +383,7 @@ public:
    * Gets the stencil operation for when the depth test passes
    * @return The stencil operation
    */
-  StencilOperation::Type GetStencilOperationOnZPass() const;
+  [[nodiscard]] StencilOperation::Type GetStencilOperationOnZPass() const;
 
   /**
    * Called to upload during RenderManager::Render().
@@ -361,7 +392,7 @@ public:
 
   /**
    * Called to render during RenderManager::Render().
-   * @param[in] context The context used for rendering
+   * @param[in,out] commandBuffer The command buffer to write into
    * @param[in] bufferIndex The index of the previous update buffer.
    * @param[in] node The node using this renderer
    * @param[in] modelViewMatrix The model-view matrix.
@@ -371,9 +402,10 @@ public:
    * @param[in] blend If true, blending is enabled
    * @param[in] boundTextures The textures bound for rendering
    * @param[in] instruction. for use case like reflection where CullFace needs to be adjusted
-
+   *
+   * @return True if commands have been added to the command buffer
    */
-  void Render(Context&                                             context,
+  bool Render(Graphics::CommandBuffer&                             commandBuffer,
               BufferIndex                                          bufferIndex,
               const SceneGraph::NodeDataProvider&                  node,
               const Matrix&                                        modelMatrix,
@@ -387,12 +419,41 @@ public:
               uint32_t                                             queueIndex);
 
   /**
+   * Sets RenderCallback object
+   *
+   * @param[in] callback Valid pointer to RenderCallback object
+   */
+  void SetRenderCallback(RenderCallback* callback);
+
+  /**
+   * Returns currently set RenderCallback object
+   *
+   * @return Valid pointer to RenderCallback object or nullptr
+   */
+  RenderCallback* GetRenderCallback()
+  {
+    return mRenderCallback;
+  }
+
+  /**
+   * Returns internal RenderCallbackInput structure
+   * @return Valid reference to the RenderCallbackInput
+   */
+  RenderCallbackInput& GetRenderCallbackInput()
+  {
+    if(!mRenderCallbackInput)
+    {
+      mRenderCallbackInput = std::unique_ptr<RenderCallbackInput>(new RenderCallbackInput);
+    }
+    return *mRenderCallbackInput;
+  }
+
+  /**
    * Write the renderer's sort attributes to the passed in reference
    *
-   * @param[in] bufferIndex The current update buffer index.
    * @param[out] sortAttributes
    */
-  void SetSortAttributes(BufferIndex bufferIndex, SceneGraph::RenderInstructionProcessor::SortAttributes& sortAttributes) const;
+  void SetSortAttributes(SceneGraph::RenderInstructionProcessor::SortAttributes& sortAttributes) const;
 
   /**
    * Sets the flag indicating whether shader changed.
@@ -405,17 +466,38 @@ public:
    * Check if the renderer attributes/uniforms are updated and returns the flag
    *
    * @param[in] bufferIndex The current update buffer index.
-   * @param[in] node The node using this renderer
    */
-  bool Updated(BufferIndex bufferIndex, const SceneGraph::NodeDataProvider* node);
+  bool Updated(BufferIndex bufferIndex);
 
   template<class T>
-  bool WriteDefaultUniform(const Graphics::UniformInfo* uniformInfo, Render::UniformBuffer& ubo, const std::vector<Graphics::UniformBufferBinding>& bindings, const T& data);
+  bool WriteDefaultUniform(const Graphics::UniformInfo* uniformInfo,
+                           Render::UniformBufferView&   ubo,
+                           const T&                     data);
 
   template<class T>
-  void WriteUniform(Render::UniformBuffer& ubo, const std::vector<Graphics::UniformBufferBinding>& bindings, const Graphics::UniformInfo& uniformInfo, const T& data);
+  void WriteUniform(Render::UniformBufferView&   ubo,
+                    const Graphics::UniformInfo& uniformInfo,
+                    const T&                     data);
 
-  void WriteUniform(Render::UniformBuffer& ubo, const std::vector<Graphics::UniformBufferBinding>& bindings, const Graphics::UniformInfo& uniformInfo, const void* data, uint32_t size);
+  void WriteUniform(Render::UniformBufferView&   ubo,
+                    const Graphics::UniformInfo& uniformInfo,
+                    const void*                  data,
+                    uint32_t                     size);
+
+  [[nodiscard]] FaceCullingMode::Type GetFaceCullMode() const
+  {
+    return mFaceCullingMode;
+  }
+
+  /**
+   * @brief Gets update area after visual properties applied.
+   *
+   * @param[in] bufferIndex The index of the previous update buffer.
+   * @param[in] originalUpdateArea The original update area before apply the visual properties.
+   *
+   * @return The recalculated update area after visual properties applied.
+   */
+  Vector4 GetVisualTransformedUpdateArea(BufferIndex bufferIndex, const Vector4& originalUpdateArea) const noexcept;
 
 private:
   struct UniformIndexMap;
@@ -427,46 +509,62 @@ private:
   Renderer& operator=(const Renderer& rhs);
 
   /**
-   * Sets blending options
-   * @param context to use
-   * @param blend Wheter blending should be enabled or not
-   */
-  void SetBlending(Context& context, bool blend);
-
-  /**
    * Builds a uniform map based on the index of the cached location in the Program.
    * @param[in] bufferIndex The index of the previous update buffer.
    * @param[in] node The node using the renderer
    * @param[in] size The size of the renderer
    * @param[in] program The shader program on which to set the uniforms.
+   *
+   * @return the index of the node in change counters store / uniform maps store.
    */
-  void BuildUniformIndexMap(BufferIndex bufferIndex, const SceneGraph::NodeDataProvider& node, const Vector3& size, Program& program);
-
-  /**
-   * Set the program uniform in the map from the mapped property
-   * @param[in] bufferIndex The index of the previous update buffer.
-   * @param[in] program The shader program
-   * @param[in] map The uniform
-   */
-  void SetUniformFromProperty(BufferIndex bufferIndex, Program& program, UniformIndexMap& map);
+  std::size_t BuildUniformIndexMap(BufferIndex bufferIndex, const SceneGraph::NodeDataProvider& node, const Vector3& size, Program& program);
 
   /**
    * Bind the textures and setup the samplers
-   * @param[in] context The GL context
-   * @param[in] program The shader program
+   * @param[in] commandBuffer The command buffer to record binding into
    * @param[in] boundTextures The textures bound for rendering
-   * @return False if create or bind failed, true if success.
    */
-  bool BindTextures(Program& program, Graphics::CommandBuffer& commandBuffer, Vector<Graphics::Texture*>& boundTextures);
+  void BindTextures(Graphics::CommandBuffer& commandBuffer, Vector<Graphics::Texture*>& boundTextures);
 
   /**
-   * Prepare a pipeline for this renderer
+   * Prepare a pipeline for this renderer.
+   *
+   * As a renderer can be re-used in a single frame (e.g. being used by multiple nodes, or
+   * by non-exclusive render tasks), we store a pipeline per node/instruction.
+   * In practice, the implementation will cached pipelines, so we normally only have
+   * multiple handles.
    */
-  Graphics::UniquePtr<Graphics::Pipeline> PrepareGraphicsPipeline(
+  Graphics::Pipeline& PrepareGraphicsPipeline(
     Program&                                             program,
     const Dali::Internal::SceneGraph::RenderInstruction& instruction,
-    bool                                                 blend,
-    Graphics::UniquePtr<Graphics::Pipeline>&&            oldPipeline);
+    const SceneGraph::NodeDataProvider&                  node,
+    bool                                                 blend);
+
+  /**
+   * Setup and write data to the uniform buffer
+   *
+   * @param[in] bufferIndex The current buffer index
+   * @param[in] commandBuffer The command buffer to bind the uniform buffer to
+   * @param[in] node The node using this renderer
+   * @param[in] modelViewMatrix The model-view matrix.
+   * @param[in] viewMatrix The view matrix.
+   * @param[in] projectionMatrix The projection matrix.
+   * @param[in] size Size of the render item
+   * @param[in] blend If true, blending is enabled
+   * @param[in] instruction The render instruction
+   * @param[in] The node index
+   */
+  void WriteUniformBuffer(BufferIndex                          bufferIndex,
+                          Graphics::CommandBuffer&             commandBuffer,
+                          Program*                             program,
+                          const SceneGraph::RenderInstruction& instruction,
+                          const SceneGraph::NodeDataProvider&  node,
+                          const Matrix&                        modelMatrix,
+                          const Matrix&                        modelViewMatrix,
+                          const Matrix&                        viewMatrix,
+                          const Matrix&                        projectionMatrix,
+                          const Vector3&                       size,
+                          std::size_t                          nodeIndex);
 
   /**
    * @brief Fill uniform buffer at index. Writes uniforms into given memory address
@@ -477,48 +575,46 @@ private:
    * @param[out] offset output offset of the next uniform buffer memory address
    * @param[in] updateBufferIndex update buffer index
    */
-  void FillUniformBuffers(Program&                                      program,
-                          const SceneGraph::RenderInstruction&          instruction,
-                          Render::UniformBuffer&                        ubo,
-                          std::vector<Graphics::UniformBufferBinding>*& outBindings,
-                          uint32_t&                                     offset,
-                          BufferIndex                                   updateBufferIndex);
+  void FillUniformBuffer(Program&                                      program,
+                         const SceneGraph::RenderInstruction&          instruction,
+                         Render::UniformBufferView&                    ubo,
+                         std::vector<Graphics::UniformBufferBinding>*& outBindings,
+                         uint32_t&                                     offset,
+                         BufferIndex                                   updateBufferIndex,
+                         std::size_t                                   nodeIndex);
 
 private:
-  Graphics::Controller*                        mGraphicsController;
-  OwnerPointer<SceneGraph::RenderDataProvider> mRenderDataProvider;
+  Graphics::Controller*           mGraphicsController;
+  SceneGraph::RenderDataProvider* mRenderDataProvider;
 
-  Context*          mContext;
   Render::Geometry* mGeometry;
 
-  Graphics::UniquePtr<Graphics::CommandBuffer> mGraphicsCommandBuffer{};
-
   ProgramCache*        mProgramCache{nullptr};
   Render::ShaderCache* mShaderCache{nullptr};
 
   Render::UniformBufferManager*               mUniformBufferManager{};
   std::vector<Graphics::UniformBufferBinding> mUniformBufferBindings{};
 
-  Graphics::UniquePtr<Graphics::Pipeline> mGraphicsPipeline{}; ///< The graphics pipeline. (Cached implementation)
-  std::vector<Graphics::ShaderState>      mShaderStates{};
+  Render::PipelineCache* mPipelineCache{nullptr};
+  PipelineCacheL2*       mPipeline{nullptr};
+
+  using Hash = std::size_t;
+
+  typedef const float& (PropertyInputImpl::*FuncGetter)(BufferIndex) const;
 
-  using Hash = unsigned long;
   struct UniformIndexMap
   {
-    uint32_t                 uniformIndex;  ///< The index of the cached location in the Program
-    ConstString              uniformName;   ///< The uniform name
-    const PropertyInputImpl* propertyValue; ///< The property value
+    ConstString              uniformName;            ///< The uniform name
+    const PropertyInputImpl* propertyValue{nullptr}; ///< The property value
     Hash                     uniformNameHash{0u};
     Hash                     uniformNameHashNoArray{0u};
-    int32_t                  arrayIndex; ///< The array index
-  };
-
-  using UniformIndexMappings = Dali::Vector<UniformIndexMap>;
-
-  UniformIndexMappings mUniformIndexMap;
-  Vector<int32_t>      mAttributeLocations;
+    int32_t                  arrayIndex{-1}; ///< The array index
 
-  uint64_t mUniformsHash;
+    int16_t    uniformLocation{0u};
+    uint16_t   uniformOffset{0u};
+    uint16_t   uniformSize{0u};
+    FuncGetter uniformFunc{0};
+  };
 
   StencilParameters mStencilParameters; ///< Struct containing all stencil related options
   BlendingOptions   mBlendingOptions;   ///< Blending options including blend color, blend func and blend equation
@@ -526,25 +622,30 @@ private:
   uint32_t mIndexedDrawFirstElement;  ///< Offset of first element to draw
   uint32_t mIndexedDrawElementsCount; ///< Number of elements to draw
 
-  DepthFunction::Type   mDepthFunction : 4;            ///< The depth function
-  FaceCullingMode::Type mFaceCullingMode : 3;          ///< The mode of face culling
-  DepthWriteMode::Type  mDepthWriteMode : 3;           ///< The depth write mode
-  DepthTestMode::Type   mDepthTestMode : 3;            ///< The depth test mode
-  bool                  mUpdateAttributeLocations : 1; ///< Indicates attribute locations have changed
-  bool                  mPremultipledAlphaEnabled : 1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
-  bool                  mShaderChanged : 1;            ///< Flag indicating the shader changed and uniform maps have to be updated
-  bool                  mUpdated : 1;
-
-  std::vector<Dali::DevelRenderer::DrawCommand> mDrawCommands; // Devel stuff
-
-  struct LegacyProgram : Graphics::ExtensionCreateInfo
+  /** Struct to map node to index into mNodeMapCounters and mUniformIndexMaps */
+  struct RenderItemLookup
   {
-    uint32_t programId{0};
+    const SceneGraph::NodeDataProvider* node{nullptr}; ///<Node key. It can be nullptr if this NodeIndex don't need node uniform
+
+    std::size_t index{0};                       ///<Index into mUniformIndexMap
+    std::size_t nodeChangeCounter{0};           ///<The last known change counter for this node's uniform map
+    std::size_t renderItemMapChangeCounter{0u}; ///< Change counter of the renderer & shader collected uniform map for this render item (node/renderer pair)
   };
+  std::vector<RenderItemLookup> mNodeIndexMap; ///< usually only 1 element.
+  using UniformIndexMappings = std::vector<UniformIndexMap>;
+  std::vector<UniformIndexMappings> mUniformIndexMaps; ///< Cached map per node/renderer/shader.
 
-  LegacyProgram mLegacyProgram; ///< The structure to pass the program ID into Graphics::PipelineCreateInfo
+  DepthFunction::Type   mDepthFunction : 4;             ///< The depth function
+  FaceCullingMode::Type mFaceCullingMode : 3;           ///< The mode of face culling
+  DepthWriteMode::Type  mDepthWriteMode : 3;            ///< The depth write mode
+  DepthTestMode::Type   mDepthTestMode : 3;             ///< The depth test mode
+  bool                  mPremultipliedAlphaEnabled : 1; ///< Flag indicating whether the Pre-multiplied Alpha Blending is required
+  bool                  mShaderChanged : 1;             ///< Flag indicating the shader changed and uniform maps have to be updated
 
-  Graphics::UniquePtr<Render::UniformBuffer> mUniformBuffer[2]{nullptr, nullptr}; ///< The double-buffered uniform buffer
+  std::vector<Dali::DevelRenderer::DrawCommand> mDrawCommands; // Devel stuff
+  RenderCallback*                               mRenderCallback{nullptr};
+  std::unique_ptr<RenderCallbackInput>          mRenderCallbackInput{nullptr};
+  std::vector<Graphics::Texture*>               mRenderCallbackTextureBindings{};
 };
 
 } // namespace Render