diff options
author | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-25 17:44:23 +0100 |
commit | 6ef351de4ba506e7f0f285569aa0e22255bb68c6 (patch) | |
tree | 7aaf25bb93e3d97ba03c408fdef9f7b1933ea7bc /stockton-render/src/draw/target.rs | |
parent | 2e33320e62a3dc26555f17e1a79e129a53672a1b (diff) |
refactor(render): slight leveldrawpass refactors
Diffstat (limited to 'stockton-render/src/draw/target.rs')
-rw-r--r-- | stockton-render/src/draw/target.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/stockton-render/src/draw/target.rs b/stockton-render/src/draw/target.rs index de803aa..3861192 100644 --- a/stockton-render/src/draw/target.rs +++ b/stockton-render/src/draw/target.rs @@ -9,13 +9,16 @@ use std::{ use hal::{ command::CommandBufferFlags, format::{Aspects, ChannelType, Format, ImageFeature}, - image::{Access, Extent, Layout, SubresourceRange, Usage as ImgUsage}, + image::{ + Access, Extent, FramebufferAttachment, Layout, SubresourceRange, Usage as ImgUsage, + ViewCapabilities, + }, memory::{Barrier, Dependencies}, pso::{PipelineStage, Viewport}, window::{CompositeAlphaMode, Extent2D, PresentMode, SwapchainConfig}, }; -use super::{draw_passes::DrawPass}; +use super::draw_passes::DrawPass; use crate::{error::EnvironmentError, types::*}; use anyhow::{Context, Result}; use stockton_types::Session; @@ -107,6 +110,14 @@ impl SwapchainProperties { }, }) } + + pub fn framebuffer_attachment(&self) -> FramebufferAttachment { + FramebufferAttachment { + usage: ImgUsage::COLOR_ATTACHMENT, + format: self.format, + view_caps: ViewCapabilities::empty(), + } + } } pub struct TargetChain { |