#define DALI_GRAPHICS_API_TYPES
/*
- * 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.
REVERSE_SUBTRACT = 2,
MIN = 3,
MAX = 4,
-};
+ MULTIPLY = 5,
+ SCREEN = 6,
+ OVERLAY = 7,
+ DARKEN = 8,
+ LIGHTEN = 9,
+ COLOR_DODGE = 10,
+ COLOR_BURN = 11,
+ HARD_LIGHT = 12,
+ SOFT_LIGHT = 13,
+ DIFFERENCE = 14,
+ EXCLUSION = 15,
+ HUE = 16,
+ SATURATION = 17,
+ COLOR = 18,
+ LUMINOSITY = 19,
+};
+
+const BlendOp ADVANCED_BLEND_OPTIONS_START(BlendOp::MULTIPLY);
/**
* @brief Compare operators
R64G64B64A64_UINT,
R64G64B64A64_SINT,
R64G64B64A64_SFLOAT,
+ R11G11B10_UFLOAT_PACK32,
B10G11R11_UFLOAT_PACK32,
E5B9G9R9_UFLOAT_PACK32,
D16_UNORM,
Extent2D srcExtent2D{};
uint32_t srcOffset{};
uint32_t srcSize{};
+ uint32_t srcStride{};
+ Format srcFormat{}; ///< Should match dstTexture's format, otherwise conversion may occur
};
/**
*/
struct DepthStencilAttachment
{
- // TODO:
- Texture* depthTexture;
- Texture* stencilTexture;
- uint32_t depthLevel;
- uint32_t stencilLevel;
+ enum class Usage
+ {
+ WRITE, // If no texture, will create a RenderBuffer instead
+ NONE // If no attachment/RenderBuffer required
+ };
+ Texture* depthTexture{nullptr};
+ Texture* stencilTexture{nullptr};
+ uint32_t depthLevel{0};
+ uint32_t stencilLevel{0};
+ Usage depthUsage{Usage::NONE};
+ Usage stencilUsage{Usage::NONE};
};
/**
SAMPLER_CREATE_INFO_STRUCT,
SHADER_CREATE_INFO_STRUCT,
TEXTURE_CREATE_INFO_STRUCT,
- RENDER_TARGET_CREATE_INFO_STRUCT
+ RENDER_TARGET_CREATE_INFO_STRUCT,
+ SYNC_OBJECT_CREATE_INFO_STRUCT
};
/**
*/
enum class AttachmentLoadOp
{
- LOAD, ///< Load previous content
- CLEAR, ///< Clear the attachment
+ LOAD, ///< Load previous content
+ CLEAR, ///< Clear the attachment
DONT_CARE ///< Let driver decide
};
*/
enum class AttachmentStoreOp
{
- STORE, ///< Store content (color attachemnts)
+ STORE, ///< Store content (color attachemnts)
DONT_CARE ///< Let driver decide (depth/stencil attachemnt with no intention of reading)
};
* @param value Load operation
* @return this structure
*/
- auto& SetLoadOp( AttachmentLoadOp value )
+ auto& SetLoadOp(AttachmentLoadOp value)
{
loadOp = value;
return *this;
* @param value Store operation
* @return this structure
*/
- auto& SetStoreOp( AttachmentStoreOp value )
+ auto& SetStoreOp(AttachmentStoreOp value)
{
storeOp = value;
return *this;
* @param value load operation
* @return this structure
*/
- auto& SetStencilLoadOp( AttachmentLoadOp value )
+ auto& SetStencilLoadOp(AttachmentLoadOp value)
{
stencilLoadOp = value;
return *this;
* @param value store operation
* @return this structure
*/
- auto& SetStencilStoreOp( AttachmentStoreOp value )
+ auto& SetStencilStoreOp(AttachmentStoreOp value)
{
stencilStoreOp = value;
return *this;
}
- AttachmentLoadOp loadOp{};
+ AttachmentLoadOp loadOp{};
AttachmentStoreOp storeOp{};
- AttachmentLoadOp stencilLoadOp{};
+ AttachmentLoadOp stencilLoadOp{};
AttachmentStoreOp stencilStoreOp{};
};
*/
enum class RenderTargetTransformFlagBits
{
- TRANSFORM_IDENTITY_BIT = 0x00000001,
- ROTATE_90_BIT = 0x00000002,
- ROTATE_180_BIT = 0x00000004,
- ROTATE_270_BIT = 0x00000008,
- HORIZONTAL_MIRROR_BIT = 0x00000010,
- HORIZONTAL_MIRROR_ROTATE_90_BIT = 0x00000020,
+ TRANSFORM_IDENTITY_BIT = 0x00000001,
+ ROTATE_90_BIT = 0x00000002,
+ ROTATE_180_BIT = 0x00000004,
+ ROTATE_270_BIT = 0x00000008,
+ HORIZONTAL_MIRROR_BIT = 0x00000010,
+ HORIZONTAL_MIRROR_ROTATE_90_BIT = 0x00000020,
HORIZONTAL_MIRROR_ROTATE_180_BIT = 0x00000040,
HORIZONTAL_MIRROR_ROTATE_270_BIT = 0x00000080,
};