using Silk.NET.Vulkan; namespace AcDream.App.Rendering.Gpu.Vk; /// /// The half of that owns sampled resources, /// pipelines and passes. /// /// Split into its own file because the three V6 commits divide along /// exactly this line: V6a lands memory, buffers, rings and the frame timeline — /// everything in VulkanGpuDevice.cs — while textures, the descriptor /// table and render targets arrive at V6b and pipelines, passes and readback at /// V6c. Until each lands, the corresponding contract member throws with the /// slice named, rather than returning something that would fail later and /// further away. /// internal sealed unsafe partial class VulkanGpuDevice { private void InitialiseResources(string? shaderSpirvDirectory, string? pipelineCacheDirectory) { _ = shaderSpirvDirectory; _ = pipelineCacheDirectory; } private void BeginFrameResources(int slotIndex) => _ = slotIndex; private void EndFrameResources(int slotIndex, CommandBuffer commands) { _ = slotIndex; _ = commands; } private void DisposeResources() { } public IGpuTimerPool Timers => throw NotYet("GPU timer scopes", "V6c"); public GpuTextureSlot DefaultTextureSlot => throw NotYet("the default 1x1 white table slot", "V6b"); public IGpuTexture CreateTexture(in GpuTextureDescription description) => throw NotYet($"texture creation ('{description.Name}')", "V6b"); public IGpuSampler CreateSampler(in GpuSamplerDescription description) => throw NotYet("sampler creation", "V6b"); public IGpuRenderTarget CreateRenderTarget(in GpuRenderTargetDescription description) => throw NotYet($"render targets ('{description.Name}')", "V6b"); public GpuTextureSlot RegisterTexture(IGpuTexture texture, IGpuSampler sampler) => throw NotYet("the global texture table", "V6b"); public void ReleaseTextureSlot(GpuTextureSlot slot) => throw NotYet("the global texture table", "V6b"); public IGpuPipeline CreatePipeline(GpuPipelineDescription description) => throw NotYet($"pipelines ('{description?.Name}')", "V6c"); internal IGpuPassEncoder BeginPass(VulkanGpuFrame frame, GpuPassDescription description) => throw NotYet($"render passes ('{description.Name}')", "V6c"); public byte[] CaptureBackbuffer(int width, int height) => throw NotYet("backbuffer capture", "V6c"); private static NotSupportedException NotYet(string what, string slice) => new($"The Vulkan backend does not implement {what} yet; it lands at Campaign V slice {slice}."); }