From c1f50cdbb630568abf5bb31a7e6c2531472b98ae Mon Sep 17 00:00:00 2001 From: David Steele Date: Fri, 26 Feb 2021 17:27:28 +0000 Subject: [PATCH] Test Harness updates Change-Id: I1e5f5b39ed2e6f26af1288ef029bca6467ed030c --- .../src/dali-adaptor-internal/CMakeLists.txt | 3 +- automated-tests/src/dali-adaptor/CMakeLists.txt | 3 +- .../dali-test-suite-utils/mesh-builder.cpp | 42 +++++++++++++ .../dali-test-suite-utils/mesh-builder.h | 14 +++-- .../test-graphics-controller.cpp | 69 +++++++++++----------- .../test-graphics-controller.h | 2 +- .../dali-test-suite-utils/test-graphics-pipeline.h | 16 +++++ .../test-graphics-program.cpp | 11 +++- .../dali-test-suite-utils/test-graphics-program.h | 3 + .../test-graphics-reflection.cpp | 37 +++++++++++- .../test-graphics-reflection.h | 16 ++++- .../dali-test-suite-utils/test-graphics-shader.cpp | 27 +++++++++ .../dali-test-suite-utils/test-graphics-shader.h | 38 ++++++++++++ automated-tests/src/dali-graphics/CMakeLists.txt | 3 +- .../src/dali-platform-abstraction/CMakeLists.txt | 3 +- 15 files changed, 238 insertions(+), 49 deletions(-) create mode 100644 automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp create mode 100644 automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.h diff --git a/automated-tests/src/dali-adaptor-internal/CMakeLists.txt b/automated-tests/src/dali-adaptor-internal/CMakeLists.txt index 7f3a34c..08169fd 100644 --- a/automated-tests/src/dali-adaptor-internal/CMakeLists.txt +++ b/automated-tests/src/dali-adaptor-internal/CMakeLists.txt @@ -34,9 +34,10 @@ LIST(APPEND TC_SOURCES ../dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-texture.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp - ../dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-sampler.cpp + ../dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp + ../dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp diff --git a/automated-tests/src/dali-adaptor/CMakeLists.txt b/automated-tests/src/dali-adaptor/CMakeLists.txt index 1039a3f..df77d7f 100644 --- a/automated-tests/src/dali-adaptor/CMakeLists.txt +++ b/automated-tests/src/dali-adaptor/CMakeLists.txt @@ -32,10 +32,11 @@ LIST(APPEND TC_SOURCES dali-test-suite-utils/test-graphics-command-buffer.cpp dali-test-suite-utils/test-graphics-controller.cpp dali-test-suite-utils/test-graphics-pipeline.cpp - dali-test-suite-utils/test-graphics-program.cpp dali-test-suite-utils/test-graphics-reflection.cpp dali-test-suite-utils/test-graphics-texture.cpp dali-test-suite-utils/test-graphics-sampler.cpp + dali-test-suite-utils/test-graphics-shader.cpp + dali-test-suite-utils/test-graphics-program.cpp dali-test-suite-utils/test-native-image.cpp dali-test-suite-utils/test-platform-abstraction.cpp dali-test-suite-utils/test-render-controller.cpp diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.cpp index e678074..3a4e127 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.cpp @@ -72,4 +72,46 @@ Geometry CreateQuadGeometry(void) return geometry; } +Property::Map CreateModelVertexFormat() +{ + Property::Map modelVF; + modelVF["aPosition"] = Property::VECTOR3; + modelVF["aNormal"] = Property::VECTOR3; + modelVF["aTexCoord1"] = Property::VECTOR3; + modelVF["aTexCoord2"] = Property::VECTOR3; + modelVF["aBoneIndex[0]"] = Property::INTEGER; + modelVF["aBoneIndex[1]"] = Property::INTEGER; + modelVF["aBoneIndex[2]"] = Property::INTEGER; + modelVF["aBoneIndex[3]"] = Property::INTEGER; + modelVF["aBoneWeights[0]"] = Property::FLOAT; + modelVF["aBoneWeights[1]"] = Property::FLOAT; + modelVF["aBoneWeights[2]"] = Property::FLOAT; + modelVF["aBoneWeights[3]"] = Property::FLOAT; + return modelVF; +} + +Geometry CreateModelGeometry(Property::Map& vf) +{ + VertexBuffer vertexData = VertexBuffer::New(vf); + + struct Vertex + { + Vector3 position; + Vector3 diffuseTexCoords; + Vector3 metalRoughTexCoords; + int boneIndices[4]; + float boneWeights[4]; + }; + + Vertex verts[30]; + vertexData.SetData(verts, 30); + unsigned short indexData[40]; + + Geometry geometry = Geometry::New(); + geometry.AddVertexBuffer(vertexData); + geometry.SetIndexBuffer(indexData, sizeof(indexData) / sizeof(indexData[0])); + + return geometry; +} + } // namespace Dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.h index d5c61b0..adcf78e 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/mesh-builder.h @@ -2,7 +2,7 @@ #define MESH_BUILDER_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -23,11 +23,13 @@ namespace Dali { -Shader CreateShader(); -TextureSet CreateTextureSet(); -TextureSet CreateTextureSet(Texture texture); -Geometry CreateQuadGeometry(); -VertexBuffer CreateVertexBuffer(); +Shader CreateShader(); +TextureSet CreateTextureSet(); +TextureSet CreateTextureSet(Texture texture); +Geometry CreateQuadGeometry(); +Geometry CreateModelGeometry(Property::Map& vf); +VertexBuffer CreateVertexBuffer(); +Property::Map CreateModelVertexFormat(); } // namespace Dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp index 45fbfa3..adacc11 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.cpp @@ -18,9 +18,9 @@ #include "test-graphics-buffer.h" #include "test-graphics-command-buffer.h" -#include "test-graphics-program.h" #include "test-graphics-reflection.h" #include "test-graphics-sampler.h" +#include "test-graphics-shader.h" #include "test-graphics-texture.h" #include @@ -445,7 +445,9 @@ void TestGraphicsController::SubmitCommandBuffers(const Graphics::SubmitInfo& su namedParams["submitInfo"] << "cmdBuffer[" << submitInfo.cmdBuffer.size() << "], flags:" << std::hex << submitInfo.flags; - mCallStack.PushCall("Controller::SubmitCommandBuffers", "", namedParams); + mCallStack.PushCall("SubmitCommandBuffers", "", namedParams); + + mSubmitStack.emplace_back(submitInfo); for(auto& graphicsCommandBuffer : submitInfo.cmdBuffer) { @@ -577,7 +579,7 @@ void TestGraphicsController::PresentRenderTarget(Graphics::RenderTarget* renderT { TraceCallStack::NamedParams namedParams; namedParams["renderTarget"] << std::hex << renderTarget; - mCallStack.PushCall("Controller::PresentRenderTarget", "", namedParams); + mCallStack.PushCall("PresentRenderTarget", "", namedParams); } /** @@ -585,7 +587,7 @@ void TestGraphicsController::PresentRenderTarget(Graphics::RenderTarget* renderT */ void TestGraphicsController::WaitIdle() { - mCallStack.PushCall("Controller::WaitIdle", ""); + mCallStack.PushCall("WaitIdle", ""); } /** @@ -593,7 +595,7 @@ void TestGraphicsController::WaitIdle() */ void TestGraphicsController::Pause() { - mCallStack.PushCall("Controller::Pause", ""); + mCallStack.PushCall("Pause", ""); } /** @@ -601,7 +603,7 @@ void TestGraphicsController::Pause() */ void TestGraphicsController::Resume() { - mCallStack.PushCall("Controller::Resume", ""); + mCallStack.PushCall("Resume", ""); } void TestGraphicsController::UpdateTextures(const std::vector& updateInfoList, @@ -611,7 +613,7 @@ void TestGraphicsController::UpdateTextures(const std::vector TestGraphicsController::CreateBuffer(const { std::ostringstream oss; oss << "bufferCreateInfo:" << createInfo; - mCallStack.PushCall("Controller::CreateBuffer", oss.str()); + mCallStack.PushCall("CreateBuffer", oss.str()); return Graphics::MakeUnique(mCallStack, mGl, createInfo.size, createInfo.usage); } @@ -675,13 +677,13 @@ Graphics::UniquePtr TestGraphicsController::CreateComma { std::ostringstream oss; oss << "commandBufferCreateInfo:" << commandBufferCreateInfo; - mCallStack.PushCall("Controller::CreateCommandBuffer", oss.str()); + mCallStack.PushCall("CreateCommandBuffer", oss.str()); return Graphics::MakeUnique(mCommandBufferCallStack, mGl); } Graphics::UniquePtr TestGraphicsController::CreateRenderPass(const Graphics::RenderPassCreateInfo& renderPassCreateInfo, Graphics::UniquePtr&& oldRenderPass) { - mCallStack.PushCall("Controller::CreateRenderPass", ""); + mCallStack.PushCall("CreateRenderPass", ""); return nullptr; } @@ -689,20 +691,20 @@ Graphics::UniquePtr TestGraphicsController::CreateTexture(con { TraceCallStack::NamedParams namedParams; namedParams["textureCreateInfo"] << textureCreateInfo; - mCallStack.PushCall("Controller::CreateTexture", namedParams.str(), namedParams); + mCallStack.PushCall("CreateTexture", namedParams.str(), namedParams); return Graphics::MakeUnique(mGl, textureCreateInfo); } Graphics::UniquePtr TestGraphicsController::CreateFramebuffer(const Graphics::FramebufferCreateInfo& framebufferCreateInfo, Graphics::UniquePtr&& oldFramebuffer) { - mCallStack.PushCall("Controller::CreateFramebuffer", ""); + mCallStack.PushCall("CreateFramebuffer", ""); return nullptr; } Graphics::UniquePtr TestGraphicsController::CreatePipeline(const Graphics::PipelineCreateInfo& pipelineCreateInfo, Graphics::UniquePtr&& oldPipeline) { - mCallStack.PushCall("Controller::CreatePipeline", ""); + mCallStack.PushCall("CreatePipeline", ""); return std::make_unique(mGl, pipelineCreateInfo); } @@ -714,28 +716,28 @@ Graphics::UniquePtr TestGraphicsController::CreateProgram(con Graphics::UniquePtr TestGraphicsController::CreateShader(const Graphics::ShaderCreateInfo& shaderCreateInfo, Graphics::UniquePtr&& oldShader) { - mCallStack.PushCall("Controller::CreateShader", ""); - return nullptr; + mCallStack.PushCall("CreateShader", ""); + return Graphics::MakeUnique(mGl, shaderCreateInfo); } Graphics::UniquePtr TestGraphicsController::CreateSampler(const Graphics::SamplerCreateInfo& samplerCreateInfo, Graphics::UniquePtr&& oldSampler) { TraceCallStack::NamedParams namedParams; namedParams["samplerCreateInfo"] << samplerCreateInfo; - mCallStack.PushCall("Controller::CreateSampler", namedParams.str(), namedParams); + mCallStack.PushCall("CreateSampler", namedParams.str(), namedParams); return Graphics::MakeUnique(mGl, samplerCreateInfo); } Graphics::UniquePtr TestGraphicsController::CreateRenderTarget(const Graphics::RenderTargetCreateInfo& renderTargetCreateInfo, Graphics::UniquePtr&& oldRenderTarget) { - mCallStack.PushCall("Controller::CreateRenderTarget", ""); + mCallStack.PushCall("CreateRenderTarget", ""); return nullptr; } Graphics::UniquePtr TestGraphicsController::MapBufferRange(const Graphics::MapBufferInfo& mapInfo) { - mCallStack.PushCall("Controller::MapBufferRange", ""); + mCallStack.PushCall("MapBufferRange", ""); auto buffer = static_cast(mapInfo.buffer); buffer->memory.resize(mapInfo.offset + mapInfo.size); // For initial testing, allow writes past capacity @@ -745,52 +747,53 @@ Graphics::UniquePtr TestGraphicsController::MapBufferRange(con Graphics::UniquePtr TestGraphicsController::MapTextureRange(const Graphics::MapTextureInfo& mapInfo) { - mCallStack.PushCall("Controller::MapTextureRange", ""); + mCallStack.PushCall("MapTextureRange", ""); return nullptr; } void TestGraphicsController::UnmapMemory(Graphics::UniquePtr memory) { - mCallStack.PushCall("Controller::UnmapMemory", ""); + mCallStack.PushCall("UnmapMemory", ""); } Graphics::MemoryRequirements TestGraphicsController::GetTextureMemoryRequirements(Graphics::Texture& texture) const { - mCallStack.PushCall("Controller::GetTextureMemoryRequirements", ""); + mCallStack.PushCall("GetTextureMemoryRequirements", ""); return Graphics::MemoryRequirements{}; } Graphics::MemoryRequirements TestGraphicsController::GetBufferMemoryRequirements(Graphics::Buffer& buffer) const { - mCallStack.PushCall("Controller::GetBufferMemoryRequirements", ""); + mCallStack.PushCall("GetBufferMemoryRequirements", ""); return Graphics::MemoryRequirements{}; } const Graphics::TextureProperties& TestGraphicsController::GetTextureProperties(const Graphics::Texture& texture) { static Graphics::TextureProperties textureProperties{}; - mCallStack.PushCall("Controller::GetTextureProperties", ""); + mCallStack.PushCall("GetTextureProperties", ""); return textureProperties; } const Graphics::Reflection& TestGraphicsController::GetProgramReflection(const Graphics::Program& program) { - mCallStack.PushCall("Controller::GetProgramReflection", ""); + mCallStack.PushCall("GetProgramReflection", ""); return static_cast(&program)->GetReflection(); } bool TestGraphicsController::PipelineEquals(const Graphics::Pipeline& pipeline0, const Graphics::Pipeline& pipeline1) const { - mCallStack.PushCall("Controller::PipelineEquals", ""); + mCallStack.PushCall("PipelineEquals", ""); return false; } -bool TestGraphicsController::GetProgramParameter(Graphics::Program& program, uint32_t parameterId, void* outData) +bool TestGraphicsController::GetProgramParameter(Graphics::Program& program, uint32_t parameterId, void* outData ) { - mCallStack.PushCall("Controller::GetProgramParameter", ""); - return false; + mCallStack.PushCall("GetProgramParameter", ""); + auto graphicsProgram = Uncast(&program); + return graphicsProgram->GetParameter(parameterId, outData); } } // namespace Dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h index 2ee3de4..9179a39 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-controller.h @@ -313,7 +313,7 @@ public: // Test Functions * @param[out] outData Pointer to output memory * @return True on success */ - bool GetProgramParameter(Graphics::Program& program, uint32_t parameterId, void* outData) override; + bool GetProgramParameter(Graphics::Program& program, uint32_t parameterId, void* outData ) override; public: mutable TraceCallStack mCallStack; diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h index dc3a58d..a748e71 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.h @@ -20,14 +20,30 @@ #include #include #include "test-gl-abstraction.h" +#include "test-graphics-program.h" +#include "test-graphics-reflection.h" namespace Dali { +class TestGraphicsReflection; + +template +T* Uncast(const Graphics::Program* object) +{ + return const_cast(static_cast(object)); +} + class TestGraphicsPipeline : public Graphics::Pipeline { public: TestGraphicsPipeline(TestGlAbstraction& gl, const Graphics::PipelineCreateInfo& createInfo); + const TestGraphicsReflection& GetReflection() const + { + return Uncast(programState.program)->GetReflection(); + } + +public: TestGlAbstraction& mGl; Graphics::ColorBlendState colorBlendState; diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp index 5b8c02c..1b23380 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp @@ -21,8 +21,17 @@ namespace Dali TestGraphicsProgram::TestGraphicsProgram(TestGlAbstraction& gl, const Graphics::ProgramCreateInfo& createInfo, Property::Array& vertexFormats) : mGl(gl), mCreateInfo(createInfo), - mReflection(gl) + mReflection(gl, vertexFormats) { + mId = 0;//mGl.CreateProgram(); } +bool TestGraphicsProgram::GetParameter(uint32_t parameterId, void* outData ) +{ + reinterpret_cast(outData)[0] = mId; + return true; +} + + + } // namespace Dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.h index 2bd04de..d5f5b85 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-program.h @@ -42,8 +42,11 @@ public: return mReflection; } + bool GetParameter(uint32_t parameterId, void* outData ); + public: TestGlAbstraction& mGl; + uint32_t mId; Graphics::ProgramCreateInfo mCreateInfo; TestGraphicsReflection mReflection; }; diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp index 9bce79a..c9ef2d0 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp @@ -15,16 +15,44 @@ */ #include "test-graphics-reflection.h" +#include namespace Dali { -TestGraphicsReflection::TestGraphicsReflection(TestGlAbstraction& gl) +TestGraphicsReflection::TestGraphicsReflection(TestGlAbstraction& gl, Property::Array& vfs) : mGl(gl) { + for(Property::Array::SizeType i = 0; i < vfs.Count(); ++i) + { + Property::Map* vertexFormat = vfs[i].GetMap(); + if(vertexFormat) + { + for(Property::Map::SizeType j = 0; j < vertexFormat->Count(); ++j) + { + auto key = vertexFormat->GetKeyAt(j); + if(key.type == Property::Key::STRING) + { + mAttributes.push_back(key.stringKey); + } + } + } + } } uint32_t TestGraphicsReflection::GetVertexAttributeLocation(const std::string& name) const { + // Automatically assign locations to named attributes when requested + auto iter = std::find(mAttributes.begin(), mAttributes.end(), name); + if(iter != mAttributes.end()) + { + return iter - mAttributes.begin(); + } + else + { + uint32_t location = mAttributes.size(); + mAttributes.push_back(name); + return location; + } return 0u; } @@ -40,7 +68,12 @@ std::string TestGraphicsReflection::GetVertexAttributeName(uint32_t location) co std::vector TestGraphicsReflection::GetVertexAttributeLocations() const { - return std::vector{}; + std::vector locs; + for(uint32_t i = 0; i < mAttributes.size(); ++i) + { + locs.push_back(i); + } + return locs; } uint32_t TestGraphicsReflection::GetUniformBlockCount() const diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.h index 1c9f62b..9311e07 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-reflection.h @@ -25,7 +25,7 @@ namespace Dali class TestGraphicsReflection : public Graphics::Reflection { public: - TestGraphicsReflection(TestGlAbstraction& gl); + TestGraphicsReflection(TestGlAbstraction& gl, Property::Array& vertexFormats); uint32_t GetVertexAttributeLocation(const std::string& name) const override; Dali::Graphics::VertexInputAttributeFormat GetVertexAttributeFormat(uint32_t location) const override; @@ -44,7 +44,19 @@ public: std::vector GetSamplers() const override; Graphics::ShaderLanguage GetLanguage() const override; - TestGlAbstraction& mGl; +public: // Test methods + void SetAttributes(std::vector locations) + { + mAttributes.clear(); + mAttributes.resize(locations.size()); + for(auto& location : locations) + { + mAttributes.push_back(location); + } + } + + TestGlAbstraction& mGl; + mutable std::vector mAttributes; }; } // namespace Dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp new file mode 100644 index 0000000..db2d1a2 --- /dev/null +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2021 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "test-graphics-shader.h" + +namespace Dali +{ +TestGraphicsShader::TestGraphicsShader(TestGlAbstraction& gl, const Graphics::ShaderCreateInfo& createInfo) +: mGl(gl), + mCreateInfo(createInfo) +{ +} + +} // namespace Dali diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.h new file mode 100644 index 0000000..ad6f9c5 --- /dev/null +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-shader.h @@ -0,0 +1,38 @@ +#ifndef DALI_TEST_GRAPHICS_SHADER_H +#define DALI_TEST_GRAPHICS_SHADER_H + +/* + * Copyright (c) 2021 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include "test-gl-abstraction.h" + +namespace Dali +{ +class TestGraphicsShader : public Graphics::Shader +{ +public: + TestGraphicsShader(TestGlAbstraction& gl, const Graphics::ShaderCreateInfo& createInfo); + +public: + TestGlAbstraction& mGl; + Graphics::ShaderCreateInfo mCreateInfo; +}; + +} // namespace Dali + +#endif //DALI_TEST_GRAPHICS_SHADER_H diff --git a/automated-tests/src/dali-graphics/CMakeLists.txt b/automated-tests/src/dali-graphics/CMakeLists.txt index 8e0a197..6f09a9d 100644 --- a/automated-tests/src/dali-graphics/CMakeLists.txt +++ b/automated-tests/src/dali-graphics/CMakeLists.txt @@ -20,8 +20,9 @@ LIST(APPEND TC_SOURCES ../dali-adaptor/dali-test-suite-utils/test-graphics-texture.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-sampler.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp - ../dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp + ../dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp + ../dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp diff --git a/automated-tests/src/dali-platform-abstraction/CMakeLists.txt b/automated-tests/src/dali-platform-abstraction/CMakeLists.txt index 2335408..531ce4c 100644 --- a/automated-tests/src/dali-platform-abstraction/CMakeLists.txt +++ b/automated-tests/src/dali-platform-abstraction/CMakeLists.txt @@ -23,8 +23,9 @@ LIST(APPEND TC_SOURCES ../dali-adaptor/dali-test-suite-utils/test-graphics-texture.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-sampler.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-pipeline.cpp - ../dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp ../dali-adaptor/dali-test-suite-utils/test-graphics-reflection.cpp + ../dali-adaptor/dali-test-suite-utils/test-graphics-shader.cpp + ../dali-adaptor/dali-test-suite-utils/test-graphics-program.cpp ../dali-adaptor/dali-test-suite-utils/test-native-image.cpp ../dali-adaptor/dali-test-suite-utils/test-platform-abstraction.cpp ../dali-adaptor/dali-test-suite-utils/test-render-controller.cpp -- 2.7.4