2023-11-01 13:38:49 +01:00
|
|
|
#include "Initializer.h"
|
2023-11-09 22:15:51 +01:00
|
|
|
#include "Descriptor.h"
|
2023-11-01 13:38:49 +01:00
|
|
|
|
|
|
|
|
using namespace Seele;
|
2023-11-05 10:36:01 +01:00
|
|
|
using namespace Seele::Gfx;
|
2023-11-01 13:38:49 +01:00
|
|
|
|
|
|
|
|
LegacyPipelineCreateInfo::LegacyPipelineCreateInfo()
|
|
|
|
|
: topology(Gfx::SE_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST)
|
|
|
|
|
, multisampleState(MultisampleState{
|
|
|
|
|
.samples = 1,
|
2023-11-16 22:58:47 +01:00
|
|
|
})
|
2023-11-05 10:36:01 +01:00
|
|
|
, rasterizationState(RasterizationState{
|
|
|
|
|
.polygonMode = Gfx::SE_POLYGON_MODE_FILL,
|
|
|
|
|
.cullMode = Gfx::SE_CULL_MODE_BACK_BIT,
|
|
|
|
|
.frontFace = Gfx::SE_FRONT_FACE_COUNTER_CLOCKWISE,
|
2023-11-16 22:58:47 +01:00
|
|
|
})
|
2023-11-05 10:36:01 +01:00
|
|
|
, depthStencilState(DepthStencilState{
|
|
|
|
|
.depthTestEnable = true,
|
|
|
|
|
.depthWriteEnable = true,
|
|
|
|
|
.depthCompareOp = Gfx::SE_COMPARE_OP_LESS_OR_EQUAL,
|
2023-11-15 17:42:57 +01:00
|
|
|
.stencilTestEnable = false,
|
2023-11-05 10:36:01 +01:00
|
|
|
.minDepthBounds = 0.0f,
|
|
|
|
|
.maxDepthBounds = 1.0f,
|
2023-11-16 22:58:47 +01:00
|
|
|
})
|
2023-11-05 10:36:01 +01:00
|
|
|
, colorBlend(ColorBlendState{
|
|
|
|
|
.logicOpEnable = false,
|
|
|
|
|
.attachmentCount = 0,
|
|
|
|
|
.blendAttachments = {
|
|
|
|
|
ColorBlendState::BlendAttachment{
|
|
|
|
|
.colorWriteMask =
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_R_BIT |
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_G_BIT |
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_B_BIT |
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_A_BIT,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
.blendConstants = {
|
|
|
|
|
1.0f,
|
|
|
|
|
1.0f,
|
|
|
|
|
1.0f,
|
|
|
|
|
1.0f,
|
|
|
|
|
},
|
2023-11-16 22:58:47 +01:00
|
|
|
})
|
2023-11-01 13:38:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-05 10:36:01 +01:00
|
|
|
LegacyPipelineCreateInfo::~LegacyPipelineCreateInfo()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MeshPipelineCreateInfo::MeshPipelineCreateInfo()
|
|
|
|
|
: multisampleState(MultisampleState{
|
|
|
|
|
.samples = 1,
|
|
|
|
|
})
|
|
|
|
|
, rasterizationState(RasterizationState{
|
|
|
|
|
.polygonMode = Gfx::SE_POLYGON_MODE_FILL,
|
|
|
|
|
.cullMode = Gfx::SE_CULL_MODE_BACK_BIT,
|
|
|
|
|
.frontFace = Gfx::SE_FRONT_FACE_COUNTER_CLOCKWISE,
|
|
|
|
|
})
|
|
|
|
|
, depthStencilState(DepthStencilState{
|
|
|
|
|
.depthTestEnable = true,
|
|
|
|
|
.depthWriteEnable = true,
|
|
|
|
|
.depthCompareOp = Gfx::SE_COMPARE_OP_LESS_OR_EQUAL,
|
2023-11-15 17:42:57 +01:00
|
|
|
.stencilTestEnable = false,
|
2023-11-05 10:36:01 +01:00
|
|
|
.minDepthBounds = 0.0f,
|
|
|
|
|
.maxDepthBounds = 1.0f,
|
|
|
|
|
})
|
|
|
|
|
, colorBlend(ColorBlendState{
|
|
|
|
|
.logicOpEnable = false,
|
|
|
|
|
.attachmentCount = 0,
|
|
|
|
|
.blendAttachments = {
|
|
|
|
|
ColorBlendState::BlendAttachment{
|
|
|
|
|
.colorWriteMask =
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_R_BIT |
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_G_BIT |
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_B_BIT |
|
|
|
|
|
Gfx::SE_COLOR_COMPONENT_A_BIT,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
.blendConstants = {
|
|
|
|
|
1.0f,
|
|
|
|
|
1.0f,
|
|
|
|
|
1.0f,
|
|
|
|
|
1.0f,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MeshPipelineCreateInfo::~MeshPipelineCreateInfo()
|
2023-11-01 13:38:49 +01:00
|
|
|
{
|
|
|
|
|
}
|
2023-11-09 22:15:51 +01:00
|
|
|
|
|
|
|
|
ComputePipelineCreateInfo::ComputePipelineCreateInfo()
|
|
|
|
|
{
|
|
|
|
|
std::memset((void*)this, 0, sizeof(*this));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ComputePipelineCreateInfo::~ComputePipelineCreateInfo()
|
|
|
|
|
{
|
|
|
|
|
}
|