Divide Framework
0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
RTDrawDescriptor.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2018 DIVIDE-Studio
3
Copyright (c) 2009 Ionut Cava
4
5
This file is part of DIVIDE Framework.
6
7
Permission is hereby granted, free of charge, to any person obtaining a copy
8
of this software
9
and associated documentation files (the "Software"), to deal in the Software
10
without restriction,
11
including without limitation the rights to use, copy, modify, merge, publish,
12
distribute, sublicense,
13
and/or sell copies of the Software, and to permit persons to whom the
14
Software is furnished to do so,
15
subject to the following conditions:
16
17
The above copyright notice and this permission notice shall be included in
18
all copies or substantial portions of the Software.
19
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
IMPLIED,
22
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23
PARTICULAR PURPOSE AND NONINFRINGEMENT.
24
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25
DAMAGES OR OTHER LIABILITY,
26
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27
IN CONNECTION WITH THE SOFTWARE
28
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30
*/
31
32
#pragma once
33
#ifndef DVD_RENDER_TARGET_DRAW_DESCRIPTOR_H_
34
#define DVD_RENDER_TARGET_DRAW_DESCRIPTOR_H_
35
36
#include "
RTAttachment.h
"
37
#include "
Platform/Video/Headers/BlendingProperties.h
"
38
39
namespace
Divide
40
{
41
42
constexpr
U8
INVALID_INDEX
=
U8_MAX
;
43
constexpr
U16
MAX_BLIT_ENTRIES
= 8u;
44
45
struct
BlitEntry
46
{
47
U16
_layerOffset
{0u};
48
U16
_mipOffset
{0u};
49
U8
_index
{
INVALID_INDEX
};
50
51
bool
operator==
(
const
BlitEntry
&)
const
=
default
;
52
};
53
54
struct
DrawLayerEntry
55
{
56
U16
_layer
{0u};
58
U8
_cubeFace
{0u};
59
60
bool
operator==
(
const
DrawLayerEntry
&)
const
=
default
;
61
};
62
63
struct
RTClearEntry
64
{
65
FColour4
_colour
{0.f};
//For depth, only R channel is used
66
bool
_enabled
{
false
};
67
};
68
69
struct
RTBlitEntry
70
{
71
BlitEntry
_input
{};
72
BlitEntry
_output
{};
73
U16
_layerCount
{1u};
74
U16
_mipCount
{1u};
75
};
76
77
using
RTBlitParams
= eastl::fixed_vector<RTBlitEntry, MAX_BLIT_ENTRIES, false>;
78
using
RTClearDescriptor
= std::array<RTClearEntry, RT_MAX_ATTACHMENT_COUNT>;
79
using
RTTransitionMask
=
bool
[
RT_MAX_ATTACHMENT_COUNT
];
80
using
RTDrawMask
=
bool
[
to_base
(
RTColourAttachmentSlot::COUNT
)];
81
82
struct
RTDrawDescriptor
83
{
84
DrawLayerEntry
_writeLayers
[
RT_MAX_ATTACHMENT_COUNT
];
85
RTDrawMask
_drawMask
= {
false
,
false
,
false
,
false
};
86
U16
_mipWriteLevel
{ 0u };
87
bool
_autoResolveMSAA
{
true
};
88
bool
_keepMSAADataAfterResolve
{
false
};
90
bool
_layeredRendering
{
false
};
91
};
92
93
extern
BlitEntry
INVALID_BLIT_ENTRY
;
94
extern
RTClearEntry
DEFAULT_CLEAR_ENTRY
;
95
96
bool
IsValid
(
const
RTBlitParams
& params)
noexcept
;
97
98
};
//namespace Divide
99
100
#endif
//DVD_RENDER_TARGET_DRAW_DESCRIPTOR_H_
101
102
#include "
RTDrawDescriptor.inl
"
BlendingProperties.h
RTAttachment.h
RTDrawDescriptor.inl
Divide::vec4< F32 >
Divide
Handle console commands that start with a forward slash.
Definition:
AIProcessor.cpp:7
Divide::MAX_BLIT_ENTRIES
constexpr U16 MAX_BLIT_ENTRIES
Definition:
RTDrawDescriptor.h:43
Divide::INVALID_INDEX
constexpr U8 INVALID_INDEX
Definition:
RTDrawDescriptor.h:42
Divide::RTBlitParams
eastl::fixed_vector< RTBlitEntry, MAX_BLIT_ENTRIES, false > RTBlitParams
Definition:
RTDrawDescriptor.h:77
Divide::RTDrawMask
bool[to_base(RTColourAttachmentSlot::COUNT)] RTDrawMask
Definition:
RTDrawDescriptor.h:80
Divide::U8
uint8_t U8
Definition:
PlatformDataTypes.h:44
Divide::INVALID_BLIT_ENTRY
BlitEntry INVALID_BLIT_ENTRY
Definition:
RTDrawDescriptor.cpp:8
Divide::IsValid
bool IsValid(const RTBlitParams ¶ms) noexcept
Definition:
RTDrawDescriptor.inl:38
Divide::U16
uint16_t U16
Definition:
PlatformDataTypes.h:45
Divide::RTColourAttachmentSlot::COUNT
@ COUNT
Divide::U8_MAX
constexpr U8 U8_MAX
Definition:
PlatformDataTypes.h:101
Divide::RT_MAX_ATTACHMENT_COUNT
static constexpr U8 RT_MAX_ATTACHMENT_COUNT
Definition:
RTAttachment.h:72
Divide::RTClearDescriptor
std::array< RTClearEntry, RT_MAX_ATTACHMENT_COUNT > RTClearDescriptor
Definition:
RTDrawDescriptor.h:78
Divide::RTTransitionMask
bool[RT_MAX_ATTACHMENT_COUNT] RTTransitionMask
Definition:
RTDrawDescriptor.h:79
Divide::DEFAULT_CLEAR_ENTRY
RTClearEntry DEFAULT_CLEAR_ENTRY
Definition:
RTDrawDescriptor.cpp:10
Divide::to_base
constexpr auto to_base(const Type value) -> Type
Definition:
PlatformDataTypes.h:228
Divide::BlitEntry
Definition:
RTDrawDescriptor.h:46
Divide::BlitEntry::_mipOffset
U16 _mipOffset
Definition:
RTDrawDescriptor.h:48
Divide::BlitEntry::operator==
bool operator==(const BlitEntry &) const =default
Divide::BlitEntry::_index
U8 _index
Definition:
RTDrawDescriptor.h:49
Divide::BlitEntry::_layerOffset
U16 _layerOffset
Definition:
RTDrawDescriptor.h:47
Divide::DrawLayerEntry
Definition:
RTDrawDescriptor.h:55
Divide::DrawLayerEntry::_cubeFace
U8 _cubeFace
Ignored for non cube textures.
Definition:
RTDrawDescriptor.h:58
Divide::DrawLayerEntry::operator==
bool operator==(const DrawLayerEntry &) const =default
Divide::DrawLayerEntry::_layer
U16 _layer
Definition:
RTDrawDescriptor.h:56
Divide::RTBlitEntry
Definition:
RTDrawDescriptor.h:70
Divide::RTBlitEntry::_mipCount
U16 _mipCount
Definition:
RTDrawDescriptor.h:74
Divide::RTBlitEntry::_input
BlitEntry _input
Definition:
RTDrawDescriptor.h:71
Divide::RTBlitEntry::_layerCount
U16 _layerCount
Definition:
RTDrawDescriptor.h:73
Divide::RTBlitEntry::_output
BlitEntry _output
Definition:
RTDrawDescriptor.h:72
Divide::RTClearEntry
Definition:
RTDrawDescriptor.h:64
Divide::RTClearEntry::_enabled
bool _enabled
Definition:
RTDrawDescriptor.h:66
Divide::RTClearEntry::_colour
FColour4 _colour
Definition:
RTDrawDescriptor.h:65
Divide::RTDrawDescriptor
Definition:
RTDrawDescriptor.h:83
Divide::RTDrawDescriptor::_mipWriteLevel
U16 _mipWriteLevel
Definition:
RTDrawDescriptor.h:86
Divide::RTDrawDescriptor::_keepMSAADataAfterResolve
bool _keepMSAADataAfterResolve
Definition:
RTDrawDescriptor.h:88
Divide::RTDrawDescriptor::_writeLayers
DrawLayerEntry _writeLayers[RT_MAX_ATTACHMENT_COUNT]
Definition:
RTDrawDescriptor.h:84
Divide::RTDrawDescriptor::_autoResolveMSAA
bool _autoResolveMSAA
Definition:
RTDrawDescriptor.h:87
Divide::RTDrawDescriptor::_drawMask
RTDrawMask _drawMask
Definition:
RTDrawDescriptor.h:85
Divide::RTDrawDescriptor::_layeredRendering
bool _layeredRendering
Set to true to bind all image layers to the render target (e.g. for Geometry Shader layered rendering...
Definition:
RTDrawDescriptor.h:90
Source
Platform
Video
Buffers
RenderTarget
Headers
RTDrawDescriptor.h
Generated on Fri May 17 2024 16:59:54 for Divide Framework by
1.9.6