1#![allow(unused_attributes)]
3#![allow(unused_variables)]
4
5use crate::*;
6use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
7
8pub struct RafxApiEmpty;
12impl RafxApiEmpty {
13 pub fn device_context(&self) -> &RafxDeviceContextEmpty { unimplemented!() }
14
15 pub fn destroy(&mut self) -> RafxResult<()> { unimplemented!() }
16}
17
18#[derive(Clone)]
19pub struct RafxDeviceContextEmpty;
20impl RafxDeviceContextEmpty {
21 pub fn device_info(&self) -> &RafxDeviceInfo { unimplemented!() }
22
23 pub fn create_queue(&self, queue_type: RafxQueueType) -> RafxResult<RafxQueueEmpty> { unimplemented!(); }
24 pub fn create_fence(&self) -> RafxResult<RafxFenceEmpty> { unimplemented!(); }
25 pub fn create_semaphore(&self) -> RafxResult<RafxSemaphoreEmpty> { unimplemented!(); }
26 pub fn create_swapchain(&self, raw_display_handle: &dyn HasRawDisplayHandle, raw_window_handle: &dyn HasRawWindowHandle, present_queue: &RafxQueue, swapchain_def: &RafxSwapchainDef) -> RafxResult<RafxSwapchainEmpty> { unimplemented!(); }
27 pub fn create_sampler(&self, sampler_def: &RafxSamplerDef) -> RafxResult<RafxSamplerEmpty> { unimplemented!(); }
28 pub fn create_texture(&self, texture_def: &RafxTextureDef) -> RafxResult<RafxTextureEmpty> { unimplemented!(); }
29 pub fn create_buffer(&self, buffer_def: &RafxBufferDef) -> RafxResult<RafxBufferEmpty> { unimplemented!(); }
30 pub fn create_shader(&self, stages: Vec<RafxShaderStageDef>) -> RafxResult<RafxShaderEmpty> { unimplemented!(); }
31 pub fn create_root_signature(&self, root_signature_def: &RafxRootSignatureDef) -> RafxResult<RafxRootSignatureEmpty> { unimplemented!(); }
32 pub fn create_descriptor_set_array(&self, descriptor_set_array_def: &RafxDescriptorSetArrayDef) -> RafxResult<RafxDescriptorSetArrayEmpty> { unimplemented!(); }
33 pub fn create_graphics_pipeline(&self, graphics_pipeline_def: &RafxGraphicsPipelineDef) -> RafxResult<RafxPipelineEmpty> { unimplemented!(); }
34 pub fn create_compute_pipeline(&self, compute_pipeline_def: &RafxComputePipelineDef) -> RafxResult<RafxPipelineEmpty> { unimplemented!(); }
35 pub fn create_shader_module(&self, data: RafxShaderModuleDefEmpty) -> RafxResult<RafxShaderModuleEmpty> { unimplemented!(); }
36
37 pub fn wait_for_fences(&self, fences: &[&RafxFenceEmpty]) -> RafxResult<()> { unimplemented!(); }
38
39 pub fn find_supported_format(&self, candidates: &[RafxFormat], resource_type: RafxResourceType) -> Option<RafxFormat> { unimplemented!(); }
40 pub fn find_supported_sample_count(&self, candidates: &[RafxSampleCount]) -> Option<RafxSampleCount> { unimplemented!(); }
41}
42
43#[derive(Debug)]
47pub struct RafxBufferEmpty;
48impl RafxBufferEmpty {
49 pub fn buffer_def(&self) -> &RafxBufferDef { unimplemented!() }
50 pub fn set_debug_name(&self, name: impl AsRef<str>) { unimplemented!() }
51 pub fn map_buffer(&self) -> RafxResult<*mut u8> { unimplemented!() }
52 pub fn unmap_buffer(&self) -> RafxResult<()> { unimplemented!() }
53 pub fn mapped_memory(&self) -> Option<*mut u8> { unimplemented!() }
54 pub fn copy_to_host_visible_buffer<T: Copy>(&self, data: &[T]) -> RafxResult<()> { unimplemented!() }
55 pub fn copy_to_host_visible_buffer_with_offset<T: Copy>(
56 &self, data: &[T], buffer_byte_offset: u64) -> RafxResult<()> { unimplemented!() }
57}
58
59#[derive(Clone, Debug)]
60pub struct RafxTextureEmpty;
61impl RafxTextureEmpty {
62 pub fn texture_def(&self) -> &RafxTextureDef { unimplemented!() }
63 pub fn set_debug_name(&self, name: impl AsRef<str>) { unimplemented!() }
64}
65
66#[derive(Clone, Debug)]
67pub struct RafxSamplerEmpty;
68
69#[derive(Clone, Debug)]
73pub struct RafxShaderModuleEmpty;
74
75#[derive(Clone, Debug)]
76pub struct RafxShaderEmpty;
77impl RafxShaderEmpty {
78 pub fn pipeline_reflection(&self) -> &RafxPipelineReflection { unimplemented!() }
79}
80
81#[derive(Clone, Debug)]
82pub struct RafxRootSignatureEmpty;
83impl RafxRootSignatureEmpty {
84 pub fn pipeline_type(&self) -> RafxPipelineType { unimplemented!() }
85 pub fn find_descriptor_by_name(&self, name: &str) -> Option<RafxDescriptorIndex> { unimplemented!() }
86 pub fn find_descriptor_by_binding(&self, set_index: u32, binding: u32) -> Option<RafxDescriptorIndex> { unimplemented!() }
87 pub fn find_push_constant_descriptor(&self, stage: RafxShaderStageFlags) -> Option<RafxDescriptorIndex> { unimplemented!() }
88}
89
90#[derive(Debug)]
91pub struct RafxPipelineEmpty;
92impl RafxPipelineEmpty {
93 pub fn pipeline_type(&self) -> RafxPipelineType { unimplemented!(); }
94 pub fn root_signature(&self) -> &RafxRootSignature { unimplemented!(); }
95 pub fn set_debug_name(&self, name: impl AsRef<str>) { unimplemented!() }
96}
97
98#[derive(Clone, Debug)]
102pub struct RafxDescriptorSetHandleEmpty;
103
104#[derive(Debug)]
105pub struct RafxDescriptorSetArrayEmpty;
106impl RafxDescriptorSetArrayEmpty {
107 pub fn handle(&self, array_index: u32) -> Option<RafxDescriptorSetHandleEmpty> { unimplemented!(); }
108 pub fn root_signature(&self) -> &RafxRootSignature { unimplemented!(); }
109 pub fn update_descriptor_set(&mut self, params: &[RafxDescriptorUpdate]) -> RafxResult<()> { unimplemented!(); }
110 pub fn queue_descriptor_set_update(&mut self, update: &RafxDescriptorUpdate) -> RafxResult<()> { unimplemented!(); }
111 pub fn flush_descriptor_set_updates(&mut self) -> RafxResult<()> { unimplemented!(); }
112}
113
114#[derive(Clone, Debug)]
118pub struct RafxQueueEmpty;
119impl RafxQueueEmpty {
120 pub fn device_context(&self) -> &RafxDeviceContextEmpty { unimplemented!() }
121 pub fn queue_id(&self) -> u32 { unimplemented!(); }
122 pub fn queue_type(&self) -> RafxQueueType { unimplemented!(); }
123 pub fn create_command_pool(&self, command_pool_def: &RafxCommandPoolDef) -> RafxResult<RafxCommandPoolEmpty> { unimplemented!(); }
124 pub fn submit(&self, command_buffers: &[&RafxCommandBufferEmpty], wait_semaphores: &[&RafxSemaphoreEmpty], signal_semaphores: &[&RafxSemaphoreEmpty], signal_fence: Option<&RafxFenceEmpty>) -> RafxResult<()> { unimplemented!(); }
125 pub fn present(&self, swapchain: &RafxSwapchainEmpty, wait_semaphores: &[&RafxSemaphoreEmpty], image_index: u32) -> RafxResult<RafxPresentSuccessResult> { unimplemented!() }
126 pub fn wait_for_queue_idle(&self) -> RafxResult<()> { unimplemented!() }
127}
128
129pub struct RafxCommandPoolEmpty;
130impl RafxCommandPoolEmpty {
131 pub fn device_context(&self) -> &RafxDeviceContextEmpty { unimplemented!() }
132 pub fn create_command_buffer(&self, command_buffer_def: &RafxCommandBufferDef) -> RafxResult<RafxCommandBufferEmpty> { unimplemented!() }
133 pub fn reset_command_pool(&self) -> RafxResult<()> { unimplemented!() }
134}
135
136#[derive(Debug)]
137pub struct RafxCommandBufferEmpty;
138impl RafxCommandBufferEmpty {
139 pub fn begin(&self) -> RafxResult<()> { unimplemented!() }
140 pub fn end(&self) -> RafxResult<()> { unimplemented!() }
141 pub fn return_to_pool(&self) -> RafxResult<()> { unimplemented!() }
142
143 pub fn cmd_begin_render_pass(&self, color_targets: &[RafxColorRenderTargetBinding], depth_target: Option<RafxDepthStencilRenderTargetBinding>) -> RafxResult<()> { unimplemented!() }
144 pub fn cmd_end_render_pass(&self) -> RafxResult<()> { unimplemented!() }
145
146 pub fn cmd_set_viewport(&self, x: f32, y: f32, width: f32, height: f32, depth_min: f32, depth_max: f32) -> RafxResult<()> { unimplemented!() }
147 pub fn cmd_set_scissor(&self, x: u32, y: u32, width: u32, height: u32) -> RafxResult<()> { unimplemented!() }
148 pub fn cmd_set_stencil_reference_value(&self, value: u32) -> RafxResult<()> { unimplemented!() }
149
150 pub fn cmd_bind_pipeline(&self, pipeline: &RafxPipelineEmpty) -> RafxResult<()> { unimplemented!() }
151 pub fn cmd_bind_vertex_buffers(&self, first_binding: u32, bindings: &[RafxVertexBufferBinding]) -> RafxResult<()> { unimplemented!() }
152 pub fn cmd_bind_index_buffer(&self, binding: &RafxIndexBufferBinding) -> RafxResult<()> { unimplemented!() }
153 pub fn cmd_bind_descriptor_set(&self, descriptor_set_array: &RafxDescriptorSetArrayEmpty, index: u32) -> RafxResult<()> { unimplemented!() }
154 pub fn cmd_bind_descriptor_set_handle(&self, root_signature: &RafxRootSignatureEmpty, set_index: u32, descriptor_set_handle: &RafxDescriptorSetHandleEmpty) -> RafxResult<()> { unimplemented!() }
155 pub fn cmd_bind_push_constant<T: Copy>(&self, root_signature: &RafxRootSignatureEmpty, descriptor_index: RafxDescriptorIndex, data: &T) -> RafxResult<()> { unimplemented!() }
156
157 pub fn cmd_draw(&self, vertex_count: u32, first_vertex: u32) -> RafxResult<()> { unimplemented!() }
158 pub fn cmd_draw_instanced(&self, vertex_count: u32, first_vertex: u32, instance_count: u32, first_instance: u32) -> RafxResult<()> { unimplemented!() }
159 pub fn cmd_draw_indexed(&self, index_count: u32, first_index: u32, vertex_offset: i32) -> RafxResult<()> { unimplemented!() }
160 pub fn cmd_draw_indexed_instanced(&self, index_count: u32, first_index: u32, instance_count: u32, first_instance: u32, vertex_offset: i32) -> RafxResult<()> { unimplemented!() }
161 pub fn cmd_draw_indirect(&self, indirect_buffer: &RafxBufferEmpty, indirect_buffer_offset_in_bytes: u32, draw_count: u32) -> RafxResult<()> { unimplemented!() }
162 pub fn cmd_draw_indexed_indirect(&self, indirect_buffer: &RafxBufferEmpty, indirect_buffer_offset_in_bytes: u32, draw_count: u32) -> RafxResult<()> { unimplemented!() }
163
164 pub fn cmd_dispatch(&self, group_count_x: u32, group_count_y: u32, group_count_z: u32) -> RafxResult<()> { unimplemented!() }
165
166 pub fn cmd_resource_barrier(&self, buffer_barriers: &[RafxBufferBarrier], texture_barriers: &[RafxTextureBarrier]) -> RafxResult<()> { unimplemented!() }
167 pub fn cmd_copy_buffer_to_buffer(&self, src_buffer: &RafxBufferEmpty, dst_buffer: &RafxBufferEmpty, params: &RafxCmdCopyBufferToBufferParams) -> RafxResult<()> { unimplemented!() }
168 pub fn cmd_copy_buffer_to_texture(&self, src_buffer: &RafxBufferEmpty, dst_texture: &RafxTextureEmpty, params: &RafxCmdCopyBufferToTextureParams) -> RafxResult<()> { unimplemented!() }
169 pub fn cmd_copy_texture_to_texture(&self, src_texture: &RafxTextureEmpty, dst_texture: &RafxTextureEmpty, params: &RafxCmdCopyTextureToTextureParams) -> RafxResult<()> { unimplemented!() }
170
171 pub fn cmd_push_group_debug_name(&self, name: impl AsRef<str>) { unimplemented!() }
172 pub fn cmd_pop_group_debug_name(&self) { unimplemented!() }
173}
174
175pub struct RafxFenceEmpty;
179impl RafxFenceEmpty {
180 pub fn wait(&self) -> RafxResult<()> { unimplemented!(); }
181 pub fn wait_for_fences(device_context: &RafxDeviceContextEmpty, fences: &[&RafxFenceEmpty]) -> RafxResult<()> { unimplemented!(); }
182 pub fn get_fence_status(&self) -> RafxResult<RafxFenceStatus> { unimplemented!(); }
183}
184
185pub struct RafxSemaphoreEmpty;
186
187pub struct RafxSwapchainEmpty;
191impl RafxSwapchainEmpty {
192 pub fn swapchain_def(&self) -> &RafxSwapchainDef { unimplemented!() }
193 pub fn image_count(&self) -> usize { unimplemented!() }
194 pub fn format(&self) -> RafxFormat { unimplemented!() }
195 pub fn color_space(&self) -> RafxSwapchainColorSpace { unimplemented!() }
196 pub fn acquire_next_image_fence(&mut self, fence: &RafxFenceEmpty) -> RafxResult<RafxSwapchainImage> { unimplemented!() }
197 pub fn acquire_next_image_semaphore(&mut self, semaphore: &RafxSemaphoreEmpty) -> RafxResult<RafxSwapchainImage> { unimplemented!() }
198 pub fn rebuild(&mut self, swapchain_def: &RafxSwapchainDef) -> RafxResult<()> { unimplemented!() }
199}