1 module gfx.graal.renderpass; 2 3 import gfx.core.rc; 4 import gfx.core.typecons; 5 import gfx.graal.cmd : Access, PipelineStage; 6 import gfx.graal.format; 7 import gfx.graal.image; 8 9 import std.typecons : Flag; 10 11 enum LoadOp { 12 load, clear, dontCare 13 } 14 15 enum StoreOp { 16 store, dontCare 17 } 18 19 struct AttachmentOps { 20 LoadOp load; 21 StoreOp store; 22 } 23 24 struct AttachmentDescription 25 { 26 Format format; 27 uint samples; 28 AttachmentOps colorDepthOps; 29 AttachmentOps stencilOps; 30 Trans!ImageLayout layoutTrans; 31 Flag!"mayAlias" mayAlias; 32 } 33 34 struct AttachmentRef { 35 uint attachment; 36 ImageLayout layout; 37 } 38 39 struct SubpassDescription 40 { 41 AttachmentRef[] inputs; 42 AttachmentRef[] colors; 43 Option!AttachmentRef depthStencil; 44 uint[] preserves; 45 } 46 47 struct SubpassDependency 48 { 49 Trans!uint subpass; 50 Trans!PipelineStage stageMask; 51 Trans!Access accessMask; 52 } 53 54 interface RenderPass : AtomicRefCounted 55 {} 56 57 interface Framebuffer : AtomicRefCounted 58 {}