/**
* @project: orhi (OpenRHI)
* @author: Adrien Givry
* @licence: MIT
*/

#pragma once

#include <orhi/utils/BitmaskOperators.h>

#include <cstdint>

namespace orhi::types
{
	/**
	* @brief Buffer usage flags enumeration
	* 
	* Defines how a buffer will be used during its lifetime, including
	* vertex data, index data, uniform data, storage operations, and
	* transfer operations. Multiple flags can be combined using bitwise OR.
	*/
	enum class EBufferUsageFlags : uint32_t
	{
		NONE = 0,
		TRANSFER_SRC_BIT = 0x00000001,
		TRANSFER_DST_BIT = 0x00000002,
		UNIFORM_TEXEL_BUFFER_BIT = 0x00000004,
		STORAGE_TEXEL_BUFFER_BIT = 0x00000008,
		UNIFORM_BUFFER_BIT = 0x00000010,
		STORAGE_BUFFER_BIT = 0x00000020,
		INDEX_BUFFER_BIT = 0x00000040,
		VERTEX_BUFFER_BIT = 0x00000080,
		INDIRECT_BUFFER_BIT = 0x00000100,
		SHADER_DEVICE_ADDRESS_BIT = 0x00020000,
		VIDEO_DECODE_SRC_BIT_KHR = 0x00002000,
		VIDEO_DECODE_DST_BIT_KHR = 0x00004000,
		TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800,
		TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000,
		CONDITIONAL_RENDERING_BIT_EXT = 0x00000200,
		ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000,
		ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000,
		SHADER_BINDING_TABLE_BIT_KHR = 0x00000400,
		VIDEO_ENCODE_DST_BIT_KHR = 0x00008000,
		VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000,
		SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000,
		RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000,
		PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000,
		MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000,
		MICROMAP_STORAGE_BIT_EXT = 0x01000000,
		TILE_MEMORY_QCOM = 0x08000000,
		RAY_TRACING_BIT_NV = SHADER_BINDING_TABLE_BIT_KHR,
		SHADER_DEVICE_ADDRESS_BIT_EXT = SHADER_DEVICE_ADDRESS_BIT,
		SHADER_DEVICE_ADDRESS_BIT_KHR = SHADER_DEVICE_ADDRESS_BIT,
		ALL = ~NONE,
	};
}

ENABLE_BITMASK_OPERATORS(orhi::types::EBufferUsageFlags);
