byte-engine-ghi 0.1.0

Graphics hardware interface layer used by Byte-Engine.
use std::marker::PhantomData;

use utils::Extent;

use crate::{
	graphics_hardware_interface, AttachmentInformation, BaseBufferHandle, BufferCopyDescriptor, BufferDescriptor, BufferHandle,
	BufferImageCopyDescriptor, ClearValue, CommandBufferHandle, DescriptorSetHandle, DispatchExtent, FrameKey,
	ImageBufferCopyDescriptor, Layouts, MeshHandle, PipelineHandle, PresentKey, RGBAu8, SynchronizerHandle, TextureCopyHandle,
};

pub struct CommandBufferRecording<'a> {
	_command_buffer_handle: CommandBufferHandle,
	_frame_key: Option<FrameKey>,
	_marker: PhantomData<&'a super::Device>,
}

impl<'a> CommandBufferRecording<'a> {
	pub fn new(
		_device: &'a super::Device,
		command_buffer_handle: CommandBufferHandle,
		_buffer_copies: Vec<()>,
		_image_copies: Vec<()>,
		frame_key: Option<FrameKey>,
	) -> Self {
		Self {
			_command_buffer_handle: command_buffer_handle,
			_frame_key: frame_key,
			_marker: PhantomData,
		}
	}

	pub fn sync_buffers(&mut self) {}

	pub fn sync_textures(&mut self) {}

	pub fn build_top_level_acceleration_structure(
		&mut self,
		_acceleration_structure_build: &crate::rt::TopLevelAccelerationStructureBuild,
	) {
	}

	pub fn build_bottom_level_acceleration_structures(
		&mut self,
		_acceleration_structure_builds: &[crate::rt::BottomLevelAccelerationStructureBuild],
	) {
	}

	pub fn start_render_pass(&mut self, _extent: Extent, _attachments: &[AttachmentInformation]) -> &mut Self {
		self
	}

	pub fn clear_images(&mut self, _textures: &[(graphics_hardware_interface::BaseImageHandle, ClearValue)]) {}

	pub fn clear_buffers(&mut self, _buffer_handles: &[BaseBufferHandle]) {}

	pub fn copy_buffers(&mut self, _copies: &[BufferCopyDescriptor]) {}

	pub fn copy_buffer_to_images(&mut self, _copies: &[BufferImageCopyDescriptor]) {}

	pub fn copy_images_to_buffer(&mut self, _copies: &[ImageBufferCopyDescriptor]) {}

	pub fn sync_buffer(&mut self, _buffer_handle: impl Into<BaseBufferHandle>) {}

	pub fn transfer_textures(
		&mut self,
		_texture_handles: &[graphics_hardware_interface::BaseImageHandle],
	) -> Vec<TextureCopyHandle> {
		Vec::new()
	}

	pub fn write_image_data(&mut self, _image_handle: graphics_hardware_interface::BaseImageHandle, _data: &[RGBAu8]) {}

	pub fn blit_image(
		&mut self,
		_source_image: graphics_hardware_interface::BaseImageHandle,
		_source_layout: Layouts,
		_destination_image: graphics_hardware_interface::BaseImageHandle,
		_destination_layout: Layouts,
	) {
	}

	pub fn bind_vertex_buffers(&mut self, _buffer_descriptors: &[BufferDescriptor]) {}

	pub fn bind_index_buffer(&mut self, _buffer_descriptor: &BufferDescriptor) {}

	pub fn present(&mut self, _present_key: PresentKey) {}

	pub fn execute(
		self,
		_wait_for_synchronizer_handles: &[SynchronizerHandle],
		_signal_synchronizer_handles: &[SynchronizerHandle],
		_presentations: &[PresentKey],
		_execution_synchronizer_handle: SynchronizerHandle,
	) {
	}

	pub fn start_region(&self, _write_label: impl FnOnce(&mut crate::command_buffer::DebugLabelWriter) -> std::fmt::Result) {}

	pub fn end_region(&self) {}

	pub fn region(
		&mut self,
		_write_label: impl FnOnce(&mut crate::command_buffer::DebugLabelWriter) -> std::fmt::Result,
		_f: impl FnOnce(&mut Self),
	) {
	}

	pub fn end_render_pass(&mut self) {}

	pub fn bind_raster_pipeline(&mut self, _pipeline_handle: PipelineHandle) -> &mut Self {
		self
	}

	pub fn bind_compute_pipeline(&mut self, _pipeline_handle: PipelineHandle) -> &mut Self {
		self
	}

	pub fn bind_ray_tracing_pipeline(&mut self, _pipeline_handle: PipelineHandle) -> &mut Self {
		self
	}

	pub fn bind_descriptor_sets(&mut self, _sets: &[DescriptorSetHandle]) -> &mut Self {
		self
	}

	pub fn write_push_constant<T: Copy + 'static>(&mut self, _offset: u32, _data: T)
	where
		[(); std::mem::size_of::<T>()]: Sized,
	{
	}

	pub fn draw_mesh(&mut self, _mesh_handle: &MeshHandle) {}

	pub fn draw(&mut self, _vertex_count: u32, _instance_count: u32, _first_vertex: u32, _first_instance: u32) {}

	pub fn draw_indexed(
		&mut self,
		_index_count: u32,
		_instance_count: u32,
		_first_index: u32,
		_vertex_offset: i32,
		_first_instance: u32,
	) {
	}

	pub fn dispatch_meshes(&mut self, _x: u32, _y: u32, _z: u32) {}

	pub fn dispatch(&mut self, _dispatch: DispatchExtent) {}

	pub fn indirect_dispatch<const N: usize>(&mut self, _buffer: BufferHandle<[[u32; 4]; N]>, _entry_index: usize) {}

	pub fn trace_rays(&mut self, _binding_tables: crate::rt::BindingTables, _x: u32, _y: u32, _z: u32) {}
}