Updated test files to match dali-core
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / test-graphics-command-buffer.cpp
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include "test-graphics-command-buffer.h"
18
19 namespace Dali
20 {
21 TestGraphicsCommandBuffer::TestGraphicsCommandBuffer(TraceCallStack& callstack, TestGlAbstraction& glAbstraction)
22 : mCallStack(callstack),
23   mGlAbstraction(glAbstraction)
24 {
25 }
26
27 void TestGraphicsCommandBuffer::BindVertexBuffers(uint32_t                             firstBinding,
28                                                   std::vector<const Graphics::Buffer*> buffers,
29                                                   std::vector<uint32_t>                offsets)
30 {
31   mCallStack.PushCall("BindVertexBuffers", "");
32 }
33
34 void TestGraphicsCommandBuffer::BindUniformBuffers(const std::vector<Graphics::UniformBufferBinding>& bindings)
35 {
36   mCallStack.PushCall("BindUniformBuffers", "");
37 }
38
39 void TestGraphicsCommandBuffer::BindPipeline(const Graphics::Pipeline& pipeline)
40 {
41   mCallStack.PushCall("BindPipeline", "");
42 }
43
44 void TestGraphicsCommandBuffer::BindTextures(std::vector<Graphics::TextureBinding>& textureBindings)
45 {
46   mCallStack.PushCall("BindTextures", "");
47   for(auto& binding : textureBindings)
48   {
49     mTextureBindings.push_back(binding);
50   }
51 }
52
53 void TestGraphicsCommandBuffer::BindSamplers(std::vector<Graphics::SamplerBinding>& samplerBindings)
54 {
55   mCallStack.PushCall("BindSamplers", "");
56 }
57
58 void TestGraphicsCommandBuffer::BindPushConstants(void*    data,
59                                                   uint32_t size,
60                                                   uint32_t binding)
61 {
62   mCallStack.PushCall("BindPushConstants", "");
63 }
64
65 void TestGraphicsCommandBuffer::BindIndexBuffer(const Graphics::Buffer& buffer,
66                                                 uint32_t                offset,
67                                                 Graphics::Format        format)
68 {
69   mCallStack.PushCall("BindIndexBuffer", "");
70 }
71
72 void TestGraphicsCommandBuffer::BeginRenderPass(
73   Graphics::RenderPass&             renderPass,
74   Graphics::RenderTarget&           renderTarget,
75   Graphics::Extent2D                renderArea,
76   std::vector<Graphics::ClearValue> clearValues)
77 {
78   mCallStack.PushCall("BeginRenderPass", "");
79 }
80
81 void TestGraphicsCommandBuffer::EndRenderPass()
82 {
83   mCallStack.PushCall("EndRenderPass", "");
84 }
85
86 void TestGraphicsCommandBuffer::Draw(
87   uint32_t vertexCount,
88   uint32_t instanceCount,
89   uint32_t firstVertex,
90   uint32_t firstInstance)
91 {
92   mCallStack.PushCall("Draw", "");
93 }
94
95 void TestGraphicsCommandBuffer::DrawIndexed(
96   uint32_t indexCount,
97   uint32_t instanceCount,
98   uint32_t firstIndex,
99   int32_t  vertexOffset,
100   uint32_t firstInstance)
101 {
102   mCallStack.PushCall("DrawIndexed", "");
103 }
104
105 void TestGraphicsCommandBuffer::DrawIndexedIndirect(
106   Graphics::Buffer& buffer,
107   uint32_t          offset,
108   uint32_t          drawCount,
109   uint32_t          stride)
110 {
111   mCallStack.PushCall("DrawIndexedIndirect", "");
112 }
113
114 void TestGraphicsCommandBuffer::Reset(Graphics::CommandBuffer& commandBuffer)
115 {
116   mCallStack.PushCall("Reset", "");
117 }
118
119 void TestGraphicsCommandBuffer::SetScissor(Graphics::Extent2D value)
120 {
121   mCallStack.PushCall("SetScissor", "");
122 }
123
124 void TestGraphicsCommandBuffer::SetScissorTestEnable(bool value)
125 {
126   mCallStack.PushCall("SetScissorTestEnable", "");
127 }
128
129 void TestGraphicsCommandBuffer::SetViewport(Graphics::Viewport value)
130 {
131   mCallStack.PushCall("SetViewport", "");
132 }
133
134 void TestGraphicsCommandBuffer::SetViewportEnable(bool value)
135 {
136   mCallStack.PushCall("SetViewportEnable", "");
137 }
138
139 } // namespace Dali