1 #ifndef DALI_TEST_GRAPHICS_COMMAND_BUFFER_H
2 #define DALI_TEST_GRAPHICS_COMMAND_BUFFER_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <dali/graphics-api/graphics-command-buffer-create-info.h>
21 #include <dali/graphics-api/graphics-command-buffer.h>
22 #include <dali/graphics-api/graphics-types.h>
25 #include "test-gl-abstraction.h"
26 #include "test-trace-call-stack.h"
30 class TestGraphicsCommandBuffer : public Graphics::CommandBuffer
33 TestGraphicsCommandBuffer(TraceCallStack& callstack, TestGlAbstraction& glAbstraction);
35 void BindVertexBuffers(uint32_t firstBinding,
36 std::vector<const Graphics::Buffer*> buffers,
37 std::vector<uint32_t> offsets);
39 void BindUniformBuffers(const std::vector<Graphics::UniformBufferBinding>& bindings);
41 void BindPipeline(const Graphics::Pipeline& pipeline);
43 void BindTextures(std::vector<Graphics::TextureBinding>& textureBindings);
45 void BindSamplers(std::vector<Graphics::SamplerBinding>& samplerBindings);
47 void BindPushConstants(void* data,
51 void BindIndexBuffer(const Graphics::Buffer& buffer,
53 Graphics::Format format);
55 void BeginRenderPass(Graphics::RenderPass& renderPass,
56 Graphics::RenderTarget& renderTarget,
57 Graphics::Extent2D renderArea,
58 std::vector<Graphics::ClearValue> clearValues);
64 uint32_t instanceCount,
66 uint32_t firstInstance);
70 uint32_t instanceCount,
73 uint32_t firstInstance);
75 void DrawIndexedIndirect(
76 Graphics::Buffer& buffer,
81 void Reset(Graphics::CommandBuffer& commandBuffer);
83 void SetScissor(Graphics::Extent2D value);
85 void SetScissorTestEnable(bool value);
87 void SetViewport(Graphics::Viewport value);
89 void SetViewportEnable(bool value);
92 TraceCallStack mCallStack;
93 TestGlAbstraction& mGlAbstraction;
95 std::vector<Graphics::TextureBinding> mTextureBindings;
100 #endif //DALI_TEST_GRAPHICS_COMMAND_BUFFER_H