From 43821b0cffc5aa419c0218992f06f8962ae54a13 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Wed, 8 May 2024 17:56:29 -0300 Subject: refa Rename graphical engine to BluCat --- src/vk/graphics_pipeline_2d_wired_layout.cpp | 87 ---------------------------- 1 file changed, 87 deletions(-) delete mode 100644 src/vk/graphics_pipeline_2d_wired_layout.cpp (limited to 'src/vk/graphics_pipeline_2d_wired_layout.cpp') diff --git a/src/vk/graphics_pipeline_2d_wired_layout.cpp b/src/vk/graphics_pipeline_2d_wired_layout.cpp deleted file mode 100644 index 10e2b50..0000000 --- a/src/vk/graphics_pipeline_2d_wired_layout.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright 2022-2023 Frederico de Oliveira Linhares - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "graphics_pipeline_2d_wired_layout.hpp" - -#include - -#include "../core.hpp" -#include "graphics_pipeline_2d_solid_layout.hpp" -#include "uniform_data_object.hpp" - -namespace -{ - -void -load_pipeline(void *obj) -{ - auto self = static_cast(obj); - - std::array set_layouts{ - cg_core.vk_descriptor_set_layout->view - }; - - std::array push_constants; - push_constants[0].stageFlags = VK_SHADER_STAGE_VERTEX_BIT; - push_constants[0].offset = 0; - push_constants[0].size = sizeof(VK::UDOVector4D); - - push_constants[1].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; - push_constants[1].offset = sizeof(VK::UDOVector4D); - push_constants[1].size = sizeof(VK::UDOVector3D); - - VkPipelineLayoutCreateInfo pipeline_layout_info{}; - pipeline_layout_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; - pipeline_layout_info.setLayoutCount = set_layouts.size(); - pipeline_layout_info.pSetLayouts = set_layouts.data(); - pipeline_layout_info.pushConstantRangeCount = push_constants.size(); - pipeline_layout_info.pPushConstantRanges = push_constants.data(); - - if(vkCreatePipelineLayout( - cg_core.vk_device_with_swapchain->device, &pipeline_layout_info, - nullptr, &self->pipeline) != VK_SUCCESS) - throw CommandError{"Failed to create Vulkan pipeline layout."}; -} - -void -unload_pipeline(void *obj) -{ - auto self = static_cast(obj); - - vkDestroyPipelineLayout( - cg_core.vk_device_with_swapchain->device, self->pipeline, nullptr); -} - -const CommandChain loader{ - {&load_pipeline, &unload_pipeline} -}; - -} - -namespace VK -{ - -GraphicsPipeline2DWiredLayout::GraphicsPipeline2DWiredLayout() -{ - loader.execute(this); -} - -GraphicsPipeline2DWiredLayout::~GraphicsPipeline2DWiredLayout() -{ - loader.revert(this); -} - -} -- cgit v1.2.3