2020-07-16 06:42:49 +00:00
|
|
|
{
|
2021-01-05 05:15:35 +00:00
|
|
|
shaderModules = {
|
2020-12-23 16:36:17 +00:00
|
|
|
// specify shader modules to load into memory
|
2021-01-05 05:15:35 +00:00
|
|
|
// key is the name of the module for referecy by the pipeline
|
|
|
|
// value the path to the spv file to load
|
|
|
|
// $shader refers to the shader install path
|
|
|
|
// $builtin refers to compiled-in shaders
|
|
|
|
passthrough = $builtin/passthrough.vert;
|
|
|
|
pushcolor = $builtin/pushcolor.frag;
|
|
|
|
};
|
2021-01-04 08:36:11 +00:00
|
|
|
setLayouts = {
|
|
|
|
something = {
|
|
|
|
flags = 0;
|
|
|
|
bindings = (
|
|
|
|
{
|
|
|
|
binding = 0;
|
|
|
|
descriptorType = sampled_image;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = fragment;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
binding = 1;
|
|
|
|
descriptorType = uniform_buffer;
|
|
|
|
descriptorCount = 1;
|
|
|
|
stageFlags = vertex;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
pipelineLayouts = {
|
|
|
|
something = {
|
|
|
|
setLayouts = (something);
|
|
|
|
pushConstantRanges = (
|
|
|
|
{
|
|
|
|
stageFlags = fragment;
|
|
|
|
offset = 0;
|
|
|
|
size = "4 * 4";
|
|
|
|
},
|
|
|
|
);
|
|
|
|
};
|
|
|
|
};
|
2020-07-16 06:42:49 +00:00
|
|
|
renderpass = {
|
|
|
|
attachments = (
|
|
|
|
{
|
|
|
|
flags = 0;
|
|
|
|
format = $swapchain.format;
|
|
|
|
samples = $msaaSamples;
|
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
|
|
finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
},
|
|
|
|
{
|
|
|
|
flags = 0;
|
2020-12-21 09:38:31 +00:00
|
|
|
format = VK_FORMAT_D32_SFLOAT;
|
2020-12-21 11:17:27 +00:00
|
|
|
samples = $msaaSamples;
|
2020-07-16 06:42:49 +00:00
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR;
|
2020-12-21 09:38:31 +00:00
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
2020-07-16 06:42:49 +00:00
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
2020-12-21 09:38:31 +00:00
|
|
|
finalLayout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
2020-07-16 06:42:49 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
flags = 0;
|
2020-12-21 09:38:31 +00:00
|
|
|
format = $swapchain.format;
|
2020-07-16 06:42:49 +00:00
|
|
|
samples = VK_SAMPLE_COUNT_1_BIT;
|
|
|
|
loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
storeOp = VK_ATTACHMENT_STORE_OP_STORE;
|
|
|
|
stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
|
|
|
|
stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
|
|
|
|
initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
|
|
|
|
finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
|
|
|
|
},
|
|
|
|
);
|
|
|
|
subpasses = (
|
|
|
|
{
|
2020-12-21 09:38:31 +00:00
|
|
|
pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
|
2020-07-16 15:33:00 +00:00
|
|
|
colorAttachments = (
|
2020-07-16 06:42:49 +00:00
|
|
|
{
|
2020-07-16 15:33:00 +00:00
|
|
|
attachment = 0;
|
2020-07-16 06:42:49 +00:00
|
|
|
layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
resolveAttachments = (
|
|
|
|
{
|
2020-07-16 15:33:00 +00:00
|
|
|
attachment = 2;
|
2020-07-16 06:42:49 +00:00
|
|
|
layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
depthStencilAttachment = {
|
2020-07-16 15:33:00 +00:00
|
|
|
attachment = 1;
|
2020-12-21 09:38:31 +00:00
|
|
|
layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
2020-07-16 06:42:49 +00:00
|
|
|
};
|
|
|
|
preserveAttachments = ();
|
|
|
|
},
|
|
|
|
);
|
|
|
|
dependencies = (
|
|
|
|
{
|
|
|
|
srcSubpass = VK_SUBPASS_EXTERNAL;
|
|
|
|
dstSubpass = 0;
|
|
|
|
srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
|
|
|
dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
|
|
|
srcAccessMask = 0;
|
|
|
|
dstAccessMask = "VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT";
|
|
|
|
dependencyFlags = 0;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|