Skip to content

Commit 44f2fd4

Browse files
author
devsh
committed
Graphics pipeline conversion
P.S. also fix a few quality screw ups
1 parent b1c0f56 commit 44f2fd4

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

include/nbl/asset/IGraphicsPipeline.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,8 @@ struct SPrimitiveAssemblyParams
6666
static_assert(sizeof(SPrimitiveAssemblyParams)==2u, "Unexpected size!");
6767

6868

69-
template<typename PipelineLayoutType, typename ShaderType, typename RenderpassType>
70-
class IGraphicsPipeline : public IPipeline<PipelineLayoutType>
69+
class IGraphicsPipelineBase : public virtual core::IReferenceCounted
7170
{
72-
protected:
73-
using renderpass_t = RenderpassType;
74-
7571
public:
7672
constexpr static inline uint8_t GRAPHICS_SHADER_STAGE_COUNT = 5u;
7773

@@ -83,6 +79,15 @@ class IGraphicsPipeline : public IPipeline<PipelineLayoutType>
8379
SBlendParams blend = {};
8480
uint32_t subpassIx = 0u;
8581
};
82+
};
83+
84+
template<typename PipelineLayoutType, typename ShaderType, typename RenderpassType>
85+
class IGraphicsPipeline : public IPipeline<PipelineLayoutType>, public IGraphicsPipelineBase
86+
{
87+
protected:
88+
using renderpass_t = RenderpassType;
89+
90+
public:
8691
struct SCreationParams : IPipeline<PipelineLayoutType>::SCreationParams
8792
{
8893
protected:

include/nbl/asset/RasterizationStates.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
#include "nbl/asset/IRenderpass.h"
1111

1212

13-
namespace nbl::asset
13+
namespace nbl
14+
{
15+
namespace asset
1416
{
1517

1618
struct SViewport
@@ -293,4 +295,21 @@ struct SBlendParams
293295
};
294296

295297
}
298+
299+
300+
// hasher specs
301+
namespace core
302+
{
303+
304+
template<typename Dummy>
305+
struct blake3_hasher::update_impl<asset::SStencilOpParams,Dummy>
306+
{
307+
static inline void __call(blake3_hasher& hasher, const asset::SStencilOpParams& input)
308+
{
309+
hasher.update(&input,sizeof(input));
310+
}
311+
};
312+
313+
}
314+
}
296315
#endif

0 commit comments

Comments
 (0)