#define DALI_GRAPHICS_GLES_COMMAND_BUFFER_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
SET_DEPTH_COMPARE_OP,
SET_DEPTH_TEST_ENABLE,
SET_DEPTH_WRITE_ENABLE,
+ DRAW_NATIVE,
};
/**
{
bool enabled;
} colorMask;
+
+ struct
+ {
+ DrawNativeInfo drawNativeInfo;
+ } drawNative;
};
};
/**
* @copydoc Dali::Graphics::CommandBuffer::BindVertexBuffers
*/
- void BindVertexBuffers(uint32_t firstBinding,
- std::vector<const Graphics::Buffer*> buffers,
- std::vector<uint32_t> offsets) override;
+ void BindVertexBuffers(uint32_t firstBinding,
+ const std::vector<const Graphics::Buffer*>& buffers,
+ const std::vector<uint32_t>& offsets) override;
/**
* @copydoc Dali::Graphics::CommandBuffer::BindUniformBuffers
/**
* @copydoc Dali::Graphics::CommandBuffer::BindTextures
*/
- void BindTextures(std::vector<TextureBinding>& textureBindings) override;
+ void BindTextures(const std::vector<TextureBinding>& textureBindings) override;
/**
* @copydoc Dali::Graphics::CommandBuffer::BindSamplers
*/
- void BindSamplers(std::vector<SamplerBinding>& samplerBindings) override;
+ void BindSamplers(const std::vector<SamplerBinding>& samplerBindings) override;
/**
* @copydoc Dali::Graphics::CommandBuffer::BindPushConstants
* @copydoc Dali::Graphics::CommandBuffer::BeginRenderPass
*/
void BeginRenderPass(
- Graphics::RenderPass* renderPass,
- Graphics::RenderTarget* renderTarget,
- Rect2D renderArea,
- std::vector<ClearValue> clearValues) override;
+ Graphics::RenderPass* renderPass,
+ Graphics::RenderTarget* renderTarget,
+ Rect2D renderArea,
+ const std::vector<ClearValue>& clearValues) override;
/**
* @copydoc Dali::Graphics::CommandBuffer::EndRenderPass
uint32_t stride) override;
/**
+ * @copydoc Dali::Graphics::CommandBuffer::DrawNative
+ */
+ void DrawNative(const DrawNativeInfo* drawNativeInfo) override;
+
+ /**
* @copydoc Dali::Graphics::CommandBuffer::Reset
*/
void Reset() override;
*/
void DiscardResource() override;
+ // Get the total memory usage of this command buffer
+ std::size_t GetCapacity();
+
private:
std::unique_ptr<CommandPool> mCommandPool; ///< Pool of commands and transient memory
};