Update common test harness files for shader reflection
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-reflection.h
1 #ifndef DALI_TEST_GRAPHICS_REFLECTION_H
2 #define DALI_TEST_GRAPHICS_REFLECTION_H
3
4 /*
5  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #include <dali/graphics-api/graphics-reflection.h>
21 #include "test-gl-abstraction.h"
22
23 namespace Dali
24 {
25 class TestGraphicsReflection : public Graphics::Reflection
26 {
27 public:
28   TestGraphicsReflection(TestGlAbstraction& gl);
29
30   uint32_t                                   GetVertexAttributeLocation(const std::string& name) const override;
31   Dali::Graphics::VertexInputAttributeFormat GetVertexAttributeFormat(uint32_t location) const override;
32   std::string                                GetVertexAttributeName(uint32_t location) const override;
33   std::vector<uint32_t>                      GetVertexAttributeLocations() const override;
34   uint32_t                                   GetUniformBlockCount() const override;
35   uint32_t                                   GetUniformBlockBinding(uint32_t index) const override;
36   uint32_t                                   GetUniformBlockSize(uint32_t index) const override;
37   bool                                       GetUniformBlock(uint32_t index, Dali::Graphics::UniformBlockInfo& out) const override;
38   std::vector<uint32_t>                      GetUniformBlockLocations() const override;
39   std::string                                GetUniformBlockName(uint32_t blockIndex) const override;
40   uint32_t                                   GetUniformBlockMemberCount(uint32_t blockIndex) const override;
41   std::string                                GetUniformBlockMemberName(uint32_t blockIndex, uint32_t memberLocation) const override;
42   uint32_t                                   GetUniformBlockMemberOffset(uint32_t blockIndex, uint32_t memberLocation) const override;
43   bool                                       GetNamedUniform(const std::string& name, Dali::Graphics::UniformInfo& out) const override;
44   std::vector<Dali::Graphics::UniformInfo>   GetSamplers() const override;
45   Graphics::ShaderLanguage                   GetLanguage() const override;
46
47   TestGlAbstraction& mGl;
48 };
49
50 } // namespace Dali
51
52 #endif //DALI_TEST_GRAPHICS_REFLECTION_H