Change name for pipeline creation.

This commit is contained in:
Anish Bhobe 2025-05-31 11:51:21 +02:00
parent cc1fd12b64
commit 4cdb39c6ba
5 changed files with 6 additions and 9 deletions

View File

@ -542,15 +542,12 @@ class Device final
PipelineCreationError PipelineCreationError
CreateShaders(eastl::fixed_vector<vk::PipelineShaderStageCreateInfo, ShaderTypeCount, false> &shadersOut, CreateShaders(eastl::fixed_vector<vk::PipelineShaderStageCreateInfo, ShaderTypeCount, false> &shadersOut,
Slang::ComPtr<slang::IComponentType> &program, std::span<ShaderInfo const> const &shaders); Slang::ComPtr<slang::IComponentType> &program, std::span<ShaderInfo const> const &shaders);
systems::PipelineCreationError
CreateShader(vk::PipelineShaderStageCreateInfo &shadersOut, Slang::ComPtr<slang::IComponentType> &program,
ShaderInfo const &shaders);
PipelineCreationError PipelineCreationError
CreatePipelineLayout(vk::PipelineLayout &pipelineLayout, Slang::ComPtr<slang::IComponentType> const &program); CreatePipelineLayout(vk::PipelineLayout &pipelineLayout, Slang::ComPtr<slang::IComponentType> const &program);
public: public:
// Pipelines, unlike the other resources, are not ref-counted. // Pipelines, unlike the other resources, are not ref-counted.
PipelineCreationError CreatePipeline(Pipeline &pipeline, GraphicsPipelineCreateInfo const &createInfo); PipelineCreationError CreateGraphicsPipeline(Pipeline &pipeline, GraphicsPipelineCreateInfo const &createInfo);
PipelineCreationError CreateComputePipeline(Pipeline &pipeline, ComputePipelineCreateInfo const &createInfo); PipelineCreationError CreateComputePipeline(Pipeline &pipeline, ComputePipelineCreateInfo const &createInfo);
// //

View File

@ -502,7 +502,7 @@ systems::Device::CreateSampler(SamplerCreateInfo const &createInfo)
// ---------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------
systems::PipelineCreationError systems::PipelineCreationError
systems::Device::CreatePipeline(Pipeline &pipelineOut, GraphicsPipelineCreateInfo const &createInfo) systems::Device::CreateGraphicsPipeline(Pipeline &pipelineOut, GraphicsPipelineCreateInfo const &createInfo)
{ {
eastl::fixed_vector<vk::PipelineShaderStageCreateInfo, ShaderTypeCount, false> shaders; eastl::fixed_vector<vk::PipelineShaderStageCreateInfo, ShaderTypeCount, false> shaders;
Slang::ComPtr<slang::IComponentType> program; Slang::ComPtr<slang::IComponentType> program;

View File

@ -62,7 +62,7 @@ main(int, char **)
}}; }};
Pipeline pipeline; Pipeline pipeline;
auto pipelineError = device.CreatePipeline(pipeline, { auto pipelineError = device.CreateGraphicsPipeline(pipeline, {
.m_VertexInputs = {{ .m_VertexInputs = {{
.m_Attribute = Vertex::GetAttributes(), .m_Attribute = Vertex::GetAttributes(),
.m_Stride = sizeof(Vertex), .m_Stride = sizeof(Vertex),

View File

@ -127,7 +127,7 @@ main(int, char **)
Pipeline pipeline; Pipeline pipeline;
auto pipelineResult = auto pipelineResult =
device.CreatePipeline(pipeline, {.m_Shaders = { device.CreateGraphicsPipeline(pipeline, {.m_Shaders = {
{.m_ShaderFile = SHADER_FILE, .m_EntryPoints = {"vsmain", "fsmain"}}, {.m_ShaderFile = SHADER_FILE, .m_EntryPoints = {"vsmain", "fsmain"}},
}}); }});
ERROR_IF(pipelineResult, "Could not create pipeline. Cause: {}", pipelineResult.What()) ERROR_IF(pipelineResult, "Could not create pipeline. Cause: {}", pipelineResult.What())

View File

@ -184,7 +184,7 @@ main(int, char **)
auto attachmentFormat = device.m_Swapchain.m_Format; auto attachmentFormat = device.m_Swapchain.m_Format;
Pipeline pipeline; Pipeline pipeline;
if (auto result = device.CreatePipeline(pipeline, { if (auto result = device.CreateGraphicsPipeline(pipeline, {
.m_Shaders = {{ .m_Shaders = {{
.m_ShaderFile = MODEL_SHADER_FILE, .m_ShaderFile = MODEL_SHADER_FILE,
.m_EntryPoints = {"vsmain", "fsmain"}, .m_EntryPoints = {"vsmain", "fsmain"},
@ -196,7 +196,7 @@ main(int, char **)
} }
Pipeline backgroundPipeline; Pipeline backgroundPipeline;
if (auto result = device.CreatePipeline( if (auto result = device.CreateGraphicsPipeline(
backgroundPipeline, { backgroundPipeline, {
.m_Shaders = {{ .m_Shaders = {{
.m_ShaderFile = BACKGROUND_SHADER_FILE, .m_ShaderFile = BACKGROUND_SHADER_FILE,