mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 16:10:53 +00:00
e95d498b97
It's not used yet, and thus may have some incorrect settings, but I decided that I will probably want it at some stage for qwaq. It's essentially was was in the original spec, but updated for some of the niceties added to parsing since I removed it back then. It's also in its own file.
199 lines
4.4 KiB
Text
199 lines
4.4 KiB
Text
{
|
|
flat_color_image_template = {
|
|
imageType = `2d;
|
|
samples = $msaaSamples;
|
|
extent = {
|
|
width = $output.extent.width;
|
|
height = $output.extent.height;
|
|
depth = 1;
|
|
};
|
|
mipLevels = 1;
|
|
arrayLayers = 1;
|
|
tiling = optimal;
|
|
usage = color_attachment|transient_attachment;
|
|
};
|
|
images = {
|
|
depth = {
|
|
@inherit = @properties.flat_color_image_template;
|
|
format = x8_d24_unorm_pack32;
|
|
usage = depth_stencil_attachment|transient_attachment;
|
|
};
|
|
color = {
|
|
@inherit = @properties.flat_color_image_template;
|
|
format = $output.format;
|
|
};
|
|
};
|
|
flat_color_view_template = {
|
|
viewType = `2d;
|
|
components = {
|
|
r = identity;
|
|
g = identity;
|
|
b = identity;
|
|
a = identity;
|
|
};
|
|
subresourceRange = {
|
|
aspectMask = color;
|
|
levelCount = 1;
|
|
layerCount = 1;
|
|
};
|
|
};
|
|
imageViews = {
|
|
depth = {
|
|
@inherit = $properties.flat_color_view_template;
|
|
image = depth;
|
|
format = $properties.images.depth.format;
|
|
subresourceRange = {
|
|
aspectMask = depth;
|
|
};
|
|
};
|
|
color = {
|
|
@inherit = $properties.flat_color_view_template;
|
|
image = color;
|
|
format = $properties.images.color.format;
|
|
};
|
|
};
|
|
framebuffer = {
|
|
renderPass = $properties.renderpass;
|
|
attachment = ($output.view, depth);
|
|
width = $output.extent.width;
|
|
height = $output.extent.height;
|
|
layers = 1;
|
|
};
|
|
framebuffer_msaa = {
|
|
renderPass = $properties.renderpass_msaa;
|
|
attachment = ($output.view, depth, color);
|
|
width = $output.extent.width;
|
|
height = $output.extent.height;
|
|
layers = 1;
|
|
};
|
|
attachment_template = {
|
|
samples = 1;
|
|
loadOp = dont_care;
|
|
storeOp = dont_care;
|
|
stencilLoadOp = dont_care;
|
|
stencilStoreOp = dont_care;
|
|
initialLayout = undefined;
|
|
finalLayout = color_attachment_optimal;
|
|
};
|
|
renderpass = {
|
|
attachments = (
|
|
{
|
|
@inherit = $properties.attachment_template;
|
|
format = $output.format;
|
|
loadOp = clear;
|
|
storeOp = store;
|
|
finalLayout = present_src_khr;
|
|
},
|
|
{
|
|
@inherit = $properties.attachment_template;
|
|
format = $properties.images.depth.format;
|
|
loadOp = clear;
|
|
finalLayout = depth_stencil_attachment_optimal;
|
|
},
|
|
);
|
|
subpasses = (
|
|
{
|
|
pipelineBindPoint = graphics;
|
|
colorAttachments = (
|
|
{
|
|
attachment = 0;
|
|
layout = color_attachment_optimal;
|
|
}
|
|
);
|
|
depthStencilAttachment = {
|
|
attachment = 1;
|
|
layout = depth_stencil_attachment_optimal;
|
|
};
|
|
preserveAttachments = ();
|
|
},
|
|
);
|
|
dependencies = (
|
|
{
|
|
srcSubpass = ~0u; // external
|
|
dstSubpass = 0;
|
|
srcStageMask = top_of_pipe;
|
|
dstStageMask = color_attachment_output;
|
|
srcAccessMask = memory_read;
|
|
dstAccessMask = color_attachment_write;
|
|
dependencyFlags = by_region;
|
|
},
|
|
{
|
|
srcSubpass = 0;
|
|
dstSubpass = ~0u; // external
|
|
srcStageMask = color_attachment_output;
|
|
dstStageMask = bottom_of_pipe;
|
|
srcAccessMask = color_attachment_write;
|
|
dstAccessMask = memory_read;
|
|
dependencyFlags = by_region;
|
|
},
|
|
);
|
|
};
|
|
renderpass_msaa = {
|
|
attachments = (
|
|
{
|
|
@inherit = $properties.attachment_template;
|
|
format = $output.format;
|
|
storeOp = store;
|
|
finalLayout = present_src_khr;
|
|
},
|
|
{
|
|
@inherit = $properties.attachment_template;
|
|
format = $properties.images.depth.format;
|
|
samples = $msaaSamples;
|
|
loadOp = clear;
|
|
storeOp = dont_care;
|
|
finalLayout = depth_stencil_attachment_optimal;
|
|
},
|
|
{
|
|
@inherit = $properties.attachment_template;
|
|
format = $swapchain.format;
|
|
samples = $msaaSamples;
|
|
loadOp = clear;
|
|
storeOp = store;// dont_care?
|
|
finalLayout = color_attachment_optimal;
|
|
},
|
|
);
|
|
subpasses = (
|
|
{
|
|
pipelineBindPoint = graphics;
|
|
colorAttachments = (
|
|
{
|
|
attachment = 2;
|
|
layout = color_attachment_optimal;
|
|
}
|
|
);
|
|
resolveAttachments = (
|
|
{
|
|
attachment = 0;
|
|
layout = color_attachment_optimal;
|
|
}
|
|
);
|
|
depthStencilAttachment = {
|
|
attachment = 1;
|
|
layout = depth_stencil_attachment_optimal;
|
|
};
|
|
preserveAttachments = ();
|
|
},
|
|
);
|
|
dependencies = (
|
|
{
|
|
srcSubpass = ~0u; // external
|
|
dstSubpass = 0;
|
|
srcStageMask = top_of_pipe;
|
|
dstStageMask = color_attachment_output;
|
|
srcAccessMask = memory_read;
|
|
dstAccessMask = color_attachment_write;
|
|
dependencyFlags = by_region;
|
|
},
|
|
{
|
|
srcSubpass = 0;
|
|
dstSubpass = ~0u; // external
|
|
srcStageMask = color_attachment_output;
|
|
dstStageMask = bottom_of_pipe;
|
|
srcAccessMask = color_attachment_write;
|
|
dstAccessMask = memory_read;
|
|
dependencyFlags = by_region;
|
|
},
|
|
);
|
|
};
|
|
}
|