Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::vkRenderTarget Class Referencefinal

#include <vkRenderTarget.h>

+ Inheritance diagram for Divide::vkRenderTarget:

Public Member Functions

 vkRenderTarget (GFXDevice &context, const RenderTargetDescriptor &descriptor)
 
bool create () override
 Init all attachments. Returns false if already called.
 
 PROPERTY_R_IW (VkRenderingInfo, renderingInfo)
 
- Public Member Functions inherited from Divide::RenderTarget
virtual bool create ()
 Init all attachments. Returns false if already called.
 
bool hasAttachment (RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const
 
bool usesAttachment (RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const
 
RTAttachmentgetAttachment (RTAttachmentType type, RTColourAttachmentSlot slot=RTColourAttachmentSlot::SLOT_0) const
 
U8 getAttachmentCount (RTAttachmentType type) const noexcept
 
U8 getSampleCount () const noexcept
 
bool resize (U16 width, U16 height)
 Resize all attachments.
 
bool updateSampleCount (U8 newSampleCount)
 Change msaa sampel count for all attachments.
 
U16 getWidth () const noexcept
 
U16 getHeight () const noexcept
 
vec2< U16getResolution () const noexcept
 
F32depthClearValue () noexcept
 
const Str< 64 > & name () const noexcept
 
- Public Member Functions inherited from Divide::GUIDWrapper
 GUIDWrapper () noexcept
 
 GUIDWrapper (const GUIDWrapper &old) noexcept
 
 GUIDWrapper (GUIDWrapper &&old) noexcept
 
virtual ~GUIDWrapper ()=default
 
FORCE_INLINE I64 getGUID () const noexcept
 
GUIDWrapperoperator= (const GUIDWrapper &old)=delete
 
GUIDWrapperoperator= (GUIDWrapper &&other)=delete
 
- Public Member Functions inherited from Divide::GraphicsResource
virtual ~GraphicsResource ()
 
GFXDevicecontext () const noexcept
 
U64 nameHash () const noexcept
 
- Public Member Functions inherited from Divide::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable (NonCopyable &&)=default
 
NonCopyableoperator= (NonCopyable &&)=default
 
- Public Member Functions inherited from Divide::NonMovable
 NonMovable (NonMovable &&)=delete
 
NonMovableoperator= (NonMovable &&)=delete
 
 NonMovable (const NonMovable &)=default
 
NonMovableoperator= (const NonMovable &)=default
 

Private Member Functions

void begin (VkCommandBuffer cmdBuffer, const RTDrawDescriptor &descriptor, const RTClearDescriptor &clearPolicy, VkPipelineRenderingCreateInfo &pipelineRenderingCreateInfoOut)
 
void end (VkCommandBuffer cmdBuffer, const RTTransitionMask &mask)
 
void blitFrom (VkCommandBuffer cmdBuffer, vkRenderTarget *source, const RTBlitParams &params) noexcept
 
void transitionAttachments (VkCommandBuffer cmdBuffer, const RTDrawDescriptor &descriptor, const RTTransitionMask &transitionMask, bool toWrite)
 

Private Attributes

std::array< VkRenderingAttachmentInfo, to_base(RTColourAttachmentSlot::COUNT)> _colourAttachmentInfo {}
 
VkRenderingAttachmentInfo _depthAttachmentInfo {}
 
std::array< VkFormat, to_base(RTColourAttachmentSlot::COUNT)> _colourAttachmentFormats {}
 
std::array< VkRenderingAttachmentInfo, to_base(RTColourAttachmentSlot::COUNT)> _stagingColourAttachmentInfo {}
 
RTDrawDescriptor _previousPolicy
 
std::array< VkImageSubresourceRange, RT_MAX_ATTACHMENT_COUNT_subresourceRange {}
 
bool _keptMSAAData {false}
 

Friends

class Attorney::VKAPIRenderTarget
 

Additional Inherited Members

- Public Types inherited from Divide::RenderTarget
enum class  Usage : U8 { RT_READ_WRITE = 0 , RT_READ_ONLY = 1 , RT_WRITE_ONLY = 2 }
 
- Public Types inherited from Divide::GraphicsResource
enum class  Type : U8 {
  RENDER_TARGET , SHADER_BUFFER , BUFFER , SHADER ,
  SHADER_PROGRAM , TEXTURE , COUNT
}
 
- Static Public Member Functions inherited from Divide::GUIDWrapper
static I64 generateGUID () noexcept
 
- Protected Member Functions inherited from Divide::RenderTarget
 RenderTarget (GFXDevice &context, const RenderTargetDescriptor &descriptor)
 
virtual bool initAttachment (RTAttachment *att, RTAttachmentType type, RTColourAttachmentSlot slot)
 
bool autoResolveAttachment (RTAttachment *att) const
 
- Protected Member Functions inherited from Divide::GraphicsResource
 GraphicsResource (GFXDevice &context, Type type, I64 GUID, U64 nameHash)
 
- Protected Member Functions inherited from Divide::NonCopyable
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 
- Protected Member Functions inherited from Divide::NonMovable
 NonMovable ()=default
 
 ~NonMovable ()=default
 
- Protected Attributes inherited from Divide::RenderTarget
RenderTargetDescriptor _descriptor
 
RTAttachment_uptr _attachments [RT_MAX_ATTACHMENT_COUNT] {}
 
bool _attachmentsUsed [RT_MAX_ATTACHMENT_COUNT] = {}
 
bool _attachmentsAutoResolve [RT_MAX_ATTACHMENT_COUNT] = {}
 
- Protected Attributes inherited from Divide::GUIDWrapper
const I64 _guid
 
- Protected Attributes inherited from Divide::GraphicsResource
GFXDevice_context
 

Detailed Description

Definition at line 51 of file vkRenderTarget.h.

Constructor & Destructor Documentation

◆ vkRenderTarget()

Divide::vkRenderTarget::vkRenderTarget ( GFXDevice context,
const RenderTargetDescriptor descriptor 
)

Definition at line 12 of file vkRenderTarget.cpp.

Member Function Documentation

◆ begin()

void Divide::vkRenderTarget::begin ( VkCommandBuffer  cmdBuffer,
const RTDrawDescriptor descriptor,
const RTClearDescriptor clearPolicy,
VkPipelineRenderingCreateInfo &  pipelineRenderingCreateInfoOut 
)
private

Definition at line 427 of file vkRenderTarget.cpp.

◆ blitFrom()

void Divide::vkRenderTarget::blitFrom ( VkCommandBuffer  cmdBuffer,
vkRenderTarget source,
const RTBlitParams params 
)
privatenoexcept

Definition at line 44 of file vkRenderTarget.cpp.

◆ create()

bool Divide::vkRenderTarget::create ( )
overridevirtual

Init all attachments. Returns false if already called.

Reimplemented from Divide::RenderTarget.

Definition at line 29 of file vkRenderTarget.cpp.

◆ end()

void Divide::vkRenderTarget::end ( VkCommandBuffer  cmdBuffer,
const RTTransitionMask mask 
)
private

Definition at line 635 of file vkRenderTarget.cpp.

◆ PROPERTY_R_IW()

Divide::vkRenderTarget::PROPERTY_R_IW ( VkRenderingInfo  ,
renderingInfo   
)

◆ transitionAttachments()

void Divide::vkRenderTarget::transitionAttachments ( VkCommandBuffer  cmdBuffer,
const RTDrawDescriptor descriptor,
const RTTransitionMask transitionMask,
bool  toWrite 
)
private

Definition at line 211 of file vkRenderTarget.cpp.

Friends And Related Function Documentation

◆ Attorney::VKAPIRenderTarget

friend class Attorney::VKAPIRenderTarget
friend

Definition at line 53 of file vkRenderTarget.h.

Member Data Documentation

◆ _colourAttachmentFormats

std::array<VkFormat, to_base( RTColourAttachmentSlot::COUNT )> Divide::vkRenderTarget::_colourAttachmentFormats {}
private

Definition at line 72 of file vkRenderTarget.h.

◆ _colourAttachmentInfo

std::array<VkRenderingAttachmentInfo, to_base(RTColourAttachmentSlot::COUNT)> Divide::vkRenderTarget::_colourAttachmentInfo {}
private

Definition at line 69 of file vkRenderTarget.h.

◆ _depthAttachmentInfo

VkRenderingAttachmentInfo Divide::vkRenderTarget::_depthAttachmentInfo {}
private

Definition at line 70 of file vkRenderTarget.h.

◆ _keptMSAAData

bool Divide::vkRenderTarget::_keptMSAAData {false}
private

Definition at line 79 of file vkRenderTarget.h.

◆ _previousPolicy

RTDrawDescriptor Divide::vkRenderTarget::_previousPolicy
private

Definition at line 75 of file vkRenderTarget.h.

◆ _stagingColourAttachmentInfo

std::array<VkRenderingAttachmentInfo, to_base( RTColourAttachmentSlot::COUNT )> Divide::vkRenderTarget::_stagingColourAttachmentInfo {}
private

Definition at line 74 of file vkRenderTarget.h.

◆ _subresourceRange

std::array<VkImageSubresourceRange, RT_MAX_ATTACHMENT_COUNT> Divide::vkRenderTarget::_subresourceRange {}
private

Definition at line 77 of file vkRenderTarget.h.


The documentation for this class was generated from the following files: