MCPcopy Create free account
hub / github.com/DragonJoker/RenderGraph / ClearValue

Class ClearValue

include/RenderGraph/FrameGraphStructs.hpp:236–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234 };
235
236 struct ClearValue
237 {
238 enum class ValueIndex
239 {
240 eColor,
241 eDepthStencil,
242 };
243
244 constexpr explicit ClearValue( ClearColorValue v = ClearColorValue{} )noexcept
245 : m_value{ std::move( v ) }
246 {
247 }
248
249 constexpr explicit ClearValue( ClearDepthStencilValue v )noexcept
250 : m_value{ std::move( v ) }
251 {
252 }
253
254 constexpr bool isColor()const noexcept
255 {
256 return m_value.index() == uint32_t( ValueIndex::eColor );
257 }
258
259 constexpr bool isDepthStencil()const noexcept
260 {
261 return m_value.index() == uint32_t( ValueIndex::eDepthStencil );
262 }
263
264 constexpr ClearColorValue const & color()const noexcept
265 {
266 return std::get< uint32_t( ValueIndex::eColor ) >( m_value );
267 }
268
269 constexpr ClearDepthStencilValue const & depthStencil()const noexcept
270 {
271 return std::get< uint32_t( ValueIndex::eDepthStencil ) >( m_value );
272 }
273
274 private:
275 std::variant< ClearColorValue, ClearDepthStencilValue > m_value;
276
277 friend bool operator==( ClearValue const & lhs, ClearValue const & rhs )noexcept = default;
278 };
279
280 struct PipelineColorBlendAttachmentState
281 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected