18 vkBuffer(VK_NULL_HANDLE),
37 vkBuffer(VK_NULL_HANDLE),
58 void createComputePipeline(VkPipeline& pipe,
const char* shader, VkPipelineLayout draft, VkPipelineCache cache, VkSpecializationInfo* specializationInfo) {
60 VkComputePipelineCreateInfo computePipelineCreateInfo = {
61 .sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO,
67 VkPipelineShaderStageCreateInfo shaderStage = {};
68 shaderStage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
69 shaderStage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
70 shaderStage.module = vka::shelve::loadShader((std::string(COMSHADER_PATH) + std::string(shader) + std::string(
".comp.spv")).c_str(), $device);
71 shaderStage.pName =
"main";
72 if (specializationInfo !=
nullptr)shaderStage.pSpecializationInfo = specializationInfo;
73 assert(shaderStage.module != VK_NULL_HANDLE);
74 computePipelineCreateInfo.stage = shaderStage;
76 VK_CHECK_RESULT(vkCreateComputePipelines($device, cache, 1, &computePipelineCreateInfo,
nullptr, &pipe));
77 vkDestroyShaderModule($device, shaderStage.module,
nullptr);
88#define CaseInputString(in) case in: return std::string(#in);
103 return std::to_string(UINT(type)) +
"Unknown";
#define CaseInputString(in)
std::string INPUT_String(arth::INPUT type)
void createComputePipeline(VkPipeline &pipe, const char *shader, VkPipelineLayout draft, VkPipelineCache cache, VkSpecializationInfo *specializationInfo)
Bache & operator=(const Bache &other)
std::string_view LayoutType