#pragma once

#include <psemek/wgpu/detail/object.hpp>
#include <psemek/wgpu/bind_group_layout.hpp>
#include <psemek/wgpu/chained_struct.hpp>

#include <string>
#include <vector>

namespace psemek::wgpu
{

	struct pipeline_layout
		: detail::object<pipeline_layout>
	{
		using detail::object<pipeline_layout>::object;

		struct descriptor
		{
			std::vector<chained_struct> chain = {};
			std::string label = {};
			std::vector<bind_group_layout> layouts;
			std::uint32_t immediate_size = 0;
		};

		void set_label(std::string const & label);

		static void reference(void * ptr);
		static void release(void * ptr);

	private:
		explicit pipeline_layout(void * ptr)
			: detail::object<pipeline_layout>(ptr)
		{}

		friend struct device;
	};

}
