X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali%2Finternal%2Fgraphics%2Fgles-impl%2Fgles-graphics-reflection.h;h=06cfba15c296e878103eb4e8f2bb0739c81af81d;hb=104c70b668902c007f9f684ed4aa6b3673da073d;hp=b06fb2489b33359df768da59861989cf741c2a2f;hpb=d9d257d7707ecaaa1915365ed29fe27654280a01;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/graphics/gles-impl/gles-graphics-reflection.h b/dali/internal/graphics/gles-impl/gles-graphics-reflection.h index b06fb24..06cfba1 100644 --- a/dali/internal/graphics/gles-impl/gles-graphics-reflection.h +++ b/dali/internal/graphics/gles-impl/gles-graphics-reflection.h @@ -172,6 +172,13 @@ public: */ [[nodiscard]] bool GetNamedUniform(const std::string& name, Dali::Graphics::UniformInfo& out) const override; + /** + * @brief Gets the types of all the standalone uniforms within the default uniform block. + * + * @return A vector of uniform types sorted in the same order as the uniforms in the default uniform block. + */ + [[nodiscard]] std::vector GetStandaloneUniformTypes() const; + // Sampler /** @@ -179,7 +186,7 @@ public: * * @return A vector of the sampler uniforms */ - [[nodiscard]] std::vector GetSamplers() const override; + const std::vector& GetSamplers() const override; // Language @@ -192,6 +199,32 @@ public: public: /** + * @brief Extra information of uniform + */ + struct UniformExtraInfo + { + UniformExtraInfo(uint32_t location, uint32_t size, uint32_t offset, uint32_t arraySize, GLenum type) + : location(location), + size(size), + offset(offset), + 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 arraySize; ///< number of array elements (1 for non-arrays) + GLenum type; ///< type of uniform + }; + + /** + * @brief Returns array of additional info about standalone uniforms + * + * @return Array of internal uniform data + */ + [[nodiscard]] const std::vector& GetStandaloneUniformExtraInfo() const; + + /** * @brief Build the reflection of vertex attributes */ void BuildVertexAttributeReflection(); @@ -206,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; @@ -221,10 +259,11 @@ private: Dali::Graphics::VertexInputAttributeFormat format{}; }; - std::vector mVertexInputAttributes; ///< List of vertex attributes - Graphics::UniformBlockInfo mDefaultUniformBlock{}; ///< The emulated UBO containing all the standalone uniforms - std::vector mUniformOpaques{}; ///< List of opaque uniforms (i.e. samplers) - std::vector mUniformBlocks{}; ///< List of uniform blocks + std::vector mVertexInputAttributes; ///< List of vertex attributes + Graphics::UniformBlockInfo mDefaultUniformBlock{}; ///< The emulated UBO containing all the standalone uniforms + std::vector mUniformOpaques{}; ///< List of opaque uniforms (i.e. samplers) + std::vector mUniformBlocks{}; ///< List of uniform blocks + std::vector mStandaloneUniformExtraInfos; ///< List of extra information for standalone uniforms }; } // namespace GLES