#include <psemek/wgpu/compute_pipeline.hpp>
#include <psemek/wgpu/detail/string_view.hpp>
#include <psemek/wgpu/external/webgpu.h>

namespace psemek::wgpu
{

	bind_group_layout compute_pipeline::get_bind_group_layout(std::uint32_t index) const
	{
		return bind_group_layout(wgpuComputePipelineGetBindGroupLayout((WGPUComputePipeline)get(), index));
	}

	void compute_pipeline::set_label(std::string const & label)
	{
		wgpuComputePipelineSetLabel((WGPUComputePipeline)get(), detail::to_string_view(label));
	}

	void compute_pipeline::reference(void * ptr)
	{
		wgpuComputePipelineAddRef((WGPUComputePipeline)ptr);
	}

	void compute_pipeline::release(void * ptr)
	{
		wgpuComputePipelineRelease((WGPUComputePipeline)ptr);
	}

}
